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
174 changes: 0 additions & 174 deletions .github/workflows/CI.yml

This file was deleted.

83 changes: 7 additions & 76 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,28 @@ defaults:
jobs:
test:
if: (github.event_name == 'schedule' && github.repository == 'openforcefield/openff-toolkit') || (github.event_name != 'schedule')
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}, RDKit=${{ matrix.rdkit }}, OpenEye=${{ matrix.openeye }}, NAGL=${{ matrix.nagl }}
name: ${{ matrix.os }}, Python ${{ matrix.python-version }}, OpenEye=${{ matrix.openeye }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [ "3.12"]
rdkit: [true, false]
openeye: [true, false]
nagl: [true, false]
exclude:
- rdkit: false
openeye: false
- rdkit: true
openeye: true
- rdkit: false
nagl: true

env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
PACKAGE: openff
PYTEST_ARGS: -r fE -v -x --tb=short -nauto --durations=10
PYTEST_ARGS: -r fE -v -x --tb=auto -nauto --durations=10
NB_ARGS: --nbval-lax --dist loadscope --ignore=examples/deprecated

steps:
- uses: actions/checkout@v7

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

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

- name: Install conda environment with ${{ env.ENVFILE }}
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v3
with:
environment-file: devtools/conda-envs/${{env.ENVFILE}}-examples.yaml
environment-file: devtools/conda-envs/examples.yaml
create-args: >-
python=${{ matrix.python-version }}

Expand All @@ -71,38 +48,12 @@ jobs:
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }}
run: echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}

- name: Optionally remove OpenFF NAGL
if: ${{ matrix.nagl == false }}
run: micromamba remove openff-nagl-base openff-nagl-models --force

- name: Install package
run: python -m pip install .

- name: Remove undesired toolkits
run: |
# If openmmforcefields is included in either environment file,
# remove RDKit and AmberTools brought in by it. Currently it's not included,
# so don't remove it.
if [ ! -z "${{ env.PACKAGES_TO_REMOVE }}" ]; then
for cpkg in ${{ env.PACKAGES_TO_REMOVE }}; do
if [[ $(micromamba list | grep $cpkg) ]]; then micromamba remove --force $cpkg --yes ; fi
done
fi

- name: Check installed toolkits
run: |
for tk in ${{ env.TOOLKIT_CHECKS }}; do
python -c "from openff.toolkit.utils.toolkits import ${tk}_AVAILABLE; assert ${tk}_AVAILABLE, '${tk} unavailable'"
done

- name: Check uninstalled toolkits
run: |
if [ ! -z "${{ env.PACKAGES_TO_REMOVE }}" ]; then
for tk in ${{ env.PACKAGES_TO_REMOVE }}; do
TK=$(echo ${tk%-*} | tr 'a-z' 'A-Z')
python -c "from openff.toolkit.utils.toolkits import ${TK}_AVAILABLE; assert not ${TK}_AVAILABLE, '${TK} available'"
done
fi
- name: Install OpenEye Toolkits
if: ${{ matrix.openeye == 'true' }}
run: micromamba install -c openeye openeye-toolkits -y

- name: Environment Information
run: |
Expand All @@ -112,28 +63,8 @@ jobs:

- name: Run example scripts
run: |
if [[ ${{ matrix.rdkit }} == false ]]; then
PYTEST_ARGS+=" --ignore=examples/check_dataset_parameter_coverage"
PYTEST_ARGS+=" --ignore=examples/QCArchive_interface"
fi
pytest $PYTEST_ARGS openff/toolkit/_tests/test_examples.py

- name: Run example notebooks
run: |
if [[ ${{ matrix.rdkit }} == false ]]; then
NB_ARGS+=" --ignore=examples/QCArchive_interface"
NB_ARGS+=" --ignore=examples/visualization"
NB_ARGS+=" --ignore=examples/check_dataset_parameter_coverage"
NB_ARGS+=" --ignore=examples/conformer_energies"
NB_ARGS+=" --ignore=examples/using_smirnoff_in_amber_or_gromacs"
NB_ARGS+=" --ignore=examples/using_smirnoff_with_amber_protein_forcefield"
NB_ARGS+=" --ignore=examples/SMIRNOFF_simulation"
NB_ARGS+=" --ignore=examples/toolkit_showcase"
fi

# GROMACS builds are not stable on macOS + GHA
if [[ ${{ matrix.os }} == macos-latest ]]; then
NB_ARGS+=" --ignore=examples/using_smirnoff_in_amber_or_gromacs/"
fi

python -m pytest $PYTEST_ARGS $NB_ARGS examples
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: openeye-examples
name: openff-toolkit-examples
channels:
- openeye
- conda-forge
dependencies:
# Base depends
Expand All @@ -12,31 +11,32 @@ dependencies:
# https://github.com/openforcefield/openff-toolkit/issues/2150
- xmltodict <=1.0.2
- python-constraint
- openmm >=7.6
- openff-forcefields >=2023.11
- openmm
- openff-forcefields >=2025
- openff-amber-ff-ports >=0.0.3
- openff-units
- openff-utilities >=0.1.5
- openff-interchange-base >=0.5
- openff-nagl-base >=0.4.0
- openff-nagl-models >=0.3.0
- openff-nagl-base >=0.5.2
- openff-nagl-models >=2025
- typing_extensions
- nglview
# Toolkit-specific
- openeye-toolkits
- rdkit >=2024
# Test-only/optional/dev/typing/examples
- pytest =8
- pytest
- pytest-xdist
- pytest-rerunfailures
- pytest-timeout
- pyyaml
- toml
- bson
- msgpack-python
- qcelemental
- qcportal >=0.50
- qcengine
- mdtraj
- nbval
- mdtraj
- pdbfixer
- openmmforcefields >=0.11.2
- gromacs >=2023.3
- gromacs >=2026
- pyedr
44 changes: 0 additions & 44 deletions devtools/conda-envs/rdkit-examples.yaml

This file was deleted.

Loading