Skip to content

refactor(cli): centralize catalog default - #37

Merged
kstonekuan merged 1 commit into
Hebbian-Robotics:mainfrom
bryanwhl:chore/31-catalog-default-constant
Aug 20, 2026
Merged

kstonekuan merged 1 commit into
Hebbian-Robotics:mainfrom
bryanwhl:chore/31-catalog-default-constant

Conversation

@bryanwhl

Copy link
Copy Markdown
Contributor

Summary

Centralize the catalog CLI default in DEFAULT_CATALOG_DIR and reuse it for both the curate and stale defaults and help text.

Why

The catalog path was repeated four times, so future changes could leave command defaults and help text out of sync. The constant remains the string ./data/catalog rather than a Path expression so this refactor preserves both argparse's default value type and the exact user-visible help text.

Closes #31

Validation

  • uv run pytest tests/test_catalog_curation.py -q — 16 passed
  • CLI parser check for both defaults and help strings — passed
  • uv run ruff check --fix — passed
  • uv run ruff format — 84 files unchanged
  • uv run ty check — passed
  • uv run pytest -q — 285 passed, 6 skipped, 5 unrelated local-platform failures: one test assumes /usr/bin/ffmpeg, and four require an ffmpeg build with the drawtext filter (the installed Homebrew ffmpeg lacks it)

Checklist

  • I added or updated outcome-focused tests for changed business logic. (No business logic changed; existing CLI coverage passes.)
  • I updated documentation for changed behavior, flags, formats, or requirements. (No user-visible behavior or documentation contract changed.)
  • I ran uv run ruff check --fix, uv run ruff format, and uv run ty check.
  • I ran the relevant pytest suite.
  • I did not add recordings, generated media, credentials, private URLs, or runtime artifacts.
  • I preserved stored-data compatibility or documented an explicit version change.

@github-actions

Copy link
Copy Markdown

👋 Hi @bryanwhl — thank you so much for your first contribution to HFlow!

A maintainer will review your pull request as soon as possible. In the meantime:

💡 Tip: one open pull request per contributor at a time. Issues with an assignee are taken; everything else is fair game.

We are excited to have you here and appreciate your help making the project better! 🙌

@bryanwhl
bryanwhl marked this pull request as ready for review August 20, 2026 03:47
@bryanwhl

Copy link
Copy Markdown
Contributor Author

@codex review

@bryanwhl
bryanwhl marked this pull request as draft August 20, 2026 03:49
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: cda413d159

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@bryanwhl
bryanwhl marked this pull request as ready for review August 20, 2026 03:50

@kstonekuan kstonekuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @bryanwhl, and welcome! Validated locally: full quality gate and test suite pass (293 tests), CI green on both Pythons. Special credit for the string-vs-Path reasoning in the description: you are right that Path("./data/catalog") would normalize away the ./ in the help text and make the argument's type inconsistent between defaulted and user-supplied runs. That is exactly the kind of trade-off note that makes a review fast. The honest report of the macOS-only test failures (/usr/bin/ffmpeg assumption, missing drawtext filter in Homebrew ffmpeg) is appreciated too; those are pre-existing platform issues, not caused by this change, and worth their own issue. Merging.

@kstonekuan
kstonekuan merged commit d013e5c into Hebbian-Robotics:main Aug 20, 2026
5 checks passed
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.

CLI: derive the ./data/catalog default from a constant instead of repeating the literal

2 participants