fix(robustness): warn on unused adapter flags, reject empty dirs, catch malformed YAML#17
Merged
fix(robustness): warn on unused adapter flags, reject empty dirs, catch malformed YAML#17
Conversation
- Post-mortems: cross-adapter flags, empty directory, YAML traceback leak - Feature file: 6 BDD scenarios across 3 rules - Interview notes, event storming addendum, test stubs
…ch malformed YAML - Warn on stderr when adapter flags irrelevant to selected format are used - Error exit code 1 when exporting from empty or non-YAML directory - Catch yaml.YAMLError across all commands with single-line error - Add accepted_options() to FlowExporter Protocol - Extract _run_command() helper to reduce main() complexity @a1b2c3d4 @e5f6a7b8 @c9d0e1f2 @a3b4c5d6 @e7f8a9b0 @c1d2e3f4
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.
Summary
Three post-PR robustness fixes for the export command and CLI error handling:
--flatwith--format mermaidnow prints a warning to stderr listing unused flag names instead of silently ignoring them[]yaml.YAMLErrorand print a single-line error with no traceback (pre-existing defect)Changes
flowr/__main__.py: added_run_command()helper, unused-flag warning in_cmd_export, empty-directory check,yaml.YAMLErrorcatch for export and general command pathsflowr/domain/export.py: addedaccepted_options()toFlowExporterProtocolflowr/exporters/json_exporter.py: implementedaccepted_options()returning["flat", "no_attrs"]flowr/exporters/mermaid_exporter.py: implementedaccepted_options()returning["no_conditions"]Test Coverage
tests/features/export_robustness/a1b2c3d4,e5f6a7b8,c9d0e1f2,a3b4c5d6,e7f8a9b0,c1d2e3f4Post-Mortems Addressed