refactor: unified cvc CLI#96
Merged
Merged
Conversation
… commands Replace the old standalone libcvc.cpp program with a modern unified CLI called 'cvc' that consolidates all functionality into a single tool with subcommands, inspired by volutils' boost::program_options pattern. Commands included (25 total, grouped by category): File Info: info, stats Conversion: copy, convert Geometry: sdf, iso, tetrahedralize, hexahedralize Vol Arithmetic: add, subtract, scale, normalize, clip, negate, mask, downsample Vol Transform: rotate Analysis: ssim Projection: project, backproject Image I/O: vol2img, img2vol, rgba-merge Test Data: bunny Network: server, client (XMLRPC, conditional) Key improvements over old libcvc CLI: - Rich per-command --help with option descriptions - Named options with short flags (-i, -o, -d, etc.) - Positional argument support for common patterns - Grouped help output by category - --version flag - All SDF algorithm and mesher extraction/improvement options exposed - Feature guards (#ifdef CVC_ENABLE_SDF, CVC_ENABLE_MESHER) - Combines volume utilities previously only in volrover's volutils The old src/cvc/core/libcvc.cpp is removed as obsolete.
- Add cvc_cli_test.cpp with 58 fast tests + 11 heavy integration tests - Fast tests: help/version, subcommand --help (20+), bunny geometry, info/stats/copy/convert, volume arithmetic, SDF (v1+v2), iso extraction, error handling, SDF->iso pipeline - Integration tests (gated to merge-to-master): BunnySdfV2, SdfIsoRoundtrip, VolumeShortcut, VolArithmetic, Ssim, Convert, IsoExtractionMethods, Tetrahedralize, Hexahedralize, HighRes, SdfFlipNormals - Add --algorithm/-a flag to bunny command for SDF algorithm selection - Update CI workflow: add 'Integration' to STRESS_REGEX so heavy tests only run on push-to-master (3600s timeout), skipped on PRs - Use 16x16x16 minimum grid for SDF tests (v1 requires >= 16)
- tetrahedralize2: dual-tet (TETRA2) mesh extraction from volume - layer-mesh: interval/layer meshing between two isosurfaces (outer and inner isovalue) for shells, cortical layers, etc. - Both support full improvement method and normal type options - Add help tests and integration tests (73 total tests, all passing)
eeb154e to
05d1ba2
Compare
New commands for distributed state and script execution: - serve: headless CVC state server with distributed_state_session Supports IPC/gRPC transport, peer clustering (--seed), TLS, bearer token auth, subtree delegation, and optional state_exec coordinator. - exec: run state_exec (Scheme-like) scripts against the state tree Supports inline expressions (-e) and script files (-f) with resource limits (--max-steps, --max-time). - state: query and modify the state tree Operations: get, set, list, json, delete on dot-separated paths. - cluster-status: connect to a cluster and print admin health report Shows peers, delegations, blob store, shard stats. - ps: list running state_exec processes Tests: 95 total (78 fast + 17 integration), all passing. New tests cover help for all 5 commands, exec arithmetic/let/lambda/ file/errors, state get/set/list/json/errors, ps, and integration tests for exec pipelines, resource limits, and multi-file scripts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates the old standalone
libcvc.cppCLI, volutils commands, and meshing/SDF operations into a single unifiedcvcprogram with subcommands.Changes
src/cvc-cli/main.cpp— unified CLI with 25 subcommands grouped by categorysrc/cvc-cli/CMakeLists.txt— builds and installs thecvcexecutablesrc/CMakeLists.txt— wires incvc-clisubdirectorysrc/cvc/core/libcvc.cpp— obsolete standalone programCommands (25 total)
info,statscopy,convertsdf,iso,tetrahedralize,hexahedralizeadd,subtract,scale,normalize,clip,negate,mask,downsamplerotatessimproject,backprojectvol2img,img2vol,rgba-mergebunnyserver,client(XMLRPC conditional)Improvements over old libcvc CLI
--helpwith option descriptions and enum listings-i,-o,-d,-v, etc.)--versionflagCVC_ENABLE_SDF,CVC_ENABLE_MESHER)Testing
cvc --helpshows all commands grouped by categorycvc sdf --help,cvc iso --helpshow rich option descriptionscvc bunny test.offexports geometry successfullycvc info test.offreads back geometry metadata correctly