Test on Python 3.13 #4305
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: "0 5 * * *" | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
test: | |
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, OpenMM ${{ matrix.openmm }}, OpenEye ${{ matrix.openeye }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
python-version: | |
- "3.13" | |
openeye: | |
- false | |
openmm: | |
- true | |
env: | |
OE_LICENSE: ${{ github.workspace }}/oe_license.txt | |
COV: --cov=openff/interchange --cov-report=xml --cov-config=pyproject.toml --cov-append | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install conda environment | |
uses: mamba-org/setup-micromamba@v2 | |
with: | |
environment-file: devtools/conda-envs/test_env.yaml | |
create-args: >- | |
python=${{ matrix.python-version }} | |
- name: Install package | |
run: python -m pip install . plugins/ | |
- name: Install and license OpenEye Toolkits | |
if: ${{ matrix.openeye == true }} | |
run: | | |
micromamba install "openeye-toolkits =2024.1.0" -c openeye | |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE} | |
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()" | |
env: | |
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }} | |
- name: Install OpenMM | |
if: ${{ matrix.openmm == true }} | |
run: | | |
micromamba install openmm -c conda-forge | |
- name: Run tests | |
run: python -m pytest $COV openff/interchange/ -r fExs -n logical --durations=10 | |
- name: Run small molecule regression tests | |
if: ${{ matrix.openeye == true && matrix.openmm == true }} | |
run: | | |
micromamba install "deepdiff =5" rich click -c conda-forge | |
python -m pip install git+https://github.com/openforcefield/interchange-regression-testing.git@7c98afd2b4ea425276dfe1687e639e0a56b636b4 | |
create_openmm_systems \ | |
--input "regression_tests/small-molecule/input-topologies.json" \ | |
--output "regression_tests/small-molecule/" \ | |
--using-interchange \ | |
--force-field "openff-2.0.0.offxml" \ | |
--n-procs 4 | |
# Don't trust the interchange version here, for some reason, just put it in a new directory | |
mkdir regression_tests/small-molecule/omm-systems-interchange-latest/ | |
mv regression_tests/small-molecule/omm-systems-interchange-*/*xml regression_tests/small-molecule/omm-systems-interchange-latest/ | |
compare_openmm_systems \ | |
--input-dir-a "regression_tests/small-molecule/omm-systems-toolkit-0.10.6" \ | |
--input-dir-b "regression_tests/small-molecule/omm-systems-interchange-latest" \ | |
--output "regression_tests/differences.json" \ | |
--settings "regression_tests/default-comparison-settings.json" \ | |
--expected-changes "regression_tests/toolkit-to-interchange.json" \ | |
--n-procs 4 | |
python devtools/scripts/molecule-regressions.py | |
- name: Run mypy | |
if: ${{ matrix.python-version == '3.11' }} | |
run: | | |
# As of 01/23, JAX with mypy is too slow to use without a pre-built cache | |
# https://github.com/openforcefield/openff-interchange/pull/578#issuecomment-1369979875 | |
micromamba remove jax | |
python -m mypy -p "openff.interchange" --exclude "openff/interchange/_tests/" | |
python -m mypy plugins/nonbonded_plugins/ | |
- name: Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml |