Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 13 additions & 30 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,17 @@ defaults:
jobs:
test:
if: (github.event_name == 'schedule' && github.repository == 'openforcefield/openff-toolkit') || (github.event_name != 'schedule')
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, RDKit=${{ matrix.rdkit }}, OpenEye=${{ matrix.openeye }}, NAGL=${{ matrix.nagl }}
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}, OpenEye=${{ matrix.openeye }}, NAGL=${{ matrix.nagl }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.12", "3.13"]
rdkit: [true, false]
openeye: [true, false]
nagl: [true, false]
exclude:
- rdkit: false
openeye: false
- openeye: true
python-version: "3.13"
- rdkit: false
nagl: true

env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
Expand All @@ -47,24 +42,17 @@ jobs:

- name: Set environment variables
run: |
if [[ ${{ matrix.openeye }} == true && ${{ matrix.rdkit }} == true ]]; then
if [[ ${{ matrix.openeye }} == true ]]; then
echo "ENVFILE=test_env" >> $GITHUB_ENV
echo "JOBNAME=RDKit and OpenEye" >> $GITHUB_ENV
echo "TOOLKIT_CHECKS=RDKIT OPENEYE" >> $GITHUB_ENV
echo "PACKAGES_TO_REMOVE=" >> $GITHUB_ENV
fi

if [[ ${{ matrix.openeye }} == true && ${{ matrix.rdkit }} == false ]]; then
echo "ENVFILE=openeye" >> $GITHUB_ENV
echo "JOBNAME=OpenEye" >> $GITHUB_ENV
echo "JOBNAME=With OpenEye" >> $GITHUB_ENV
echo "TOOLKIT_CHECKS=OPENEYE" >> $GITHUB_ENV
echo "PACKAGES_TO_REMOVE=ambertools rdkit" >> $GITHUB_ENV
echo "PACKAGES_TO_REMOVE=" >> $GITHUB_ENV
fi

if [[ ${{ matrix.openeye }} == false && ${{ matrix.rdkit }} == true ]]; then
echo "ENVFILE=rdkit" >> $GITHUB_ENV
echo "JOBNAME=RDKit" >> $GITHUB_ENV
echo "TOOLKIT_CHECKS=RDKIT" >> $GITHUB_ENV
if [[ ${{ matrix.openeye }} == false ]]; then
echo "ENVFILE=no-openeye" >> $GITHUB_ENV
echo "JOBNAME=No OpenEye" >> $GITHUB_ENV
echo "TOOLKIT_CHECKS=" >> $GITHUB_ENV
echo "PACKAGES_TO_REMOVE=openeye-toolkits" >> $GITHUB_ENV
fi

Expand Down Expand Up @@ -127,12 +115,7 @@ jobs:
pip list

- name: Run mypy
# When possible re-enable this with OE+RDK=True, but for now rdkit builds often have bugs
# in stubs and there are other subtleties (in the source code and builds) that reduce the number
# of available builds.
# See ex https://github.com/rdkit/rdkit/issues/7221
# and https://github.com/rdkit/rdkit/issues/7583
if: ${{ matrix.rdkit == false && matrix.openeye == true }}
if: ${{ matrix.openeye == true }}
run: mypy -p "openff.toolkit"

- name: Run unit tests
Expand All @@ -146,15 +129,15 @@ jobs:
python -m pytest -x --durations=20 $PYTEST_ARGS $COV openff/toolkit/_tests

- name: Run code snippets in docs
if: ${{ matrix.rdkit == true && matrix.openeye == true && matrix.nagl == true }}
if: ${{ matrix.openeye == true && matrix.nagl == true }}
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 }}
if: ${{ matrix.openeye == true }}
run: python -m pytest -v --durations=10 --no-cov --nbval-lax docs/

- name: Run examples in docstrings
if: ${{ matrix.rdkit == true && matrix.openeye == true && matrix.nagl == true }}
if: ${{ matrix.openeye == true && matrix.nagl == true }}
run: |
pytest openff \
-v -x -n logical --no-cov --doctest-modules \
Expand All @@ -171,5 +154,5 @@ jobs:
fail_ci_if_error: true

- name: Check links
if: ${{ matrix.rdkit == true && matrix.openeye == true }}
if: ${{ matrix.openeye == true }}
run: pytest -r fE --tb=short openff/toolkit/_tests/test_links.py
141 changes: 0 additions & 141 deletions .github/workflows/examples.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: rdkit-examples
name: no-openeye-examples
channels:
- conda-forge
dependencies:
Expand Down Expand Up @@ -27,7 +27,7 @@ dependencies:
# Toolkit-specific
- ambertools
# https://github.com/rdkit/rdkit/issues/7221 and https://github.com/rdkit/rdkit/issues/7583
- rdkit =2024
- rdkit =2024 # Bump me!
# Test-only/optional/dev/typing/examples
- pytest =8
- pytest-xdist
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: openff-toolkit-test-rdkit
name: openff-toolkit-test-no-openeye
channels:
- conda-forge
dependencies:
Expand Down
2 changes: 2 additions & 0 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ dependencies:
- nbval
# No idea why this is necessary, see https://github.com/openforcefield/openff-toolkit/pull/1821
- nomkl
- mypy =1.18
- typing_extensions
Loading