Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemhenry authored Sep 27, 2024
2 parents 63f4562 + c2a13c0 commit 7efa54e
Show file tree
Hide file tree
Showing 25 changed files with 6,446 additions and 3,113 deletions.
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# See https://github.com/choderalab/openmmtools/pull/741#issuecomment-2341717861
e7144c193ad307aa9ef2f852feecf0dcdd2ef352
7ebe1ab6e86582e8ed5e2cc2103d8eaa599ec3f2
562e0d305b96082cac337ce2320f5f7835385618
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"]
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 }}
107 changes: 107 additions & 0 deletions .github/workflows/gpu-runner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Self-Hosted Runner
on:
workflow_dispatch:

jobs:
start-aws-runner:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
outputs:
mapping: ${{ steps.aws-start.outputs.mapping }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::009563297724:role/gha-runner-omsf
aws-region: us-east-1
- name: Create cloud runner
id: aws-start
uses: omsf-eco-infra/gha-runner@v0.2.0
with:
provider: "aws"
action: "start"
aws_image_id: ami-053912f3a44543f8c
aws_instance_type: g4dn.xlarge
aws_region_name: us-east-1
aws_home_dir: /home/ubuntu
env:
GH_PAT: ${{ secrets.GH_PAT }}

self-hosted-test:
runs-on: self-hosted
timeout-minutes: 720 # 12 hours
defaults:
run:
shell: bash -leo pipefail {0}
env:
OE_LICENSE: ${{ github.workspace }}/oe_license.txt

needs:
- start-aws-runner
steps:
- uses: actions/checkout@v4

- name: Print disk usage
run: "df -h"

- name: Print Docker details
run: "docker version || true"

- name: Check for nvidia-smi
run: "nvidia-smi"

- name: "Setup Micromamba"
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

- name: "Install"
run: python -m pip install --no-deps -e .

- name: "Environment Information"
run: |
micromamba info
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
stop-aws-runner:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
needs:
- start-aws-runner
- self-hosted-test
if: ${{ always() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::009563297724:role/gha-runner-omsf
aws-region: us-east-1
- name: Stop instances
uses: omsf-eco-infra/gha-runner@v0.2.0
with:
provider: "aws"
action: "stop"
instance_mapping: ${{ needs.start-aws-runner.outputs.mapping }}
aws_region_name: us-east-1
env:
GH_PAT: ${{ secrets.GH_PAT }}
130 changes: 0 additions & 130 deletions .github/workflows/self-hosted-gpu-test.yml

This file was deleted.

19 changes: 7 additions & 12 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,29 @@ name: openmmtools-test
channels:
- conda-forge
dependencies:
# Base depends
# 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"
- netcdf4
- numba
- numpy
- openmm
#- parmed # Test to see if this fixes the docs
- pip
- pymbar
- python
- python
- pyyaml
- scipy
- scipy < 1.14
- setuptools
- sphinxcontrib-bibtex
# Testing
# Testing
- codecov
- nose
- nose-timer
- coverage
- pytest
- pytest-cov
- coverage

- pytest-xdist
# docs
- numpydoc
- sphinxcontrib-bibtex
- sphinx-rtd-theme
- sphinxcontrib-bibtex
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

0 comments on commit 7efa54e

Please sign in to comment.