Skip to content

Make generation the default CLI action, copy via a switch - #48

Merged
kwabenantim merged 2 commits into
developfrom
flatten-cli-default-generate
Aug 12, 2026
Merged

Make generation the default CLI action, copy via a switch#48
kwabenantim merged 2 commits into
developfrom
flatten-cli-default-generate

Conversation

@kwabenantim

@kwabenantim kwabenantim commented Aug 12, 2026

Copy link
Copy Markdown
Member

Follow-up to enhance #39.

chaste-sbml FILE ... should generate by default without having to add a generate sub-command. Use a --copy-base-classes switch to emit the base classes instead of an extra copy-base-classes subcommand.

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (dd3eb1a) to head (1dc0b0e).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
cpp 100.00% <ø> (ø)
python 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
chaste_sbml/__main__.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Makes code generation the default CLI action and exposes base-class copying through --copy-base-classes.

Changes:

  • Replaces CLI subcommands with a default generation workflow.
  • Adds validation and tests for required/exclusive SBML arguments.
  • Updates usage documentation and packaging comments.

Reviewed changes

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

Show a summary per file
File Description
README.md Documents the revised CLI.
pyproject.toml Updates the package-data comment.
chaste_sbml/__main__.py Implements the flat CLI interface.
chaste_sbml/tests/test_cli.py Updates in-process CLI tests.
chaste_sbml/tests/test_console.py Updates console integration tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread chaste_sbml/__main__.py Outdated
@kwabenantim
kwabenantim force-pushed the flatten-cli-default-generate branch from cebe4aa to 733f0a1 Compare August 12, 2026 15:04
@kwabenantim
kwabenantim marked this pull request as ready for review August 12, 2026 15:05
@kwabenantim kwabenantim linked an issue Aug 12, 2026 that may be closed by this pull request
kwabenantim and others added 2 commits August 12, 2026 16:34
Flatten the generate/copy-base-classes subcommands introduced in #39 back
to a single command: generating from an SBML file is the default, and
--copy-base-classes switches to copying the C++ base classes instead.

The SBML file becomes an optional positional; an SBML file is required
unless --copy-base-classes is given, and --copy-base-classes rejects a
stray SBML file. Update the CLI tests, the README usage section, and the
pyproject.toml comment to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy mode takes only --output-dir, but the flat parser accepted and
silently ignored generation-only options (--model-type, --tests,
--timescale, --test-output-dir). Give those options default=SUPPRESS so a
missing attribute reliably means "not supplied", then report a usage error
in copy mode when an SBML file or any of them is passed, and fill in the
real defaults when generating. Restore the rejection test and document the
behaviour.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kwabenantim
kwabenantim force-pushed the flatten-cli-default-generate branch from 733f0a1 to 1dc0b0e Compare August 12, 2026 15:34
@kwabenantim
kwabenantim merged commit 405b596 into develop Aug 12, 2026
18 of 19 checks passed
@kwabenantim
kwabenantim deleted the flatten-cli-default-generate branch August 12, 2026 17:10
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.

Package helper classes

2 participants