Skip to content

T3 Migration#164

Merged
alongd merged 38 commits intomainfrom
migration
Apr 9, 2026
Merged

T3 Migration#164
alongd merged 38 commits intomainfrom
migration

Conversation

@alongd
Copy link
Copy Markdown
Member

@alongd alongd commented Feb 8, 2026

An overhaul of the T3 repo

Copy link
Copy Markdown

Copilot AI left a comment

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 performs a broad “T3 Migration” overhaul focused on reducing direct RMG-Py coupling, standardizing simulation adapters around a shared Cantera base, and modernizing packaging/CI + test fixtures to match the new architecture.

Changes:

  • Introduces Cantera-based simulate adapters (TP/HP/UV + PFR) with a shared CanteraBase, plus a lightweight Cantera YAML parser and an RMG SA CSV parser that avoid rmgpy at runtime.
  • Refactors the RMGConstantTP adapter to run SA via an incore subprocess script and YAML output, and updates writer/schema/tests accordingly.
  • Updates repo packaging/CI/devtools and refreshes test data/fixtures for the new simulate + SA workflows.

Reviewed changes

Copilot reviewed 76 out of 94 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/test_utils/test_writer.py Updates expected RMG input writing behavior (pydantic model_dump, simulator args, adapter name changes).
tests/test_utils/test_libraries.py Adds new unit tests for library append + atomic dictionary update behavior using shim APIs.
tests/test_utils/test_generator.py Migrates radical generation tests from rmgpy.Species to T3Species.
tests/test_utils/test_fix_cantera.py Adds tests for Cantera file fix utilities + traceback parsing.
tests/test_utils/test_cantera_parser.py Adds test coverage for new Cantera YAML parser (species/reactions/thermo comment parsing).
tests/test_simulate/test_cantera_constant_uv.py Adds Cantera constant-U/V adapter simulation tests.
tests/test_simulate/test_cantera_constant_hp.py Adds Cantera constant-H/P adapter simulation tests.
tests/test_simulate/test_cantera_base.py Adds comprehensive tests for shared CanteraBase behavior and regression fixes.
tests/test_simulate/data/rms_simulator_test/input.yml Adds RMS simulator test input fixture.
tests/test_simulate/data/rmg_simulator_test/iteration_0/SA/solver/simulation_1_12.csv Adds RMG SA fixture output (simulation profile).
tests/test_simulate/data/rmg_simulator_test/iteration_0/SA/solver/sensitivity_1_SPC_4.csv Adds RMG SA fixture output (OH observable).
tests/test_simulate/data/rmg_simulator_test/iteration_0/SA/solver/sensitivity_1_SPC_3.csv Adds RMG SA fixture output (H observable).
tests/test_simulate/data/rmg_simulator_test/iteration_0/RMG/solver/simulation_1_12.csv Adds RMG fixture output (simulation profile).
tests/test_simulate/data/rmg_simulator_test/iteration_0/RMG/input.py Updates stored RMG input fixture (simulator/options changes).
tests/test_simulate/data/rmg_simulator_test/iteration_0/RMG/chemkin/species_dictionary.txt Adds fixture species dictionary for RMG/Cantera tests.
tests/test_simulate/data/rmg_simulator_test/input.yml Adds RMG simulator test input fixture.
tests/test_simulate/data/cantera_simulator_test/iteration_0/RMG/input.py Adds fixture RMG input used by Cantera simulate tests.
tests/test_simulate/data/cantera_simulator_test/iteration_0/RMG/chemkin/species_dictionary.txt Adds fixture species dictionary used by Cantera simulate tests.
tests/test_simulate/data/cantera_simulator_test/input.yml Adds Cantera simulator test input fixture.
tests/test_simulate_adapters/test_rmg_constantTP.py Removes legacy adapter tests (superseded by new simulate test suite).
tests/test_simulate_adapters/data/rmg_simulator_test_ranges_3c/t3.log Removes legacy log fixture.
tests/test_schema.py Updates schema tests for adapter defaults and termination_time typing.
tests/test_runners/test_rmg_runner.py Updates expected submit/run commands from python-jl to python.
tests/test_libraries.py Removes old rmgpy-dependent library tests (replaced by shim-based tests).
tests/test_functional.py Updates functional tests/log assertions for the migrated workflow and makes backup test more isolated.
tests/test_common.py Updates common tests to use T3Species and adds YAML key-ordering + /dH[ SA header parsing tests.
tests/data/pdep_network/iteration_1/PDep_SA/network4_2/CSE/chem.inp Adds/updates fixture file for pdep network tests.
tests/data/models/test_species_dictionary.txt Adds fixture RMG species dictionary for Cantera parser tests.
tests/data/models/test_cantera_parser.yaml Adds fixture Cantera YAML for parser tests.
tests/data/functional_2_thermo/input.yml Renames functional test project fixture.
tests/common.py Updates test helpers (ARC Molecule import, radical checks, forces CanteraConstantTP in run_minimal).
tests/check_t3_path.py Adds debug helper script to print import path.
t3/utils/writer.py Refactors species object creation to T3Species, fixes tolerance fallback logic, and adds get_species_obj_from_a_species_dict.
t3/utils/rmg_sa_parser.py Adds a lightweight RMG SA CSV parser and converter to standardized sa_dict without rmgpy.
t3/utils/generator.py Migrates radical generation implementation to ARC molecule objects + T3Species.
t3/utils/flux.py Updates defaults/API usage for Cantera and simplifies ROP accumulation logic + graph output writing.
t3/utils/dependencies.py Simplifies dependency checks (ARC-only in t3_env).
t3/utils/cantera_parser.py Adds a lightweight Cantera YAML parser that produces T3Species/T3Reaction.
t3/simulate/rmg_constantTP.py Removes legacy in-process RMG adapter implementation.
t3/simulate/rmg_constant_tp.py Adds new RMGConstantTP adapter that runs SA via subprocess incore script and YAML output.
t3/simulate/factory.py Minor refactor of factory construction and docstrings.
t3/simulate/cantera_pfr.py Adds a Cantera PFR adapter (lagrangian + chain-of-reactors modes).
t3/simulate/cantera_constant_uv.py Adds Cantera constant UV adapter.
t3/simulate/cantera_constant_tp.py Adds Cantera constant TP adapter.
t3/simulate/cantera_constant_hp.py Adds Cantera constant HP adapter.
t3/simulate/init.py Updates simulate module exports to new adapter modules/base.
t3/settings/t3_submit.py Updates template scripts to run via python instead of python-jl.
t3/runners/rmg_runner.py Updates incore RMG command to python and adds Arkane runner + RMG SA incore runner helper.
t3/runners/rmg_incore_script.py Updates docs/exception list to match current RMG errors and python invocation.
t3/runners/rmg_incore_sa.py Adds incore RMG SA runner script producing YAML output.
t3/logger.py Migrates logger summaries to use T3Species/T3Reaction objects and adds clean_t3_status.
t3/common.py Bumps version, adds SA (de)serialization helpers, adds YAML saving with key ordering, updates SA header parsing.
requirements.txt Updates python dependency set (adds Cantera, bumps numpy/cython/rdkit, etc.).
pyproject.toml Adds packaging metadata for setuptools build.
Makefile Updates install targets (renames PyRMS to PyRDL install).
ipython/sa_coefficients_viewer.ipynb Adds notebook for visualizing SA coefficient YAML output.
examples/minimal/input.yml Switches minimal example SA adapter default and updates QM job_types fields.
environment.yml Major environment modernization (Python 3.12+, Cantera 3.2+, numpy 2.1+, revised channels/deps).
devtools/install_pyrms.sh Removes old PyRMS installer.
devtools/install_pyrdl.sh Adds wrapper installer delegating to ARC’s PyRDL installer.
devtools/install_arc.sh Removes old combined ARC/RMG installation script.
devtools/install_all.sh Updates “install all” workflow and adds PyRDL installation step.
.github/workflows/cont_int.yml Removes legacy CI workflow.
.github/workflows/ci.yml Adds new CI workflow using micromamba + ARC + RMG-database checkout.
Comments suppressed due to low confidence (1)

t3/utils/flux.py:195

  • get_profiles_from_simulation() now defaults V=100, but generate_flux() always forwards its V argument (defaulting to None). For JSR runs this still passes None into run_jsr()/set_jsr() and will raise a TypeError when computing volume=V * 1e-6. Consider treating V=None as “use default volume” (e.g., only pass V through when it’s not None, or default generate_flux(..., V=100) / handle None inside set_jsr).

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

Comment thread t3/utils/flux.py
Comment thread t3/utils/writer.py
Comment thread t3/utils/writer.py
Comment thread pyproject.toml
Comment thread tests/test_utils/test_fix_cantera.py
@alongd alongd requested a review from Copilot April 4, 2026 20:13
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 89 out of 111 changed files in this pull request and generated 14 comments.


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

Comment thread t3/utils/cantera_parser.py Outdated
Comment thread t3/utils/cantera_parser.py Outdated
Comment thread t3/utils/cantera_parser.py
Comment thread t3/utils/flux.py Outdated
Comment thread t3/simulate/rmg_constant_tp.py
Comment thread tests/check_t3_path.py Outdated
Comment thread t3/utils/dependencies.py Outdated
Comment thread t3/utils/rmg_sa_parser.py
Comment thread t3/utils/flux.py
Comment thread tests/test_utils/test_fix_cantera.py Outdated
@alongd alongd force-pushed the migration branch 7 times, most recently from d8d964e to ae7a206 Compare April 7, 2026 11:41
alongd added 27 commits April 9, 2026 09:05
- Configure build system using setuptools and wheel.
- Define project metadata (name, description, python requires).
- Enable dynamic versioning reading from `t3.common.VERSION`.
- Explicitly configure package discovery to include `t3*`.
- Allow `pip install -e .` to function correctly in development and CI.
working with real RMG libraries
Minor modifications to simulate factory

And updated simulate __init__.py
Added dependabot, removed labeler
updated codeql, gh-pages
@alongd alongd merged commit 6018ec9 into main Apr 9, 2026
2 checks passed
@alongd alongd deleted the migration branch April 9, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants