Skip to content

Commit

Permalink
Add 3.12 and cron to test matrix (#87)
Browse files Browse the repository at this point in the history
* add 3.12 to test matrix

* fix typo

* update metadata for 3.10+

* add scipy to dependencies

* add cron

* exclude openeye from 3.12

* move openeye install

* switch to micromamba
  • Loading branch information
lilyminium authored Feb 12, 2024
1 parent 494edb2 commit 1db20a9
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .github/actions/include-openeye/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ inputs:
runs:
using: "composite"
steps:
- name: Install OpenEye
shell: ${{ inputs.shell }}
run: |
micromamba install -y -c openeye openeye-toolkits
- name: Make oe_license.txt file from GH org secret "OE_LICENSE"
shell: ${{ inputs.shell }}
run: |
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
branches:
- main
schedule:
# weekly tests, Sundays at midnight
- cron: "0 0 * * 0"

concurrency:
# Specific group naming so CI is only cancelled
Expand All @@ -28,20 +31,23 @@ jobs:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: ["3.9", "3.10"]
python-version: ["3.10", "3.11", "3.12"]
pydantic-version: ["1", "2"]
include-rdkit: [true, false]
include-openeye: [true, false]
include-dgl: [true, false]
exclude:
- include-rdkit: false
include-openeye: false
# broken OpenMM build for Mac on 3.10
# broken OpenMM build for Mac on 3.10
- os: "macOS-latest"
python-version: "3.10"
# - os: "macOS-latest"
# python-version: "3.9"
# include-dgl: false
# no dgl for 3.12 yet
- include-dgl: true
python-version: "3.12"
# no openeye for 3.12 yet
- include-openeye: true
python-version: "3.12"


steps:
Expand All @@ -56,7 +62,7 @@ jobs:
- name: Install environment
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-file: devtools/conda-envs/test_env_dgl_${{ matrix.include-dgl }}.yaml
create-args: >-
python=${{ matrix.python-version }}
pydantic=${{ matrix.pydantic-version }}
Expand Down Expand Up @@ -86,10 +92,6 @@ jobs:
if: matrix.include-rdkit == false
run: conda remove --force rdkit --yes || echo "rdkit not installed"

- name: Uninstall DGL
if: matrix.include-dgl == false
run: conda remove --force dgl --yes || echo "dgl not installed"

- name: Check toolkit installations
shell: bash -l -c "python -u {0}"
run: |
Expand Down Expand Up @@ -166,7 +168,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand All @@ -189,7 +191,7 @@ jobs:
conda activate openff-nagl
conda list
mamba env update --name openff-nagl --file devtools/conda-envs/test_env.yaml
mamba env update --name openff-nagl --file devtools/conda-envs/test_env_dgl_false.yaml
mamba env update --name openff-nagl --file devtools/conda-envs/docs_env.yaml
python --version
python -m pip install . --no-deps
Expand Down
43 changes: 43 additions & 0 deletions devtools/conda-envs/test_env_dgl_false.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: openff-nagl-test
channels:
- openeye
- conda-forge
- defaults
dependencies:
# Base depends
- python
- pip

# UI
- click
- click-option-group
- tqdm
- rich

# chemistry
- openff-recharge
- openff-toolkit-base >=0.11.1
- openff-units
- pydantic <3
- rdkit
- scipy

# database
- pyarrow

# gcn
- pytorch >=2.0
- pytorch-lightning

# parallelism
- dask-jobqueue

# Testing
- pytest
- pytest-cov
- pytest-xdist
- codecov

# Pip-only installs
- pip:
- rich
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
- openff-units
- pydantic <3
- rdkit
- openeye-toolkits
- scipy

# database
- pyarrow
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# Customize MANIFEST.in if the general case does not suit your needs
# Comment out this line to prevent the files from being packaged with your software
include_package_data=True,
python_requires=">=3.8", # Python version restrictions
python_requires=">=3.10", # Python version restrictions

This comment has been minimized.

Copy link
@mattwthompson

mattwthompson Feb 12, 2024

Member

Would it be possible to change this to 3.9+? This prevents pip install git+....@main (No push to also test on 3.9)

This comment has been minimized.

Copy link
@lilyminium

lilyminium Feb 12, 2024

Author Collaborator

Sure, happy to change this, but just to make sure I fully understand why -- is it because pip install git+....@main is no longer supported on 3.10+, or because our stack still needs to support 3.9, or maybe some totally different reason I haven't thought of yet? I've been wanting to make potentially 3.10+ changes (e.g. converting to importlib.resources) so that would be handy to know.

This comment has been minimized.

Copy link
@mattwthompson

mattwthompson Feb 13, 2024

Member

our stack still needs to support 3.9

This one, but only so far as I want to be able to install it this way in some automation.

I'd like to be 3.10+ as well (3.12+, really, but that's a different story) but we're meant to support 3.9 until April 5 of this year. Arguably we could jump the gun in some projects depending on anticipated release schedule ...

This comment has been minimized.

Copy link
@lilyminium

lilyminium Feb 14, 2024

Author Collaborator

Gotcha, thanks! I'll patch back some changes in openff-nagl-models then that moved onto 3.10 a bit prematurely. Adding 3.9 back in #89 here

This comment has been minimized.

Copy link
@mattwthompson

mattwthompson Feb 14, 2024

Member

Thank you!

# Allows `setup.py test` to work correctly with pytest
setup_requires=[] + pytest_runner,
# Required packages, pulls from pip if needed
Expand All @@ -51,7 +51,7 @@
"tqdm",
"openff-toolkit",
"openff-units",
"pydantic<2.0",
"pydantic",
"rdkit",
],
# Additional entries you may want simply uncomment the lines you want and fill in the data
Expand Down

0 comments on commit 1db20a9

Please sign in to comment.