cli: add hflow curate --dry-run; fix manifest: None in the report - #58
Closed
chintondutta wants to merge 1 commit into
Closed
cli: add hflow curate --dry-run; fix manifest: None in the report#58chintondutta wants to merge 1 commit into
chintondutta wants to merge 1 commit into
Conversation
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.
|
👋 Hi @chintondutta — thanks for the contribution! To keep starter issues available You already have #52 open, so this one is being closed automatically. |
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.
Fixes #8.
Two related rough edges
curate(...)already documents: "Withoutput=Nonethe query still runs (row count + coverage reporting) but nothing is written." But--outputalways defaulted to./data/manifest.parquetwith no way to opt out.Nonecase badly.CurationReport.summary()printed the literalmanifest: None (12 rows, from 40 cataloged episodes)when no manifest was written.Change
--dry-runto thecuratesubparser, in a mutually exclusive group with--output(add_mutually_exclusive_group(), as suggested in the issue)._command_curatepassesoutput=Nonetocurate()when set.CurationReport.summary()now branches onmanifest_path is Noneand rendersmanifest: (not written; dry run)instead of theNoneliteral.Testing
Two new tests in
tests/test_catalog_curation.py:test_cli_curate_dry_run_prints_without_writing:hflow curate ... --dry-runprints row count and coverage, and the summary readsmanifest: (not written; dry run)with no literalNoneanywhere in the output.test_cli_curate_rejects_dry_run_with_output:--dry-run --output x.parquettogether raisesSystemExit(2)from argparse (matching the existing pattern for--profileintest_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