Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on MacOS and remove progress bar from example #159

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
103 changes: 51 additions & 52 deletions .github/workflows/examples-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,71 +22,70 @@ defaults:

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: [ubuntu-latest]
python-version: ["3.11", "3.12"]
pydantic-version: ["2"]
include-rdkit: [true]
include-openeye: [false]
include-dgl: [true]

fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: ["3.11", "3.12"]
pydantic-version: ["2"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to be a bit of a nitpicker, but this could also go away (and below)

include-rdkit: [true]
include-openeye: [false]
include-dgl: [true]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Build information
run: |
uname -a
df -h
ulimit -a

- 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 environment
uses: mamba-org/setup-micromamba@v1
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

- 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 }}

- 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 OpenEye
if: matrix.include-openeye == false
run: conda 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: Uninstall RDKit
if: matrix.include-rdkit == false
run: conda remove --force rdkit --yes || echo "rdkit not installed"

- name: Python information
run: |
which python
conda info
conda list
- 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: 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 --nbval-cell-timeout=50000 --dist loadscope examples
- name: Run example notebooks
run: |
python -m pytest -r fE -v -x --tb=short -nauto --nbval-lax --dist loadscope examples
2 changes: 0 additions & 2 deletions devtools/conda-envs/examples_env.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: openff-nagl-test
channels:
- conda-forge
- defaults
dependencies:
# Base depends
- python
Expand Down Expand Up @@ -42,7 +41,6 @@ dependencies:
# compatibility
- apsw >=3.42


# CI
- nbval
- pytest
Expand Down
Loading
Loading