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

Fix CI #741

Closed
wants to merge 30 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
701dee8
Fix CI
mikemhenry Aug 15, 2024
680ab1d
remove dev openmm
mikemhenry Aug 16, 2024
c9f3056
see if this helps anything pass
mikemhenry Aug 16, 2024
90cb870
pyupgrade
mikemhenry Aug 16, 2024
2934bbe
ruff-ed
mikemhenry Aug 16, 2024
a7d0d08
converted to pytest, need to fix some yield tests
mikemhenry Aug 20, 2024
b8f4edd
convert yield tests
mikemhenry Aug 20, 2024
79d32f2
see if tests run on CI
mikemhenry Aug 20, 2024
37cc076
pyupgrade
mikemhenry Aug 20, 2024
5238e58
formatting
mikemhenry Aug 20, 2024
f2f789d
update versioneer
mikemhenry Aug 20, 2024
da92d65
pin scipy to be older and exclude some matrix elements
mikemhenry Aug 20, 2024
cf75e60
update codecov action
mikemhenry Aug 20, 2024
f3253ea
See if this helps to fix codecov
mikemhenry Aug 20, 2024
43e974a
print cov report to terminal as well
mikemhenry Aug 20, 2024
748ebd9
do a dev install
mikemhenry Aug 20, 2024
8a40a3e
fix error serialization test
mikemhenry Aug 21, 2024
978ff9f
include tests in coverage
mikemhenry Aug 21, 2024
00a9044
missed a yield test
mikemhenry Aug 23, 2024
ce21118
use pytest naming convention
mikemhenry Aug 23, 2024
fae48ea
need to call super so we don't hit a key error, the base class genera…
mikemhenry Aug 23, 2024
8a9ac3d
needs to be a class setup and not method see https://docs.pytest.org/…
mikemhenry Aug 23, 2024
6cef432
run setup on class, not method
mikemhenry Aug 24, 2024
8286002
Merge branch 'main' into fix/get-ci-working
mikemhenry Aug 26, 2024
d1d5e5d
mark test as flaky, should we run longer?
mikemhenry Aug 26, 2024
420bd36
Merge remote-tracking branch 'refs/remotes/origin/fix/get-ci-working'…
mikemhenry Aug 26, 2024
45c1f42
we don't need openeye
mikemhenry Aug 26, 2024
028ec4d
lets see how long the slow tests take
mikemhenry Aug 26, 2024
415d943
run daily at 7:00 UTC
mikemhenry Aug 27, 2024
e54b815
rerun flaky tests up to 3 times
mikemhenry Aug 27, 2024
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
58 changes: 21 additions & 37 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,22 @@ concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

defaults:
run:
shell: bash -leo pipefail {0}

jobs:
test:
name: ${{ matrix.os }}, py-${{ matrix.python-version }}, OpenMM-${{ matrix.openmm }}, pymbar-${{ matrix.pymbar-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10"]
openmm: ["7.7", "8.0"]
os: [macOS-latest, ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]
openmm: ["8.0", "8.1.1", "8.1.2"]
ijpulidos marked this conversation as resolved.
Show resolved Hide resolved
os: [macOS-latest, ubuntu-latest, macOS-12]
pymbar-version: ["4"]
include:
# Test openmm dev build on newest python + linux
- openmm: "dev"
python-version: "3.10"
os: ubuntu-latest
pymbar-version: "4"
# Test newest python, openmm, and pymbar we support on windows
- openmm: "8.0"
python-version: "3.10"
Expand All @@ -45,61 +44,46 @@ jobs:
os: ubuntu-latest
pymbar-version: "3"
exclude:
# There are no py 3.10 builds of openmm 7.7
- openmm: "7.7"
python-version: "3.10"
# no py312 builds of openmm 8.0
- openmm: "8.0"
python-version: "3.12"

steps:
- uses: actions/checkout@v3
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a

- name: Setup micromamba for openmm dev
uses: mamba-org/provision-with-micromamba@main
if: ${{ matrix.openmm == 'dev' }}
with:
channels: jaimergp/label/unsupported-cudatoolkit-shim,conda-forge/label/openmm_dev/linux-64,conda-forge
environment-file: devtools/conda-envs/test_env.yaml
channel-priority: flexible
environment-name: openmmtools-test
extra-specs: |
python==${{ matrix.python-version }}
openmm==8.0.0dev3
pymbar==${{ matrix.pymbar-version }}.*

- name: Setup micromamba
uses: mamba-org/provision-with-micromamba@main
if: ${{ matrix.openmm != 'dev' }}
uses: mamba-org/setup-micromamba@v1
with:
channels: jaimergp/label/unsupported-cudatoolkit-shim,conda-forge
environment-file: devtools/conda-envs/test_env.yaml
channel-priority: strict
environment-name: openmmtools-test
extra-specs: |
create-args: >-
python==${{ matrix.python-version }}
openmm==${{ matrix.openmm }}
pymbar==${{ matrix.pymbar-version }}.*
condarc: |
channels:
- conda-forge
- jaimergp/label/unsupported-cudatoolkit-shim

- name: Install package
shell: bash -l {0}
run: |
python -m pip install . --no-deps
python -m pip install -e . --no-deps
micromamba list
micromamba info

- name: Run tests
shell: bash -l {0}
run: |
# pytest -v --cov=openmmtools --cov-report=xml --color=yes openmmtools/tests/
nosetests openmmtools/tests --nocapture --cover-tests --with-coverage --cover-package=openmmtools --cover-xml --cover-xml-file=coverage.xml --verbosity=2 --with-timer --with-doctest -a '!slow'
pytest -n logical -v --cov=openmmtools --cov-report=xml --cov-report=term --color=yes openmmtools/tests/

- name: CodeCov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}-openmm-${{ matrix.openmm }}
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}-openmm-${{ matrix.openmm }}-pymbar-${{ matrix.pymbar-version }}
token: ${{ secrets.CODECOV_TOKEN }}
15 changes: 4 additions & 11 deletions .github/workflows/gpu-runner.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Self-Hosted Runner
on:
workflow_dispatch:
schedule:
# At 07:00 UTC daily.
- cron: "0 7 * * *"
ijpulidos marked this conversation as resolved.
Show resolved Hide resolved

jobs:
start-aws-runner:
Expand Down Expand Up @@ -35,8 +38,6 @@ jobs:
defaults:
run:
shell: bash -leo pipefail {0}
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt

needs:
- start-aws-runner
Expand All @@ -56,7 +57,6 @@ jobs:
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: openfe_env

- name: "Check if OpenMM can get a GPU"
run: python -m openmm.testInstallation
Expand All @@ -70,16 +70,9 @@ jobs:
micromamba list
pip list

- name: Test OE License & Write License to File
env:
OE_LICENSE_TEXT: ${{ secrets.OE_LICENSE }}
run: |
echo "${OE_LICENSE_TEXT}" > ${OE_LICENSE}
python -c "import openeye; assert openeye.oechem.OEChemIsLicensed(), 'OpenEye license checks failed!'"

- name: "Run tests"
run: |
pytest -n 4 -v --durations=10 --cov=openmmtools --cov-report=term
pytest -n 4 -v --durations=10 --cov=openmmtools --cov-report=term --runslow openmmtools/tests

stop-aws-runner:
runs-on: ubuntu-latest
Expand Down
7 changes: 3 additions & 4 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
dependencies:
# Base depends
- cython
- hdf5 <=1.14.0 # Macos has problem with newer releases (1.14.x) to date
#- hdf5 <=1.14.0 # Macos has problem with newer releases (1.14.x) to date
ijpulidos marked this conversation as resolved.
Show resolved Hide resolved
- libnetcdf >=4.6.2 # workaround for libssl issues
- mdtraj
- mpiplus
Expand All @@ -18,15 +18,14 @@ dependencies:
- python
- python
- pyyaml
- scipy
- scipy <1.14
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking comment. Why is it that we are not supporting scipy 1.14+? I wonder if we then have to restrict the version on the conda-forge package and also patch/change all the currently released packages so that older versions don't get installed when environment with scipy 1.14 are resolved. I hope that makes sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will relax the pin and see if we have any issues, I am pretty sure it was actually something to do with nose testing or a numba thing

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that should be a quick test, great!

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I think it was probably related to this, which should've been already fixed on the openmm side. But if we are supporting older OpenMM releases then we might still need the pin. #743

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we will need the pin until this gets merged in conda-forge/openmm-feedstock#139 + we patch the older releases

- setuptools
- sphinxcontrib-bibtex
# Testing
- codecov
- nose
- nose-timer
- pytest
- pytest-cov
- pytest-xdist
- coverage

# docs
Expand Down
3 changes: 3 additions & 0 deletions openmmtools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
__version__ = versions['version']
__git_revision__ = versions['full-revisionid']
del get_versions, versions

from . import _version
__version__ = _version.get_versions()['version']
Loading
Loading