Consolidate jabs-project-merge and jabs-features into jabs-cli (KLAUS-566) - #423
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates legacy standalone CLI scripts into the unified jabs-cli entry point, moving project-merge functionality into a Click subcommand and turning jabs-features into a deprecation shim that forwards to jabs-cli compute-features. It updates user/developer documentation and adds test coverage for the new/changed CLI entry points.
Changes:
- Added
jabs-cli merge(Click command) and removed the standalonejabs-project-mergescript + entry point. - Reworked
jabs-featuresinto a thin shim that warns, translates legacy args, and invokesjabs-cli compute-features. - Updated docs (both copies) and added new tests for merge + feature-shim behavior; removed
rich-argparsedependency.
Reviewed changes
Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Removes rich-argparse from the resolved dependency set. |
| pyproject.toml | Drops rich-argparse dependency and removes the jabs-project-merge console script entry point. |
| src/jabs/scripts/merge_projects.py | Removes the legacy standalone merge script implementation. |
| src/jabs/scripts/cli/merge_projects.py | Adds new Click-based jabs-cli merge subcommand. |
| src/jabs/scripts/cli/cli.py | Registers the new merge command with the jabs-cli command group. |
| src/jabs/scripts/generate_features.py | Converts jabs-features into a deprecation shim that forwards to compute-features. |
| tests/scripts/test_merge_projects_cli.py | Adds tests for the new jabs-cli merge subcommand. |
| tests/scripts/test_generate_features.py | Adds tests for legacy→new argument translation and shim behavior. |
| docs/user-guide/cli-tools.md | Documents deprecation/mapping for jabs-features and adds sections for jabs-cli compute-features and jabs-cli merge. |
| src/jabs/resources/docs/user_guide/cli-tools.md | Mirrors the user guide doc updates for the in-app documentation copy. |
| src/jabs/ui/dialogs/user_guide_dialog.py | Updates in-app doc navigation to point to jabs-cli > compute-features. |
| docs/development/development.md | Updates developer command lists and notes the completed consolidation of merge tooling. |
| CLAUDE.md | Updates command list examples to prefer the consolidated jabs-cli subcommands. |
| ruff.toml | Adds per-file docstring rule ignores needed for Click docstring formatting in merge_projects.py. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Jira: KLAUS-566
Consolidates two standalone scripts into
jabs-cli. Each change is its own commit.jabs-project-merge→jabs-cli mergeThe standalone script and its
jabs-project-mergeentry point are removed; the logic now lives insrc/jabs/scripts/cli/merge_projects.pyas a Click command.rich-argparseis dropped as a dependency since that script was its only consumer.Behavior differences worth reviewing:
--merge-strategyis still required, but the old unreachabledefault="destination-wins"(and its misleading "(default: destination-wins)" help text) is gone.Project.is_valid_project_directory(), which checks for bothjabs/andjabs/project.json, instead of onlyjabs/. The same-project guard compares resolved paths, so./projvsprojis now caught.Error: ...on stderr (exit 1) rather than the previous rich-formattedERROR:block.jabs-features→jabs-cli compute-featuresjabs-cli compute-featuresalready existed, andjabs-featuresalready printed a deprecation warning — but it still carried a duplicate argparse parser and its own feature-computation implementation. It is now a thin shim: it keeps the legacy argument surface, warns on stderr, translates the options, and runscompute-features. The duplicatedgenerate_feature_cache()is deleted. Thejabs-featuresentry point stays installed.The two option surfaces don't line up 1:1, so the shim translates:
--pose-versionwas required by the legacy script, so a verbatim passthrough would have broken every existing invocation. The shim accepts it, warns that it is ignored, and drops it —compute-featuresinfers the version from the pose filename.--use-cm-distancesto opt in;compute-featuresdefaults to cm-when-a-scale-exists with--use-pixel-distancesto opt out. The shim forwards--use-pixel-distanceswhen--use-cm-distancesis absent, preserving the legacy default. One corner is not equivalent: legacy--use-cm-distanceson a pose file with no pixel-to-cm scale forced cm settings anyway, where the new command falls back to pixel.--window-size N→-w N;--fpsand--use-pose-hashpass through. Legacy--fpshad notype=, so it forwarded a string into feature computation; the shim parses it as an int.Docs
jabs-cli mergeandjabs-cli compute-featuresreference sections in the user guide, with thejabs-featuressection replaced by a deprecation note and a legacy→new option mapping table. The## jabs-featuresheading is kept so existing anchors still resolve.docs/user-guide/and the in-appsrc/jabs/resources/docs/user_guide/) are updated and kept identical.jabs-cli > compute-featuresinstead of the deprecated script.CLAUDE.mdanddocs/development/development.mdcommand lists updated;jabs-project-mergeremoved from the "future consolidation candidates" list in the development guide.Testing
tests/scripts/test_merge_projects_cli.py(6 tests) andtests/scripts/test_generate_features.py(7 tests).jabs-featuresend to end againsttests/data/sample_pose_est_v6.h5: per-frame andwindow_5Parquet caches written for all 4 identities, and errors from the new command propagate with exit 1.