Skip to content

Commit

Permalink
Merge branch 'main' into feat/add_openmm_8_beta_test
Browse files Browse the repository at this point in the history
  • Loading branch information
ijpulidos authored Nov 16, 2023
2 parents c427fa5 + 0bbef98 commit 516e925
Show file tree
Hide file tree
Showing 32 changed files with 817 additions and 279 deletions.
79 changes: 42 additions & 37 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,74 +13,79 @@ on:
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * *"

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Test on ${{ matrix.cfg.os }}, Python ${{ matrix.cfg.python-version }}, OpenMM ${{ matrix.cfg.openmm }}
runs-on: ${{ matrix.cfg.os }}
name: ${{ matrix.os }}, py-${{ matrix.python-version }}, OpenMM-${{ matrix.openmm }}, pymbar-${{ matrix.pymbar-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: macOS-latest, python-version: '3.8', openmm: latest }
- { os: windows-latest, python-version: '3.8.10', openmm: latest }
- { os: ubuntu-latest, python-version: '3.8', openmm: latest }
- { os: ubuntu-latest, python-version: '3.9', openmm: latest }
- { os: ubuntu-latest, python-version: '3.8', openmm: nightly }
- { os: ubuntu-latest, python-version: '3.10', openmm: latest }
- { os: ubuntu-latest, python-version: '3.8', openmm: beta }
- { os: ubuntu-latest, python-version: '3.9', openmm: beta }
- { os: macOS-latest, python-version: '3.8', openmm: dev }
- { os: windows-latest, python-version: '3.8.10', openmm: dev }
- { os: ubuntu-latest, python-version: '3.9', openmm: dev }
- { os: ubuntu-latest, python-version: '3.10', openmm: dev }

env:
OPENMM: ${{ matrix.cfg.openmm }}
python-version: ["3.9", "3.10"]
openmm: ["7.7", "8.0"]
os: [macOS-latest, ubuntu-latest]
pymbar-version: ["4"]
include:
# Test openmm dev build on newest python + linux
- openmm: "dev"
python-version: "3.10"
os: ubuntu-latest
pymbar-version: "4"
# Have one job test pymbar 3 support
- openmm: "dev"
python-version: "3.10"
os: ubuntu-latest
pymbar-version: "3"

steps:
- uses: actions/checkout@v1

- uses: actions/checkout@v3
- name: Additional info about the build
shell: bash
run: |
uname -a
df -h
ulimit -a
# More info on options: https://github.com/conda-incubator/setup-miniconda
- uses: conda-incubator/setup-miniconda@v2
- name: Setup micromamba for openmm dev
uses: mamba-org/provision-with-micromamba@main
if: ${{ matrix.openmm == 'dev' }}
with:
python-version: ${{ matrix.cfg.python-version }}
channels: jaimergp/label/unsupported-cudatoolkit-shim,conda-forge/label/openmm_rc,conda-forge
environment-file: devtools/conda-envs/test_env.yaml
channels: conda-forge,defaults
activate-environment: test
auto-update-conda: true
auto-activate-base: false
show-channel-urls: true

- name: Install OpenMM nightly
shell: bash -l {0}
if: matrix.cfg.openmm == 'nightly'
run: |
conda install --yes -c omnia-dev openmm
- name: Install OpenMM beta
shell: bash -l {0}
if: matrix.cfg.openmm == 'beta'
run: |
conda install -c conda-forge/label/openmm_rc -c conda-forge openmm
channel-priority: flexible
environment-name: openmmtools-test
extra-specs: |
python==${{ matrix.python-version }}
openmm==8.1
pymbar==${{ matrix.pymbar-version }}.*
- name: Install package
shell: bash -l {0}
run: |
python -m pip install . --no-deps
conda list
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 --verbosity=2 --with-timer --with-doctest -a '!slow'
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'
- name: CodeCov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.cfg.os }}-py${{ matrix.cfg.python-version }}
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}-openmm-${{ matrix.openmm }}
20 changes: 11 additions & 9 deletions .github/workflows/self-hosted-gpu-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
start-runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
Expand All @@ -28,10 +28,10 @@ jobs:
with:
mode: start
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
ec2-image-id: ami-096d499d418f88d88
ec2-instance-type: p2.xlarge
subnet-id: subnet-0e82552b8c708a999
security-group-id: sg-0589e74ec03965add
ec2-image-id: ami-04d16a12bbc76ff0b
ec2-instance-type: g4dn.xlarge
subnet-id: subnet-0dee8543e12afe0cd # us-east-1a
security-group-id: sg-0f9809618550edb98
# iam-role-name: self-hosted-runner # optional, requires additional permissions
aws-resource-tags: > # optional, requires additional permissions
[
Expand All @@ -46,6 +46,8 @@ jobs:
TEST_MODE: GPU
OPENMM: ${{ matrix.cfg.openmm }}
OE_LICENSE: ${{ github.workspace }}/oe_license.txt
HOME: /home/ec2-user
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

defaults:
run:
Expand All @@ -55,7 +57,7 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
installer-url: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
python-version: 3.8
python-version: "3.10"
activate-environment: test
channels: conda-forge,defaults
environment-file: devtools/conda-envs/test_env.yaml
Expand All @@ -66,7 +68,7 @@ jobs:
- name: Refine test env
shell: bash -l {0}
run: |
mamba install -y cudatoolkit==11.0.3 openmm==7.7
mamba install -y cudatoolkit==11.7 openmm>=8.0
- name: Additional info about the build
shell: bash -l {0}
Expand All @@ -93,7 +95,7 @@ jobs:
- name: Test the package
shell: bash -l {0}
run: |
nosetests openmmtools/tests --nocapture --verbosity=2 --with-timer --with-doctest
pytest -v --cov-report xml --durations=0 --cov=openmmtools openmmtools/tests
- name: Codecov
if: ${{ github.repository == 'choderalab/openmmtools'
Expand All @@ -103,7 +105,7 @@ jobs:
file: ./coverage.xml
name: codecov-${{ matrix.cfg.os }}-py${{ matrix.cfg.python-version }}
flags: unittests
fail_ci_if_error: true
fail_ci_if_error: false

stop-runner:
name: Stop self-hosted EC2 runner
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,6 @@ ENV/

# mypy
.mypy_cache/

# macOS
.DS_Store
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Downloads Badge](https://anaconda.org/omnia/openmmtools/badges/downloads.svg)](https://anaconda.org/omnia/openmmtools/files)
[![Documentation Status](https://readthedocs.org/projects/openmmtools/badge/?version=latest)](https://openmmtools.readthedocs.io/en/latest/?badge=latest)
[![Zenodo DOI Badge](https://zenodo.org/badge/25416166.svg)](https://zenodo.org/badge/latestdoi/25416166)
[![codecov](https://codecov.io/gh/choderalab/openmmtools/branch/main/graph/badge.svg?token=aGwEahm2CY)](https://codecov.io/gh/choderalab/openmmtools)

## OpenMMTools

Expand Down Expand Up @@ -45,4 +46,4 @@ Major contributors include:
* [Iván Pulido](https://github.com/ijpulidos)
* [Ivy Zhang](https://github.com/zhang-ivy)
* [Dominic Rufa](https://github.com/dominicrufa)
* [Mike Henry](https://github.com/mikemhenry)
* [Mike Henry](https://github.com/mikemhenry)
12 changes: 6 additions & 6 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: test
name: openmmtools-test
channels:
- conda-forge
- defaults
- omnia
dependencies:
# Base depends
- cython
- hdf5 <=1.14.0 # Macos has problem with newer releases (1.14.x) to date
- libnetcdf >=4.6.2 # workaround for libssl issues
- mdtraj
- mpiplus
- netcdf4 >=1.4.2 # after bugfix: "always return masked array by default, even if there are no masked values"
- numba
- numpy
- openmm >=7.5.0
- openmm
#- parmed # Test to see if this fixes the docs
- pip
- pymbar <4
- pymbar
- python
- python
- pyyaml
Expand All @@ -28,8 +27,9 @@ dependencies:
- nose-timer
- pytest
- pytest-cov
- coverage

# docs
- numpydoc
- sphinxcontrib-bibtex

- sphinx-rtd-theme
19 changes: 0 additions & 19 deletions devtools/conda-recipe/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions devtools/conda-recipe/bld.bat

This file was deleted.

8 changes: 0 additions & 8 deletions devtools/conda-recipe/build.sh

This file was deleted.

46 changes: 0 additions & 46 deletions devtools/conda-recipe/meta.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions devtools/conda-recipe/run_test.bat

This file was deleted.

2 changes: 0 additions & 2 deletions devtools/conda-recipe/run_test.sh

This file was deleted.

Loading

0 comments on commit 516e925

Please sign in to comment.