From 78f9b808d2d52e34d612348b3f3aec1e957d9764 Mon Sep 17 00:00:00 2001 From: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:25:33 -0500 Subject: [PATCH 1/6] forbid incompatible numpy version --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index a5e272232d..3713affd05 100644 --- a/environment.yml +++ b/environment.yml @@ -59,7 +59,7 @@ dependencies: - conda-forge::cython >=0.25.2 - conda-forge::scikit-learn - conda-forge::scipy >=1.9 - - conda-forge::numpy >=1.10.0 + - conda-forge::numpy >=1.10.0,<2 - conda-forge::pydot - conda-forge::jinja2 - conda-forge::jupyter From abcd453e065cce28bffe3d9277126eb4148dd524 Mon Sep 17 00:00:00 2001 From: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:25:56 -0500 Subject: [PATCH 2/6] run ci on arm macs natively --- .github/workflows/CI.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2d09a850fd..14b8d50f04 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -58,8 +58,6 @@ jobs: os: [macos-13, macos-latest, ubuntu-latest] include-rms: ["", "with RMS"] exclude: - - os: macos-latest # needs Cantera 3 b/c x86 emulation breaks with Julia - include-rms: 'with RMS' - os: macos-13 # GitHub's runners just aren't up to the task of installing Julia include-rms: 'with RMS' runs-on: ${{ matrix.os }} @@ -73,10 +71,6 @@ jobs: - name: Checkout RMG-Py uses: actions/checkout@v4 - - name: Compel Arm-based Mac to use x86 - if: matrix.os == 'macos-latest' - run: echo "CONDA_SUBDIR=osx-64" >> $GITHUB_ENV - - name: Setup Miniforge Python ${{ matrix.python-version }} uses: conda-incubator/setup-miniconda@v3 with: From bb62a47cf8b8f32269e719ce270efb5d861c24b4 Mon Sep 17 00:00:00 2001 From: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:26:26 -0500 Subject: [PATCH 3/6] get cantera from conda-forge, which has arm mac binaries https://anaconda.org/conda-forge/cantera/files?page=3&version=2.6.0 --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 3713affd05..a8d4525933 100644 --- a/environment.yml +++ b/environment.yml @@ -46,7 +46,7 @@ dependencies: # external software tools for chemistry - conda-forge::coolprop - - cantera::cantera =2.6 + - conda-forge::cantera =2.6 - conda-forge::mopac # see https://github.com/ReactionMechanismGenerator/RMG-Py/pull/2639#issuecomment-2050292972 - conda-forge::cclib >=1.6.3,<1.9 From 784c8e9e942c2751cacfec0cd2dc4b704f4a3820 Mon Sep 17 00:00:00 2001 From: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:31:45 -0500 Subject: [PATCH 4/6] remove cantera channel from environment file --- environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment.yml b/environment.yml index a8d4525933..741ab7afdb 100644 --- a/environment.yml +++ b/environment.yml @@ -25,7 +25,6 @@ name: rmg_env channels: - conda-forge - - cantera - rmg dependencies: # System-level dependencies - we could install these at the OS level From 0e7f83973d7dca6d37dbc8d012e135129e26a800 Mon Sep 17 00:00:00 2001 From: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com> Date: Tue, 25 Feb 2025 12:34:52 -0500 Subject: [PATCH 5/6] don't patch the channels in the CI this is handled in the env file --- .github/workflows/CI.yml | 2 -- .github/workflows/docs.yml | 1 - 2 files changed, 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 14b8d50f04..1fa7d32b7e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -81,7 +81,6 @@ jobs: activate-environment: rmg_env auto-update-conda: true show-channel-urls: true - channels: conda-forge,cantera,rmg conda-remove-defaults: "true" # list the environment for debugging purposes @@ -158,7 +157,6 @@ jobs: activate-environment: rmg_env auto-update-conda: true show-channel-urls: true - channels: conda-forge,cantera,rmg conda-remove-defaults: "true" # list the environment for debugging purposes diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 084224f954..693803d4db 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -36,7 +36,6 @@ jobs: activate-environment: rmg_env use-mamba: true show-channel-urls: true - channels: conda-forge,cantera,rmg - name: Install sphinx run: mamba install -y sphinx From a101ec42f22cb1340a4d08c3d7a56e72e18039ea Mon Sep 17 00:00:00 2001 From: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com> Date: Tue, 25 Feb 2025 14:07:46 -0500 Subject: [PATCH 6/6] change lt to leq to account for slightly different arm mac floating point result --- test/rmgpy/solver/liquidTest.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/rmgpy/solver/liquidTest.py b/test/rmgpy/solver/liquidTest.py index 3559a595b3..1dc2c5eb2a 100644 --- a/test/rmgpy/solver/liquidTest.py +++ b/test/rmgpy/solver/liquidTest.py @@ -167,21 +167,21 @@ def test_compute_flux(self): # Check that we're computing the species fluxes correctly for i in range(t.shape[0]): - assert abs(reaction_rates[i, 0] - species_rates[i, 0]) < abs( + assert abs(reaction_rates[i, 0] - species_rates[i, 0]) <= abs( 1e-6 * reaction_rates[i, 0] ) - assert abs(reaction_rates[i, 0] - -species_rates[i, 1]) < abs( + assert abs(reaction_rates[i, 0] - -species_rates[i, 1]) <= abs( 1e-6 * reaction_rates[i, 0] ) - assert abs(reaction_rates[i, 0] - -species_rates[i, 2]) < abs( + assert abs(reaction_rates[i, 0] - -species_rates[i, 2]) <= abs( 1e-6 * reaction_rates[i, 0] ) - assert abs(reaction_rates[i, 0] - species_rates[i, 3]) < abs( + assert abs(reaction_rates[i, 0] - species_rates[i, 3]) <= abs( 1e-6 * reaction_rates[i, 0] ) # Check that we've reached equilibrium - assert abs(reaction_rates[-1, 0] - 0.0) < 1e-2 + assert abs(reaction_rates[-1, 0] - 0.0) <= 1e-2 def test_jacobian(self): """