Skip to content

Commit

Permalink
NEq cycling rebase using openfe utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ijpulidos authored Oct 13, 2023
2 parents ccf677c + 81e1b80 commit cf0c2de
Show file tree
Hide file tree
Showing 8 changed files with 357 additions and 100 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: "CI"
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# At 07:00 UTC on Monday and Thursday.
- cron: "0 7 * * *"
release:
types:
- published

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

defaults:
run:
shell: bash -l {0}

jobs:
tests:
runs-on: ${{ matrix.os }}-latest
name: "💻-${{matrix.os }} 🐍-${{ matrix.python-version }}"
strategy:
fail-fast: false
matrix:
os: ["ubuntu"]
python-version:
- "3.9"
- "3.10"
- "3.11"
include:
- os: "macos"
python-version: "3.11"

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Setup Micromamba"
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: feflow-env
cache-environment: true
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
init-shell: bash

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

- name: "Test imports"
run: |
# if we add more to this, consider changing to for + env vars
python -Ic "import feflow; print(feflow.__version__)"
- name: "Environment Information"
run: |
micromamba info
micromamba list
- name: "Run tests"
env:
# Set the OFE_SLOW_TESTS to True if running a Cron job
OFE_SLOW_TESTS: ${{ fromJSON('{"false":"false","true":"true"}')[github.event_name != 'pull_request'] }}
run: |
pytest -n auto -v --cov=feflow --cov-report=xml --durations=10
- name: codecov
if: ${{ github.repository == 'choderalab/feflow'
&& github.event_name == 'pull_request' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
fail_ci_if_error: False
verbose: True
12 changes: 2 additions & 10 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,18 @@ name: feflow-test
channels:
- conda-forge
- defaults
- openeye # TODO: Remove once we don't depend on openeye
dependencies:
# Base depends
- gufe
- openfe # TODO: Remove once we don't depend on openfe
- python
- pip

# Perses depends (TODO: Remove once we don't depend on perses)
- openmoltools
- cloudpathlib
- dask
- openeye-toolkits

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

# Pip-only installs
- pip:
- git+https://github.com/choderalab/perses.git@protocol-neqcyc # TODO: Remove once it only depends on openmmtools/openfe
# - codecov

7 changes: 3 additions & 4 deletions feflow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Recipes and protocols for molecular free energy calculations using the openmmtools/perses and Open Free Energy toolkits"""

# Add imports here
from .feflow import *
"""Recipes and protocols for molecular free energy calculations using the
openmmtools/perses and Open Free Energy toolkits"""

from importlib.metadata import version
__version__ = version("openfe")
Loading

0 comments on commit cf0c2de

Please sign in to comment.