Skip to content

Test on MacOS and remove progress bar from example #231

Test on MacOS and remove progress bar from example

Test on MacOS and remove progress bar from example #231

Workflow file for this run

name: Examples CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# weekly tests, Sundays at midnight
- cron: "0 0 * * 0"
concurrency:
# Specific group naming so CI is only cancelled
# within same PR or on merge to main
group: ${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
PYTORCH_ENABLE_MPS_FALLBACK: 0
jobs:
example_tests:
name: Examples CI (${{ matrix.os }}, py-${{ matrix.python-version }}, rdkit=${{ matrix.include-rdkit }}, openeye=${{ matrix.include-openeye }}, dgl=${{ matrix.include-dgl }}), pydantic=${{ matrix.pydantic-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: ["3.11", "3.12"]
pydantic-version: ["2"]
include-rdkit: [true]
include-openeye: [false]
include-dgl: [true]
steps:
- uses: actions/checkout@v4
- name: Build information
run: |
uname -a
df -h
ulimit -a
- name: Install environment
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/examples_env.yaml
create-args: >-
python=${{ matrix.python-version }}
pydantic=${{ matrix.pydantic-version }}
- name: Install package
run: |
python -m pip install . --no-deps
- uses: ./.github/actions/include-openeye
if: matrix.include-openeye == true
with:
openeye-license-text: ${{ secrets.OE_LICENSE }}
openeye-license-file: ${{ env.OE_LICENSE }}
- name: Uninstall OpenEye
if: matrix.include-openeye == false
run: micromamba remove --force openeye-toolkits --yes || echo "openeye not installed"
- name: Uninstall RDKit
if: matrix.include-rdkit == false
run: micromamba remove --force rdkit --yes || echo "rdkit not installed"
- name: Python information
run: |
which python
micromamba info
micromamba list
- name: Check toolkit installations
shell: bash -l -c "python -u {0}"
run: |
from openff.toolkit.utils.toolkits import OPENEYE_AVAILABLE, RDKIT_AVAILABLE
assert str(OPENEYE_AVAILABLE).lower() == '${{ matrix.include-openeye }}'
assert str(RDKIT_AVAILABLE).lower() == '${{ matrix.include-rdkit }}'
- name: Run example notebooks
run: |
python -m pytest -r fE -v -x --tb=short -nauto --nbval-lax --dist loadscope examples