Restore incremental Cython builds in Makefile#2902
Conversation
|
The extended description for the commit causing this behavior explains: We may be able to undo this change (as done in this PR) with the latest Julia installation system. The CI will tell us shortly (the |
81a6163 to
9ea1e25
Compare
Regression Testing Results
Detailed regression test results.Regression test aromatics:Reference: Execution time (DD:HH:MM:SS): 00:00:00:53 aromatics Passed Core Comparison ✅Original model has 15 species. aromatics Failed Edge Comparison ❌Original model has 106 species. Non-identical thermo! ❌
thermo: Thermo group additivity estimation: group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cs-(Cds-Cds)(Cds-Cds)CsH) + group(Cs-CsCsHH) + group(Cds-CdsCsCs) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + Estimated bicyclic component: polycyclic(s2_3_5_ane) - ring(Cyclopropane) - ring(Cyclopentane) + ring(Cyclopentene) + ring(Cyclopropane) + polycyclic(s2_3_6_ene_1) + polycyclic(s3_5_6_diene_1_5) - ring(Cyclopropane) - ring(Cyclopentene) - ring(Cyclohexene) + radical(cyclopentene-4) Non-identical thermo! ❌
thermo: Thermo group additivity estimation: group(Cs-CsCsCsH) + group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)CsCsH) + group(Cs-(Cds-Cds)CsHH) + group(Cds- Cds(Cds-Cds)Cs) + group(Cds-CdsCsH) + group(Cds-CdsCsH) + group(Cds-Cds(Cds-Cds)H) + polycyclic(s2_3_5_ene_1) + polycyclic(s2_3_6_ene_1) + Estimated bicyclic component: polycyclic(s3_5_6_ane) - ring(Cyclopentane) - ring(Cyclohexane) + ring(Cyclopentene) + ring(Cyclohexene) - ring(Cyclopropane) - ring(Cyclopentene) - ring(Cyclohexene) + radical(cyclopentene-allyl) Non-identical kinetics! ❌
kinetics: Non-identical kinetics! ❌
kinetics: Non-identical kinetics! ❌
kinetics: Non-identical kinetics! ❌
kinetics: DetailsObservables Test Case: Aromatics Comparison✅ All Observables varied by less than 0.500 on average between old model and new model in all conditions! aromatics Passed Observable Testing ✅Regression test liquid_oxidation:Reference: Execution time (DD:HH:MM:SS): 00:00:01:53 liquid_oxidation Passed Core Comparison ✅Original model has 37 species. liquid_oxidation Failed Edge Comparison ❌Original model has 214 species. Non-identical kinetics! ❌
kinetics: DetailsObservables Test Case: liquid_oxidation Comparison✅ All Observables varied by less than 0.100 on average between old model and new model in all conditions! liquid_oxidation Passed Observable Testing ✅Regression test nitrogen:Reference: Execution time (DD:HH:MM:SS): 00:00:00:59 nitrogen Passed Core Comparison ✅Original model has 41 species. nitrogen Failed Edge Comparison ❌Original model has 133 species. Non-identical thermo! ❌
thermo: Thermo group additivity estimation: group(O2s-CdN3d) + group(N3d-OCd) + group(Cd-HN3dO) + ring(Cyclopropene) + radical(CdJ-NdO) Non-identical kinetics! ❌
kinetics: DetailsObservables Test Case: NC Comparison✅ All Observables varied by less than 0.200 on average between old model and new model in all conditions! nitrogen Passed Observable Testing ✅Regression test oxidation:Reference: Execution time (DD:HH:MM:SS): 00:00:01:39 oxidation Passed Core Comparison ✅Original model has 59 species. oxidation Passed Edge Comparison ✅Original model has 230 species. DetailsObservables Test Case: Oxidation Comparison✅ All Observables varied by less than 0.500 on average between old model and new model in all conditions! oxidation Passed Observable Testing ✅Errors occurred during observable testing
WARNING:root:Initial mole fractions do not sum to one; normalizing.
|
|
I've moved the Conda-build related commits onto #2900, to see if that fixes the conda build that is failing there (and everywhere else). That PR should be merged first, then this rebased. |
The goal is that `make` will install it if needed (with an editable install, which just links to the current source), but if it's already installed, then it'll just do an incremental build. Although calling setuptools directly is deprecated, it is one of the only clean ways to get incremental builds of the cython modules.
Node.js 20 actions are deprecated. The following actions are running on Node.js 20 and may not work as expected: actions/checkout@v4, conda-incubator/setup-miniconda@v3. Actions will be forced to run with Node.js 24 by default starting June 2nd, 2026 Unfortunately there is not yet a newer version of setup-miniconda than v3, although the main branch has been updated to Node.js 24 so it might not be long until they release v4. This also addresses that `auto-activate-base` is deprecated in Setup Miniforge.
9ea1e25 to
6d1a385
Compare
Issue
As described in #2901,
makewas invokingpip install -e .on every run, causing full recompilation of all Cython extensions regardless of what changed. This replaces it withsetup.py build_ext --inplace, which respects timestamps and only rebuilds modified extensions.Changes
buildtarget (new): runspython setup.py build_ext --inplacefor incremental compilationinstalltarget (mostly unchanged) still runspip install --no-build-isolation -vv -e .for initial setup or dependency changes. Creates a sentinel file to indicate that it's installed.alltarget (default): installs if it is not already installed (first time, or after aclean), but otherwise runs the incrementalbuild. Uses the sentinel file to tell whether it's installed.cleantarget: uninstalls and deletes the sentinel file.Result
Running
makeonce installs it.Running
maketwice without source changes no longer triggers recompilation.Running
makeafter editing a single cythonized source file triggers recompilation of only that file, and it is then used in the "installed" version.Testing
The above results work on my machine.
eg. add the line
print("TESTING - LOADING MOLECULE MODULE")near the top ofrmgpy/molecule/molecule.pythen runmake eg0and this one file will be Cythonized, compiled, and the example will run, outputtingTESTING - LOADING MOLECULE MODULEnear the top of its output.Also:
Updated some outdated actions in Github Workflows.
The CI tests currently take 5+ hours, so rather than wait a whole workday for a separate pull request, I'm adding this loosely-related commit to this PR.
Authorship
First commit was by the github co-pilot (who is credited as the author of the pull request) but subsequent ones by @rwest (with some guidance from Claude and copilot)
Fixes #2901