Skip to content

examples

examples #2274

Workflow file for this run

name: examples
on:
push:
branches:
- main
- v0.3.0-staging
pull_request:
branches:
- main
- v0.3.0-staging
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
defaults:
run:
shell: bash -l {0}
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-12
python-version:
- "3.10"
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
INTERCHANGE_EXPERIMENTAL: "1"
steps:
- uses: actions/checkout@v4
- name: Install conda environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/examples_env.yaml
create-args: >-
python=${{ matrix.python-version }}
- name: Install package
run: |
# These packages are brought in by conda (via the toolkit) and must be removed manually
# since pip doesn't know about the -base split and does not uninstall the -base package
micromamba remove --force openff-interchange openff-interchange-base
python -m pip install .
- name: Environment Information
run: |
micromamba info
micromamba list
- name: License OpenEye
run: |
echo "${SECRET_OE_LICENSE}" > ${OE_LICENSE}
python -c "from openeye import oechem; assert oechem.OEChemIsLicensed()"
env:
SECRET_OE_LICENSE: ${{ secrets.OE_LICENSE }}
- name: Run docexamples
run: |
# TODO: Add back /interchange.py when `TypedMolecule` is implemented
pytest --doctest-modules openff/interchange/ --ignore=openff/interchange/_tests --ignore=openff/interchange/components/interchange.py
- name: Run example notebooks
if: always()
run: |
python -m pytest --nbval-lax --dist loadscope -n logical --durations=20 \
examples/ \
--ignore=examples/deprecated/ \
--ignore=examples/experimental/openmmforcefields/ \
--ignore=examples/lammps/ \
--ignore=examples/protein_ligand/ \
--ignore=examples/conformer_energies/conformer_energies.ipynb