Skip to content

Commit

Permalink
Merge pull request #159 from Becksteinlab/gh-ci
Browse files Browse the repository at this point in the history
switch to GitHub actions
  • Loading branch information
orbeckst authored Jul 22, 2021
2 parents d28ddb4 + 9570cbc commit f45ef5b
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 72 deletions.
101 changes: 101 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: CI

on:
# run once a day at 5:55 UTC
schedule:
- cron: "55 5 * * *"
push:
branches:
- "develop"
- "master"
pull_request:
branches:
- "develop"

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

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
python-version: [2.7]
#python-version: [2.7, 3.8]
#python-version: [2.7, 3.6, 3.7, 3.8, 3.9]
gromacs-version: ["4.6.5", "2018.6", "2019.1", "2021.1"]
# only test one GROMACS version on macOS to keep the testing
# matrix manageable
exclude:
- os: macOS-latest
gromacs-version: "4.6.5"
- os: macOS-latest
gromacs-version: "2018.6"
- os: macOS-latest
gromacs-version: "2019.1"

env:
MPLBACKEND: agg


steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
auto-update-conda: true
mamba-version: "*"
channels: conda-forge,bioconda,defaults
channel-priority: true
show-channel-urls: true

- name: Conda info
shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
- name: Python version
shell: bash -l {0}
run: |
python -c "import sys; print(sys.version)"
- name: Install package dependencies
shell: bash -l {0}
run: |
mamba install six numpy scipy matplotlib pandas scikit-learn pyyaml mdanalysis numexpr
python -m pip install --no-deps numkit gromacswrapper
python -m pip install alchemlyb
- name: Install pytest+plugins and pybol
shell: bash -l {0}
run: |
mamba install pytest pytest-pep8 pytest-cov codecov
python -m pip install pybol
- name: Install GROMACS (${{ matrix.gromacs-version }})
shell: bash -l {0}
run: |
mamba install 'gromacs==${{ matrix.gromacs-version }}' pocl
- name: Install package
shell: bash -l {0}
run: |
python -m pip install --no-deps .
- name: Run tests
shell: bash -l {0}
run: |
pytest -v --durations=20 --cov=mdpow --cov-report=xml ./mdpow/tests
- name: Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
60 changes: 0 additions & 60 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ Footnotes
.. [#GromacsWrapperNote] The package is built on top of the GromacsWrapper_
framework (which is automatically installed).
.. |build| image:: https://travis-ci.org/Becksteinlab/MDPOW.svg?branch=develop
.. |build| image:: https://github.com/Becksteinlab/MDPOW/actions/workflows/ci.yaml/badge.svg?branch=develop
:alt: Build Status
:target: https://travis-ci.org/Becksteinlab/MDPOW
:target: https://github.com/Becksteinlab/MDPOW/actions/workflows/ci.yaml

.. |cov| image:: https://codecov.io/github/Becksteinlab/MDPOW/coverage.svg?branch=develop
:alt: Coverage Status
Expand Down
3 changes: 2 additions & 1 deletion mdpow/forcefields.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
# POW package __init__.py
# Copyright (c) 2012 Oliver Beckstein <[email protected]>
# Released under the GNU Public License 3 (or higher, your choice)
Expand Down Expand Up @@ -146,7 +147,7 @@ def get_water_model(watermodel=DEFAULT_WATER_MODEL):

#: Other solvents (not water, see :data:`GROMACS_WATER_MODELS` for those).
new_octanol = '''Zangi R (2018) Refinement of the OPLSAA force-field
for liquid alcohols.; ACS Omega 3(12):1808918099.
for liquid alcohols.; ACS Omega 3(12):18089-18099.
doi: 10.1021/acsomega.8b03132'''

OPLS_SOLVENT_MODELS = {
Expand Down
2 changes: 1 addition & 1 deletion mdpow/tests/test_runinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class TestAlteredConfig(object):
'stepout': 12000,
'verbose': False,
'nice': 12,
'maxthreads': 3
'maxthreads': 1
}
}

Expand Down
6 changes: 5 additions & 1 deletion mdpow/tests/test_solvation.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ def test_solvation_octanol(setup, ff):
def test_solvation_cyclohexane(setup):
solvation(setup, "cyclohexane")

@pytest.mark.xfail("gromacs.release().startswith('2019')")
@pytest.mark.xfail(gromacs.release.startswith('4')
or gromacs.release.startswith('5')
or gromacs.release.startswith('2016'),
reason="GROMACS < 2018 cannot easily work with mixed solvents "
"(see issue #111)")
@pytest.mark.parametrize("ff", ['OPLS-AA', 'CHARMM', 'AMBER'])
def test_solvation_wetoctanol(setup, ff):
solvation(setup, "wetoctanol", ff)
4 changes: 1 addition & 3 deletions mdpow/tests/testing_resources/states/base/runinput.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ mdrun:
# report progress verbosely (True is -v)
nice: 19
# nicel level
maxthreads: 3
maxthreads: None
# maximum number of threads (-nt), 0 or None lets mdrun
# automatically choose
# For testing on travis, needs to be either 3 or 1.
# See https://github.com/Becksteinlab/MDPOW/pull/77
5 changes: 2 additions & 3 deletions mdpow/tests/testing_resources/states/md_npt/runinput.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ mdrun:
# report progress verbosely (True is -v)
nice: 19
# nicel level
maxthreads: 3
maxthreads: None
# maximum number of threads (-nt), 0 or None lets mdrun
# automatically choose
# For testing on travis, needs to be either 3 or 1.
# See https://github.com/Becksteinlab/MDPOW/pull/77

Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ mdrun:
# report progress verbosely (True is -v)
nice: 12
# nicel level
maxthreads: 3
maxthreads: 1
# maximum number of threads (-nt), 0 or None lets mdrun automatically choose

0 comments on commit f45ef5b

Please sign in to comment.