Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to Python 3.11/2 #2635

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/CI.yml
Expand Up @@ -52,6 +52,10 @@ env:
jobs:
build-osx:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
# skip scheduled runs from forks
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
defaults:
Expand All @@ -62,13 +66,13 @@ jobs:
uses: actions/checkout@v3

# configures the mamba environment manager and builds the environment
- name: Setup Mambaforge Python 3.7
- name: Setup Mambaforge Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: 3.7
python-version: ${{ matrix.python-version }}
activate-environment: rmg_env
use-mamba: true

Expand Down Expand Up @@ -99,6 +103,10 @@ jobs:

build-and-test-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
# skip scheduled runs from forks
if: ${{ !( github.repository != 'ReactionMechanismGenerator/RMG-Py' && github.event_name == 'schedule' ) }}
env:
Expand All @@ -112,15 +120,13 @@ jobs:
uses: actions/checkout@v3

# configures the mamba environment manager and builds the environment
- name: Patch Environment File
run: sed -i 's/ - conda-forge::julia>=1.8.5,!=1.9.0/ - conda-forge::julia=1.9.1/' environment.yml
- name: Setup Mambaforge Python 3.7
- name: Setup Mambaforge Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
python-version: 3.7
python-version: ${{ matrix.python-version }}
activate-environment: rmg_env
use-mamba: true

Expand Down
11 changes: 3 additions & 8 deletions environment.yml
Expand Up @@ -16,6 +16,7 @@
# made dependency list more explicit (@JacksonBurns).
# - October 16, 2023 Switched RDKit and descripatastorus to conda-forge,
# moved diffeqpy to pip and (temporarily) removed chemprop
# - March 15, 2024 - started migration to Python 3.11/2
#
name: rmg_env
channels:
Expand Down Expand Up @@ -53,7 +54,7 @@ dependencies:
- conda-forge::pyjulia >=0.6

# Python tools
- python >=3.7
- python =3.11,3.12
- coverage
- cython >=0.25.2
- scikit-learn
Expand All @@ -68,13 +69,7 @@ dependencies:
- networkx
- pytest
- pytest-cov
# we use a the pytest-check plugin, which is on Conda and PyPI, but the
# version compatible with Python 3.7 is only on PyPI
# switch to the conda version after upgrading to 3.11
# - conda-forge::pytest-check
- pip
- pip:
- pytest-check
- conda-forge::pytest-check
- matplotlib >=1.5
- mpmath
- pandas
Expand Down