Skip to content

Add copy-base-classes command and rename package to chaste-sbml#40

Merged
kwabenantim merged 1 commit into
developfrom
39-emit-base-classes
Jul 4, 2026
Merged

Add copy-base-classes command and rename package to chaste-sbml#40
kwabenantim merged 1 commit into
developfrom
39-emit-base-classes

Conversation

@kwabenantim

Copy link
Copy Markdown
Member

Summary

Supports #39

  • Add a copy-base-classes subcommand and copy_base_classes() that copy the bundled C++ base classes out of the installed package; ship them as package data.
  • Split the CLI into generate and copy-base-classes subcommands.
  • Rename the console command to chaste-sbml and the import package to chaste_sbml (distribution chaste-sbml); update imports, coverage config, CI workflows and the SbmlRefModels infra scripts.
  • Run main() under main so 'python -m chaste_sbml' works.
  • Update the README and tests.

- Add a copy-base-classes subcommand and copy_base_classes() that copy the
  bundled C++ base classes out of the installed package; ship them as package data.
- Split the CLI into generate and copy-base-classes subcommands.
- Rename the console command to chaste-sbml and the import package to chaste_sbml
  (distribution chaste-sbml); update imports, coverage config, CI workflows and the
  SbmlRefModels infra scripts.
- Run main() under __main__ so 'python -m chaste_sbml' works.
- Update the README and tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kwabenantim
kwabenantim marked this pull request as ready for review July 4, 2026 12:06
@kwabenantim
kwabenantim requested a review from Copilot July 4, 2026 12:06

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 PR renames the Python distribution/import package to chaste-sbml / chaste_sbml, adds a copy-base-classes CLI command to extract bundled C++ base/helper classes from an installed package, and expands the bundled SbmlRefModels C++ project + infra to support reference/case generation and CI.

Changes:

  • Introduces a chaste-sbml CLI with generate and copy-base-classes subcommands, plus python -m chaste_sbml support.
  • Bundles C++ base/helper classes as package data and adds Python APIs/tests to enumerate and copy them out (copy_base_classes()).
  • Renames package/imports/config (coverage, CI workflows) from chaste_codegen_sbml to chaste_sbml and adds/updates SbmlRefModels sources, tests, and infra scripts.

Reviewed changes

Copilot reviewed 21 out of 119 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Updates usage docs for new CLI/subcommands and venv setup.
pyproject.toml Renames distribution + console script; adds package-data for bundled C++ files.
.coveragerc Switches coverage source/omits to chaste_sbml.
.github/workflows/build_and_test.yml Updates CI install/test steps and Chaste project symlink path.
.github/workflows/sbml_test_suite.yml Updates SBML test-suite workflow path to new package location.
chaste_sbml/init.py Exposes copy_base_classes in the public package API.
chaste_sbml/main.py New CLI entrypoint with generate + copy-base-classes subcommands.
chaste_sbml/_base_classes.py Implements discovery/copying of bundled C++ base/helper classes.
chaste_sbml/_config.py New config/enums under renamed package.
chaste_sbml/_utils.py New utility module under renamed package.
chaste_sbml/chaste_sbml_model.py Updates Jinja PackageLoader to the new import package name.
chaste_sbml/.clang-format Adds formatting config for C++ in SbmlRefModels.
chaste_sbml/.clang-format-ignore Excludes Jinja templates from formatting.
chaste_sbml/templates/ode/ode.hpp Adds ODE C++ generation template.
chaste_sbml/templates/srn/srn.hpp Adds SRN model header generation template.
chaste_sbml/templates/srn/srn.cpp Adds SRN model source generation template.
chaste_sbml/templates/cell_cycle/cell_cycle.hpp Adds cell-cycle model header generation template.
chaste_sbml/templates/cell_cycle/cell_cycle.cpp Adds cell-cycle model source generation template.
chaste_sbml/templates/cases/semantic.hpp Adds semantic case test template.
chaste_sbml/tests/test_utils.py Updates imports to chaste_sbml.
chaste_sbml/tests/test_generation.py Updates imports to chaste_sbml.
chaste_sbml/tests/test_chaste_sbml_model.py Updates imports to chaste_sbml.
chaste_sbml/tests/test_console.py Adds tests for new chaste-sbml CLI behavior.
chaste_sbml/tests/test_base_classes.py Adds tests for base-class discovery and copying.
chaste_sbml/SbmlRefModels/CMakeLists.txt Adds Chaste project wiring for SbmlRefModels.
chaste_sbml/SbmlRefModels/README.md Documents bundled C++ project purpose.
chaste_sbml/SbmlRefModels/generate_references.py Updates generator to import chaste_sbml.
chaste_sbml/SbmlRefModels/generate_cases.py Updates generator to import chaste_sbml.
chaste_sbml/SbmlRefModels/infra/.gitignore Ignores build/output directories for infra scripts.
chaste_sbml/SbmlRefModels/infra/configure.sh Adds helper script to configure a Chaste build for the project.
chaste_sbml/SbmlRefModels/infra/compile.sh Adds helper script to build the project target.
chaste_sbml/SbmlRefModels/infra/test_references.sh Adds helper script to run reference-model tests by label/name.
chaste_sbml/SbmlRefModels/infra/test_cases.sh Adds helper script to run generated semantic tests based on status CSV/range.
chaste_sbml/SbmlRefModels/infra/reset_cases.sh Updates paths to new package location for case reset flow.
chaste_sbml/SbmlRefModels/infra/generate_references.sh Updates paths to new package location for reference generation flow.
chaste_sbml/SbmlRefModels/infra/generate_cases.sh Updates paths to new package location for case generation flow.
chaste_sbml/SbmlRefModels/infra/filter_test_suite_cases.py Adds utility to select cases + emit a ctest regex.
chaste_sbml/SbmlRefModels/infra/check_passing_cases_generated.py Adds guard to ensure “pass” cases actually generate tests.
chaste_sbml/SbmlRefModels/test/CMakeLists.txt Adds Chaste test-project definition for SbmlRefModels.
chaste_sbml/SbmlRefModels/test/.gitignore Ignores WeeklyTestPack.txt in test directory.
chaste_sbml/SbmlRefModels/test/ContinuousTestPack.txt Adds/updates the continuous test pack list.
chaste_sbml/SbmlRefModels/test/data/goldbeter_1991_srn_results.parameters Adds reference test data file.
chaste_sbml/SbmlRefModels/test/reference/TestGoldbeter1991SbmlOdeSystem.hpp Adds reference test for Goldbeter 1991 ODE system.
chaste_sbml/SbmlRefModels/test/reference/TestGardner1998SbmlCellCycleModel.hpp Adds reference test for Gardner 1998 cell-cycle model.
chaste_sbml/SbmlRefModels/test/reference/TestChen2000SbmlCellCycleModel.hpp Adds reference test for Chen 2000 cell-cycle model.
chaste_sbml/SbmlRefModels/test/reference/TestTan2014SbmlSrnModel.hpp Adds reference test for Tan 2014 SRN model.
chaste_sbml/SbmlRefModels/test/reference/TestVanLeeuwen2007SbmlSrnModel.hpp Adds reference test for van Leeuwen 2007 SRN model.
chaste_sbml/SbmlRefModels/test/reference/TestVanLeeuwen2007NonDimSbmlSrnModel.hpp Adds reference test for non-dimensional van Leeuwen 2007 SRN model.
chaste_sbml/SbmlRefModels/src/SbmlEventType.hpp Adds C++ event-type enum used by generated systems/models.
chaste_sbml/SbmlRefModels/src/SbmlMath.hpp Adds SBML math helper declarations/inline templates.
chaste_sbml/SbmlRefModels/src/SbmlMath.cpp Adds SBML math helper definitions.
chaste_sbml/SbmlRefModels/src/AbstractSbmlOdeSystem.hpp Adds abstract ODE system base with event handling hooks.
chaste_sbml/SbmlRefModels/src/AbstractSbmlOdeSystem.cpp Adds abstract ODE system base implementation.
chaste_sbml/SbmlRefModels/src/AbstractSbmlSrnModel.hpp Adds SRN base model header.
chaste_sbml/SbmlRefModels/src/AbstractSbmlSrnModel.cpp Adds SRN base model implementation.
chaste_sbml/SbmlRefModels/src/AbstractSbmlCellCycleModel.hpp Adds cell-cycle base model header.
chaste_sbml/SbmlRefModels/src/AbstractSbmlCellCycleModel.cpp Adds cell-cycle base model implementation.
chaste_sbml/SbmlRefModels/src/cases/README.md Adds placeholder docs for SBML test-suite case sources.
chaste_sbml/SbmlRefModels/src/fortests/SbmlTestOdeSolution.hpp Adds OdeSolution extension for per-step parameter recording.
chaste_sbml/SbmlRefModels/src/fortests/SbmlTestOdeSolution.cpp Implements per-step parameter recording + derived-quantity evaluation.
chaste_sbml/SbmlRefModels/src/fortests/SbmlTestHelpers.hpp Adds test helpers (CSV export, stats utilities).
chaste_sbml/SbmlRefModels/src/fortests/SbmlTestHelpers.cpp Implements CSV export + formatting helper(s).
chaste_sbml/SbmlRefModels/src/reference/README.md Adds reference-model index README.
chaste_sbml/SbmlRefModels/src/reference/Goldbeter1991/Goldbeter1991SbmlOdeSystem.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/Goldbeter1991/Goldbeter1991SbmlSrnModel.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/Goldbeter1991/Goldbeter1991SbmlSrnModel.cpp Adds reference model source implementation.
chaste_sbml/SbmlRefModels/src/reference/Gardner1998/Gardner1998SbmlOdeSystem.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/Gardner1998/Gardner1998SbmlCellCycleModel.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/Gardner1998/Gardner1998SbmlCellCycleModel.cpp Adds reference model source implementation.
chaste_sbml/SbmlRefModels/src/reference/Chen2000/Chen2000SbmlCellCycleModel.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/Chen2000/Chen2000SbmlCellCycleModel.cpp Adds reference model source implementation.
chaste_sbml/SbmlRefModels/src/reference/Chen2004/Chen2004SbmlCellCycleModel.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/Chen2004/Chen2004SbmlCellCycleModel.cpp Adds reference model source implementation.
chaste_sbml/SbmlRefModels/src/reference/Tan2014/Tan2014SbmlOdeSystem.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/Tan2014/Tan2014SbmlSrnModel.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/Tan2014/Tan2014SbmlSrnModel.cpp Adds reference model source implementation.
chaste_sbml/SbmlRefModels/src/reference/VanLeeuwen2007/VanLeeuwen2007SbmlOdeSystem.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/VanLeeuwen2007/VanLeeuwen2007SbmlSrnModel.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/VanLeeuwen2007/VanLeeuwen2007SbmlSrnModel.cpp Adds reference model source implementation.
chaste_sbml/SbmlRefModels/src/reference/VanLeeuwen2007NonDim/VanLeeuwen2007NonDimSbmlOdeSystem.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/VanLeeuwen2007NonDim/VanLeeuwen2007NonDimSbmlSrnModel.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/VanLeeuwen2007NonDim/VanLeeuwen2007NonDimSbmlSrnModel.cpp Adds reference model source implementation.
chaste_sbml/SbmlRefModels/src/reference/TysonNovak2001/TysonNovak2001SbmlOdeSystem.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/TysonNovak2001/TysonNovak2001SbmlCellCycleModel.hpp Adds reference model source header.
chaste_sbml/SbmlRefModels/src/reference/TysonNovak2001/TysonNovak2001SbmlCellCycleModel.cpp Adds reference model source implementation.
chaste_codegen_sbml/main.py Removes old single-command CLI entrypoint.
chaste_codegen_sbml/tests/test_console.py Removes old console-script tests for chaste_codegen_sbml.

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

@codecov

codecov Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 36.73469% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.19%. Comparing base (6c9f500) to head (9868042).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
chaste_sbml/__main__.py 0.00% 31 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #40      +/-   ##
===========================================
- Coverage    89.27%   89.19%   -0.09%     
===========================================
  Files           48       49       +1     
  Lines         6320     6346      +26     
===========================================
+ Hits          5642     5660      +18     
- Misses         678      686       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kwabenantim kwabenantim linked an issue Jul 4, 2026 that may be closed by this pull request
@kwabenantim
kwabenantim merged commit 7738129 into develop Jul 4, 2026
14 of 16 checks passed
@kwabenantim
kwabenantim deleted the 39-emit-base-classes branch July 4, 2026 12:37
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