Skip to content

add jabs-cli compute-features, deprecate jabs-features#381

Merged
gbeane merged 4 commits into
mainfrom
fix/generate-features-prog
May 19, 2026
Merged

add jabs-cli compute-features, deprecate jabs-features#381
gbeane merged 4 commits into
mainfrom
fix/generate-features-prog

Conversation

@gbeane
Copy link
Copy Markdown
Collaborator

@gbeane gbeane commented May 15, 2026

This pull request introduces a new CLI command for computing and caching JABS features, modernizes argument types, and begins deprecating the old feature generation script. The most important changes are summarized below:

New CLI Command for Feature Computation:

  • Added a new compute-features command to the CLI, implemented in compute_features.py, which provides a robust and user-friendly interface for computing and caching features from pose files. This includes options for window sizes, distance units, cache format, and pose hash handling.
  • Registered the new compute-features command in the main CLI by importing and adding it to the command group in cli.py. [1] [2]

Type and Interface Improvements:

  • Updated the IdentityFeatures class constructor to accept source_file as either a str or a Path

Deprecation of Old Feature Generation Script:

  • Modified generate_features.py to print a deprecation warning directing users to use the new jabs-cli compute-features command, and simplified its argument parsing.

@gbeane gbeane requested a review from Copilot May 15, 2026 04:05
@gbeane gbeane self-assigned this May 15, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new jabs-cli compute-features subcommand to compute and cache features from a pose file, registers it in the main CLI, updates IdentityFeatures to accept Path inputs for source_file, and begins deprecating the legacy jabs-features script.

Changes:

  • Added compute-features Click subcommand for feature computation/caching with options for window sizes, distance units, pose-hash cache layout, and cache format.
  • Registered the new subcommand in jabs-cli.
  • Began deprecating jabs-features by emitting a stderr warning and simplifying its CLI setup; updated IdentityFeatures typing to accept Path.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
src/jabs/scripts/generate_features.py Emits deprecation warning directing users to jabs-cli compute-features and removes unused script-name helper.
src/jabs/scripts/cli/compute_features.py New compute-features Click command implementing feature computation and cache writing.
src/jabs/scripts/cli/cli.py Registers compute-features in the main CLI command group.
src/jabs/feature_extraction/features.py Broadens IdentityFeatures constructor typing to accept Path for source_file.
Comments suppressed due to low confidence (1)

src/jabs/scripts/cli/compute_features.py:52

  • --fps should be validated as a positive integer (currently any int is accepted). Consider using click.IntRange(min=1) to prevent values like 0 or negative FPS from reaching feature computation.
@click.option(
    "--fps",
    type=int,
    default=30,
    show_default=True,
    help="Frames per second to use for feature calculation.",
)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/jabs/scripts/cli/compute_features.py
Comment thread src/jabs/scripts/cli/compute_features.py Outdated
Comment thread src/jabs/scripts/cli/compute_features.py Outdated
Comment thread src/jabs/scripts/cli/compute_features.py
@gbeane gbeane marked this pull request as ready for review May 15, 2026 04:19
@gbeane gbeane requested review from bergsalex and keithshep May 15, 2026 04:20
@gbeane gbeane merged commit e666b09 into main May 19, 2026
5 checks passed
@gbeane gbeane deleted the fix/generate-features-prog branch May 19, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants