Skip to content

cli: add hflow curate --dry-run; fix manifest: None in the report - #58

Closed
chintondutta wants to merge 1 commit into
Hebbian-Robotics:mainfrom
chintondutta:feat/8-curate-dry-run
Closed

cli: add hflow curate --dry-run; fix manifest: None in the report#58
chintondutta wants to merge 1 commit into
Hebbian-Robotics:mainfrom
chintondutta:feat/8-curate-dry-run

Conversation

@chintondutta

Copy link
Copy Markdown
Contributor

Fixes #8.

Two related rough edges

  1. The library supports dry runs, the CLI couldn't reach them. curate(...) already documents: "With output=None the query still runs (row count + coverage reporting) but nothing is written." But --output always defaulted to ./data/manifest.parquet with no way to opt out.
  2. The report rendered the None case badly. CurationReport.summary() printed the literal manifest: None (12 rows, from 40 cataloged episodes) when no manifest was written.

Change

  • Added --dry-run to the curate subparser, in a mutually exclusive group with --output (add_mutually_exclusive_group(), as suggested in the issue). _command_curate passes output=None to curate() when set.
  • CurationReport.summary() now branches on manifest_path is None and renders manifest: (not written; dry run) instead of the None literal.

Testing

Two new tests in tests/test_catalog_curation.py:

  • test_cli_curate_dry_run_prints_without_writing: hflow curate ... --dry-run prints row count and coverage, and the summary reads manifest: (not written; dry run) with no literal None anywhere in the output.
  • test_cli_curate_rejects_dry_run_with_output: --dry-run --output x.parquet together raises SystemExit(2) from argparse (matching the existing pattern for --profile in test_ingest_rejects_unknown_profile).
uv run pytest -q       # 299 passed, 3 skipped; unrelated: tests/test_ffmpeg.py fails/errors in this sandbox (no ffmpeg/ffprobe on PATH)
uv run ruff check --fix
uv run ruff format
uv run ty check

curate() already supported output=None (row count + coverage, nothing
written), but the CLI's --output always defaulted to a path with no way to
opt out. Add --dry-run to the curate subcommand, mutually exclusive with
--output, passing output=None down to the library.

CurationReport.summary() also printed the literal "manifest: None (...)"
in that case; render "manifest: (not written; dry run)" instead.
@github-actions

Copy link
Copy Markdown

👋 Hi @chintondutta — thanks for the contribution! To keep starter issues available
for other contributors and give every pull request a real review, we accept
1 open pull request per contributor at a time.

You already have #52 open, so this one is being closed automatically.
Once your open pull request is merged or closed, feel free to reopen this one —
no work is lost.

@github-actions github-actions Bot closed this Aug 20, 2026
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: add hflow curate --dry-run and fix manifest: None in the report

1 participant