Skip to content

Fix review feedback and refresh README - #8

Merged
Spiffical merged 1 commit into
masterfrom
agent/fix-review-feedback-and-readme
Jul 15, 2026
Merged

Fix review feedback and refresh README#8
Spiffical merged 1 commit into
masterfrom
agent/fix-review-feedback-and-readme

Conversation

@Spiffical

Copy link
Copy Markdown
Owner

What changed

  • refresh the README with both spectrogram workflows, event-mode examples, accurate output paths, and current troubleshooting guidance
  • reject output_stem values that contain paths or file extensions
  • report invalid event-mode CLI arguments through argparse without a traceback
  • correct timeline and calendar documentation to define availability as archived interval-overlap time
  • add regression tests for output naming and CLI error behavior

Why

Recent review comments identified two user-facing correctness issues in filename handling and CLI errors, plus inaccurate documentation of the availability metric. The README also needed to reflect the newly merged event and JSON workflows.

User impact

Invalid output stems now fail clearly instead of creating doubled extensions, CLI argument mistakes produce concise usage errors, and coverage values are documented according to their actual time-overlap calculation.

Validation

  • 64 passed, 2 deselected
  • mkdocs build --strict
  • four README Python examples parsed successfully
  • documented event CLI flags verified
  • git diff --check

@Spiffical
Spiffical marked this pull request as ready for review July 15, 2026 15:42
Copilot AI review requested due to automatic review settings July 15, 2026 15:42
@Spiffical
Spiffical merged commit af598c2 into master Jul 15, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request addresses prior review feedback by tightening spectrogram output naming rules, improving CLI error reporting for event-mode arguments, and refreshing documentation to reflect current workflows and availability semantics.

Changes:

  • Add validation to reject output_stem values that include paths or extensions, with regression tests.
  • Convert event-mode CLI argument validation to argparse errors (exit code 2) rather than raising exceptions.
  • Refresh README and inventory docs to reflect current workflows and define availability/coverage as archived interval overlap.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
onc_hydrophone_data/audio/spectrogram_generator.py Validates output_stem early to prevent path traversal and doubled extensions; updates docstring.
scripts/generate_spectrograms.py Adds argparse-based validation for event-mode CLI flag combinations/values.
tests/test_spectrogram_generator.py Adds regression tests ensuring invalid output_stem is rejected before creating output directories.
tests/test_generate_spectrograms_cli.py Adds subprocess-based CLI tests asserting clean argparse errors without tracebacks.
README.md / docs/inventory.md Updates documentation/examples for current workflows and correct coverage definition.

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

Comment on lines 655 to +657
args = parser.parse_args()

if args.event_time is not None:
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.

2 participants