Skip to content

Commit

Permalink
Test on Python 3.12 in (non-examples) CI (#1755)
Browse files Browse the repository at this point in the history
* Test on Python 3.12

* Remove optional dependencies

* Use OpenMM 8.1beta

* Syntax

* Update versions

* Safeguard `openff-nagl-models` import`

* Revert debug code

* Update CI

* Fix

* Back to 0.3.14 for examples

* Pull in the real deal

* No false-false

* Skip NAGL tests on 3.12

* Update

* Update

* micro

* Drop beta channel

* Drop a pin

* Ensure latest Interchange

* Simplify diff
  • Loading branch information
mattwthompson authored May 30, 2024
1 parent f6f8115 commit 271da91
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 26 deletions.
22 changes: 7 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
rdkit: [true, false]
openeye: [true, false]
exclude:
- rdkit: false
openeye: false
- openeye: true
python-version: "3.11"
- openeye: true
python-version: "3.12"

env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
Expand Down Expand Up @@ -78,17 +80,10 @@ jobs:
create-args: >-
python=${{ matrix.python-version }}
- name: Additional info about the build
run: |
uname -a
df -h
ulimit -a
- name: Make oe_license.txt file from GH org secret "OE_LICENSE"
env:
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }}
run: |
echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}
run: echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}

- name: Install package
run: |
Expand All @@ -101,8 +96,7 @@ jobs:
python -m pip install .
- name: Install test plugins
run: |
python -m pip install utilities/test_plugins
run: python -m pip install utilities/test_plugins

- name: Remove undesired toolkits
run: |
Expand Down Expand Up @@ -157,13 +151,11 @@ jobs:
- name: Run code snippets in docs
if: ${{ matrix.rdkit == true && matrix.openeye == true }}
run: |
pytest -v --no-cov --doctest-glob="docs/*.rst" --doctest-glob="docs/*.md" docs/
run: pytest -v --no-cov --doctest-glob="docs/*.rst" --doctest-glob="docs/*.md" docs/

- name: Run notebooks in docs
if: ${{ matrix.rdkit == true && matrix.openeye == true }}
run: |
pytest -v --no-cov --durations=5 --nbval --ignore docs/_build/ docs/
run: pytest -v --no-cov --nbval --ignore docs/_build/ docs/

- name: Run examples in docstrings
if: ${{ matrix.rdkit == true && matrix.openeye == true }}
Expand Down
4 changes: 2 additions & 2 deletions devtools/conda-envs/openeye-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ dependencies:
- openff-amber-ff-ports >=0.0.3
- openff-units =0.2.0
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.17
- openff-nagl-base >=0.3.7,<0.4
- openff-interchange-base >=0.3.19
- openff-nagl-base ~=0.3.7
- openff-nagl-models ==0.1.0
- typing_extensions
- nglview
Expand Down
4 changes: 2 additions & 2 deletions devtools/conda-envs/openeye.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ dependencies:
- openff-units =0.2.0
- openff-amber-ff-ports
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.17
- openff-nagl-base >=0.3.7,<0.4
- openff-interchange-base >=0.3.19
- openff-nagl-base ~=0.3.7
- openff-nagl-models ==0.1.0
- typing_extensions
# Toolkit-specific
Expand Down
4 changes: 2 additions & 2 deletions devtools/conda-envs/rdkit-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ dependencies:
- openff-amber-ff-ports >=0.0.3
- openff-units =0.2.0
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.17
- openff-nagl-base >=0.3.7,<0.4
- openff-interchange-base >=0.3.19
- openff-nagl-base ~=0.3.7
- openff-nagl-models ==0.1.0
- typing_extensions
- nglview
Expand Down
4 changes: 2 additions & 2 deletions devtools/conda-envs/rdkit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ dependencies:
- openff-units =0.2.0
- openff-amber-ff-ports
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.17
- openff-nagl-base >=0.3.7,<0.4
- openff-interchange-base >=0.3.19
- openff-nagl-base ~=0.3.7
- openff-nagl-models ==0.1.0
- typing_extensions
# Toolkit-specific
Expand Down
4 changes: 2 additions & 2 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ dependencies:
- openff-units =0.2.0
- openff-amber-ff-ports
- openff-utilities >=0.1.5
- openff-interchange-base >=0.3.17
- openff-nagl-base >=0.3.7,<0.4
- openff-interchange-base >=0.3.19
- openff-nagl-base ~=0.3.7
- openff-nagl-models ==0.1.0
# Toolkit-specific
- ambertools >=22
Expand Down
8 changes: 7 additions & 1 deletion openff/toolkit/_tests/test_nagl.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import numpy
import pytest
from openff.nagl_models import list_available_nagl_models
from openff.utilities import has_package, skip_if_missing

from openff.toolkit import Molecule, unit
Expand All @@ -24,6 +23,13 @@

_DEFAULT_MODEL = "openff-gnn-am1bcc-0.1.0-rc.1.pt"

try:
from openff.nagl_models import list_available_nagl_models
except ModuleNotFoundError:

def list_available_nagl_models():
return list()


@skip_if_missing("openff.nagl")
class TestNAGLToolkitWrapper:
Expand Down

0 comments on commit 271da91

Please sign in to comment.