Skip to content

Autoreduce v0.9 - #30

Merged
ayush9pandey merged 35 commits into
mainfrom
v1.0
Aug 11, 2026
Merged

Autoreduce v0.9#30
ayush9pandey merged 35 commits into
mainfrom
v1.0

Conversation

@ayush9pandey

@ayush9pandey ayush9pandey commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

This PR proposes a major refactor and feature enhancement for AutoReduce:

  • A revised source code structure that creates modules called System, Reduce, SSM, Solver.
  • New compatibility modes for model imports: python-control NonlinearIOSystem, pyDMD system, SBML (as before)
  • New examples from different application areas. Now in refactored examples folders: biological, ecological, canonical (standard examples), and cyber-physical. Credit: Jenny Tang
  • A new test suite to validate new model reduction methods against standard set of model reduction examples. Credit: Jenny Tang
  • Readthedocs documentation that includes examples, description of methods, and an API reference.
  • CI/CD for package version control and for pypi updates
  • Linting with ruff

@ayush9pandey

Copy link
Copy Markdown
Collaborator Author

@copilot review if changes described above are correctly implemented in the branch that will be merged. Note items to fix.

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@copilot review if changes described above are correctly implemented in the branch that will be merged. Note items to fix.

Here is a review of each item in the PR description against the current branch:


✅ Revised source code structure with modules System, Reduce, SSM, Solver
All four modules are present:

  • Systemautoreduce/system/system.py
  • Reduceautoreduce/reductions/timescale.py
  • SSMautoreduce/solvers/ssm.py
  • Solver (ODE) → autoreduce/solvers/ode.py

✅ New compatibility modes: python-control NonlinearIOSystem, pyDMD, SBML

  • python-control adapter: autoreduce/system/control.py with from_nonlinear_io_system()
  • pyDMD reduction: autoreduce/reductions/projection/dmd.py with fit_dmd() and fit_dmdc()
  • SBML: System.generate_sbml_model() / System.write_sbml() in system.py

⚠️ New examples from biological, ecological, canonical, and cyber-physical

  • examples/biological/ — ✅ present (6 notebooks + models)
  • examples/ecological/ — ✅ present (Viral spread.ipynb)
  • examples/canonical/ — ✅ present (Michaelis-Menten.ipynb, Parameter sensitivity.ipynb)
  • examples/cyber-physical/ — ❌ missing — PR description says a cyber-physical folder should exist but it is not in the repository.

⚠️ pyDMD model reduction: example demonstration in examples/canonical/
The DMD module (autoreduce/reductions/projection/dmd.py) is implemented, but there is no notebook in examples/canonical/ demonstrating its use. The PR description explicitly states "Example demonstration in examples/canonical" for this feature.


✅ New test suite
Multiple test files covering system objects, ODE solvers, time-scale separation, and optional integrations (control adapter and pyDMD). All 19 tests pass (2 skipped for missing optional deps).


✅ Readthedocs documentation
docs/ with Sphinx config, .readthedocs.yaml, and nblink files pointing to examples. API references for systems, reductions, and solvers are in place.


✅ CI/CD for package version control and PyPI updates
Four workflows: test.yml, build.yml, lint.yml, and pypi-deploy.yml are all configured correctly.


Items to fix:

  1. examples/cyber-physical/ folder is missing — add the cyber-physical example(s) described in the PR.
  2. No DMD example notebook in examples/canonical/ — add a notebook demonstrating the pyDMD-based reduction (fit_dmd / fit_dmdc) on a standard example.

@ayush9pandey

Copy link
Copy Markdown
Collaborator Author

Merging this PR will fix #10, #11, #13, #17, #18, #20, #21, #28 (and finish v0.9 milestone: https://github.com/ctsd-lab/AutoReduce/milestone/1)

@ayush9pandey ayush9pandey changed the title Autoreduce v1.0 Autoreduce v0.9 Aug 11, 2026
@ayush9pandey

Copy link
Copy Markdown
Collaborator Author

@copilot review

Co-authored-by: ayush9pandey <8139195+ayush9pandey@users.noreply.github.com>

Copilot AI commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@copilot review

Here is the updated review against the current branch:


✅ Revised source code structure with modules System, Reduce, SSM, Solver
All present: autoreduce/system/system.py (System), autoreduce/reductions/core.py (Reduce), autoreduce/solvers/ssm.py (SSM), autoreduce/solvers/ode.py (ODE). Public API is cleanly exported from autoreduce/__init__.py.


✅ New compatibility modes: python-control NonlinearIOSystem, pyDMD, SBML
All three adapters are implemented and tested.


✅ New examples: biological, ecological, canonical, and cyber-physical
All four folders now exist:

  • examples/biological/ — 5 notebooks
  • examples/ecological/Viral spread.ipynb
  • examples/canonical/Michaelis Menten.ipynb, Parameter sensitivity.ipynb, QSS control input.ipynb
  • examples/cyber-physical/Motor control.ipynb

✅ New test suite
43 tests pass, 2 skipped (for optional deps). Covers system objects, ODE solver, time-scale separation, conservation laws, converters, and optional integrations.


✅ Readthedocs documentation
docs/ with Sphinx config, .readthedocs.yaml, and nblink files for 7 example notebooks.


✅ CI/CD for package version control and PyPI updates
Workflows: test.yml, build.yml, lint.yml, pypi-deploy.yml all configured.


✅ Linting with ruff
One import-sort error in tests/test_converters.py was fixed in ec3c088. ruff check autoreduce tests now passes clean.


All checklist items in the PR description are implemented. No blocking issues found.

@ayush9pandey
ayush9pandey merged commit 68c09a9 into main Aug 11, 2026
3 checks passed
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.

3 participants