Uh oh!
There was an error while loading. Please reload this page.
updating summarize cli for consistency with other subcmds. - #360
Conversation
a3cbe6c to
c2c8f08Comparemarcverhagen
commented
Feb 11, 2026
Out of curiosity: what was wrong with the type hint in summarize.main? |
… (see CONTRIBUTING.md)
c2c8f08 to
ad5d0d3Comparekeighrim
commented
Feb 11, 2026
Nothing, I guess...? Probably due to copy-paste I did from other CLI modules. I reverted the change in the new force-push. |
There was a problem hiding this comment.
Pull request overview
Aligns the mmif summarize subcommand’s CLI interface with other mmif CLI tools by standardizing input/output handling (positional input w/ STDIN support, optional output defaulting to STDOUT, and pretty printing), and centralizing stream opening/closing to avoid resource leaks.
Changes:
- Refactors
summarizeto accept positional input (or STDIN), optional-o/--output(or STDOUT), and-p/--pretty. - Introduces
open_cli_io_arghelper and migrates other CLI subcommands (describe,rewind,source) to use it. - Adds/updates tests and documents the standard CLI I/O pattern in
CONTRIBUTING.md.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
mmif/utils/cli/__init__.py | Adds open_cli_io_arg context manager for consistent stdin/stdout/file handling across CLI modules. |
mmif/utils/cli/summarize.py | Updates summarize CLI to match conventions: positional input, optional output, pretty flag, stdin/stdout support. |
mmif/utils/cli/describe.py | Switches output arg to path-like + uses open_cli_io_arg for input/output handling. |
mmif/utils/cli/rewind.py | Switches MMIF_FILE/output to path-like + uses open_cli_io_arg for input/output handling. |
mmif/utils/cli/source.py | Switches output to a path-like + uses open_cli_io_arg for output handling. |
mmif/utils/summarizer/summary.py | Adds to_dict(), improves report() outfile flexibility, replaces debug prints with logging. |
tests/test_utils_cli.py | Refactors MMIF fixtures and adds a new test suite for the updated summarize CLI behavior. |
tests/mmif_examples.py | Makes sample loading path-safe via Path(__file__) instead of hard-coded relative paths. |
CONTRIBUTING.md | Documents the standardized CLI I/O argument pattern using open_cli_io_arg. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@## develop #360 +/- ##
===========================================
+ Coverage 66.58% 71.66% +5.07%
===========================================
Files 22 22 Lines 2846 2915 +69 ===========================================
+ Hits 1895 2089 +194 + Misses 951 826 -125
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f819278 to
6c09468CompareThere was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
6c09468 to
c5c3d29CompareUh oh!
There was an error while loading. Please reload this page.
fixes#359 .