Skip to content

Commit

Permalink
Merge pull request #15 from craabreu/github_action_ci
Browse files Browse the repository at this point in the history
Continuous Integration via Github Actions
  • Loading branch information
craabreu committed Apr 17, 2023
2 parents 73f0a95 + 6cbb4b4 commit 2583fd3
Show file tree
Hide file tree
Showing 10 changed files with 193 additions and 126 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/Linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Linux

on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# The cookiecutter uses the "--initial-branch" flag when it runs git-init
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
# Weekly tests run on main by default:
# Scheduled workflows run on the latest commit on the default or base branch.
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * 0"

jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8, 3.9, "3.10"]

steps:
- 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/marketplace/actions/provision-with-micromamba
- uses: mamba-org/provision-with-micromamba@main
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: test
channels: conda-forge
extra-specs: |
python=${{ matrix.python-version }}
- name: Install package
# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
micromamba list
- name: Run tests
# conda setup requires this special shell
shell: bash -l {0}
run: |
pytest -v --cov=ufedmm --cov-report=xml --color=yes --doctest-modules ufedmm/
- name: CodeCov
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
59 changes: 59 additions & 0 deletions .github/workflows/MacOS.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: MacOS

on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# The cookiecutter uses the "--initial-branch" flag when it runs git-init
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
# Weekly tests run on main by default:
# Scheduled workflows run on the latest commit on the default or base branch.
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * 0"

jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest]
python-version: [3.8, 3.9, "3.10"]
openmm-version: ["8.0"]

steps:
- 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/marketplace/actions/provision-with-micromamba
- uses: mamba-org/provision-with-micromamba@main
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: test
channels: conda-forge
extra-specs: |
python=${{ matrix.python-version }}
openmm=${{ matrix.openmm-version }}
- name: Install package
# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
micromamba list
- name: Run tests
# conda setup requires this special shell
shell: bash -l {0}
run: |
pytest -v --cov=ufedmm --cov-report=xml --color=yes --doctest-modules ufedmm/
59 changes: 59 additions & 0 deletions .github/workflows/Windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Windows

on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# The cookiecutter uses the "--initial-branch" flag when it runs git-init
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
# Weekly tests run on main by default:
# Scheduled workflows run on the latest commit on the default or base branch.
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * 0"

jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python-version: [3.8, 3.9, "3.10"]
openmm-version: ["8.0"]

steps:
- 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/marketplace/actions/provision-with-micromamba
- uses: mamba-org/provision-with-micromamba@main
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: test
channels: conda-forge
extra-specs: |
python=${{ matrix.python-version }}
openmm=${{ matrix.openmm-version }}
- name: Install package
# conda setup requires this special shell
shell: bash -l {0}
run: |
python -m pip install . --no-deps
micromamba list
- name: Run tests
# conda setup requires this special shell
shell: bash -l {0}
run: |
pytest -v --cov=ufedmm --cov-report=xml --color=yes --doctest-modules ufedmm/
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ Unified Free Energy Dynamics with OpenMM

[//]: # (Badges)
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)]()
[![Travis Build Status](https://travis-ci.org/craabreu/ufedmm.png)](https://travis-ci.org/craabreu/ufedmm)
[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/8p0jxlr3ly3bta06/branch/master?svg=true)](https://ci.appveyor.com/project/craabreu/ufedmm/branch/master)

[//]: # (Badges)
[![GitHub Actions Build Status](https://github.com/RedesignScience/ufedmm/workflows/Linux/badge.svg)](https://github.com/RedesignScience/ufedmm/actions?query=workflow%3ALinux)
[![GitHub Actions Build Status](https://github.com/RedesignScience/ufedmm/workflows/MacOS/badge.svg)](https://github.com/RedesignScience/ufedmm/actions?query=workflow%3AMacOS)
[![GitHub Actions Build Status](https://github.com/RedesignScience/ufedmm/workflows/Windows/badge.svg)](https://github.com/RedesignScience/ufedmm/actions?query=workflow%3AWindows)
[![codecov](https://codecov.io/gh/craabreu/ufedmm/branch/master/graph/badge.svg)](https://codecov.io/gh/craabreu/ufedmm/branch/master)
[![Documentation Status](https://readthedocs.org/projects/ufedmm/badge/?style=flat)](https://readthedocs.org/projects/ufedmm)

Expand Down
43 changes: 0 additions & 43 deletions appveyor.yml

This file was deleted.

14 changes: 3 additions & 11 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,15 @@ channels:
- conda-forge
dependencies:
# Base depends
- pip
- python
- sphinxcontrib-bibtex

- pip
- numpy
- openmm >=7.6
- openmm
- pandas
- pyyaml
- scipy
- yaml

# Testing
- flake8
- isort
- pytest
- pytest-cov

# Pip-only installs
- pip:
- codecov
- codecov
9 changes: 0 additions & 9 deletions devtools/run_tests.sh

This file was deleted.

3 changes: 3 additions & 0 deletions devtools/scripts/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

pytest -v -s --cov=ufedmm --cov-report=term-missing --cov-report=html --pyargs --doctest-modules "$@" ufedmm
8 changes: 0 additions & 8 deletions ufedmm/integrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ def add_inner_nonbonded_force(system, inner_switch, inner_cutoff, force_group_in
>>> gamma = 10/unit.picoseconds
>>> model = ufedmm.AlanineDipeptideModel()
>>> ufedmm.add_inner_nonbonded_force(model.system, 5*unit.angstroms, 8*unit.angstroms, 1)
>>> for force in model.system.getForces():
... print(force.__class__.__name__, force.getForceGroup())
HarmonicBondForce 0
HarmonicAngleForce 0
PeriodicTorsionForce 0
NonbondedForce 2
CustomNonbondedForce 1
CustomBondForce 1
"""
if openmm.__version__ < '7.5':
Expand Down

0 comments on commit 2583fd3

Please sign in to comment.