Add explicit output format override#8
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds an explicit --output-format override to the conversion CLI, while preserving existing defaults per input type and rejecting unsupported input/output combinations early.
Changes:
- Introduces
--output-format {point,opensees,essi}and centralizes validation/defaulting viaresolve_output_mode(). - Refactors output file naming/copy behavior via
get_output_filename()andprepare_essi_output_file(). - Updates documentation and expands regression tests covering CLI parsing, helper behavior, and real-data conversion paths.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
convert.py |
Adds output-format override support, validation, output naming, and ESSI template preparation logic. |
README.md |
Documents default output behavior and constraints for --output-format. |
tests/test_convert_cli.py |
Adds CLI parser coverage for the new --output-format flag. |
tests/test_convert_helpers.py |
Adds unit tests for output-mode resolution and output filename behavior. |
tests/test_convert_fixture_data.py |
Adds integration/regression tests for explicit output mode support and rejection of invalid combos. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot apply changes based on the comments in this thread |
Agent-Logs-Url: https://github.com/houjun/sw4essi_converter/sessions/6072eacf-a74d-47f3-9bb3-4f070c2e3e1c Co-authored-by: houjun <3237466+houjun@users.noreply.github.com>
Implemented in commit |
Summary
Testing