Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI #235

Merged
merged 19 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 21 additions & 32 deletions .github/workflows/continous_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,43 @@ name: tests
on:
push:
schedule:
- cron: '0 0 * * *'
- cron: '0 3 * * *'
workflow_dispatch:

jobs:
defaults:
run:
shell: bash -leo pipefail {0} {0}

jobs:
test:

runs-on: ${{ matrix.os }}

strategy:

matrix:
os: ["macOS-latest", "ubuntu-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
pymbar-version: ["pymbar3", "pymbar4"]
os:
- "macOS-12"
- "ubuntu-latest"
python-version:
- "3.10"
- "3.11"
pymbar-version:
- "pymbar3"
- "pymbar4"

steps:
- uses: actions/checkout@v4

- name: Setup Miniconda
uses: conda-incubator/setup-[email protected]
- name: Setup conda environment
uses: mamba-org/setup-micromamba@v1
with:
python-version: ${{ matrix.python-version }}
activate-environment: test-${{ matrix.pymbar-version }}
channel-priority: true
environment-file: devtools/conda-envs/test-${{ matrix.pymbar-version }}_env.yaml
auto-activate-base: false

- name: Additional info about the build
run: |
uname -a
df -h
ulimit -a
create-args: >-
python=${{ matrix.python-version }}

- name: Install package
shell: bash -l {0}
run: |
python -m pip install --no-deps .

- name: Environment information
shell: bash -l {0}
run: |
conda info
conda list
run: python -m pip install --no-deps .

- name: Run tests
shell: bash -l {0}
run: |
pytest -v --cov=physical_validation --cov-report=xml physical_validation/tests/
run: pytest -v --cov=physical_validation --cov-report=xml physical_validation/tests/

- name: Code coverage
uses: codecov/codecov-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:

- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.7'
python-version: '3.11'
- name: Install the package
run: |
python setup.py develop --no-deps
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
autoupdate_schedule: "quarterly"
repos:
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.4.2
hooks:
- id: black
files: ^physical_validation
Expand All @@ -12,7 +12,7 @@ repos:
- id: isort
files: ^physical_validation
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
rev: 7.1.0
hooks:
- id: flake8
files: ^physical_validation
6 changes: 2 additions & 4 deletions devtools/conda-envs/test-pymbar3_env.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: test-pymbar3
channels:
- conda-forge
- bioconda
dependencies:
# Base depends
- python
Expand All @@ -11,11 +10,10 @@ dependencies:
- pytest
- pytest-cov
- pytest-regressions
- codecov
- gromacs
- gromacs ~=2023.4

# Standard dependencies
- numpy
- scipy
- matplotlib
- pymbar >=3,<4 # See issue #216
- pymbar =3 # See issue #216
6 changes: 2 additions & 4 deletions devtools/conda-envs/test-pymbar4_env.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: test-pymbar4
channels:
- conda-forge
- bioconda
dependencies:
# Base depends
- python
Expand All @@ -11,11 +10,10 @@ dependencies:
- pytest
- pytest-cov
- pytest-regressions
- codecov
- gromacs
- gromacs ~=2023.4

# Standard dependencies
- numpy
- scipy
- matplotlib
- pymbar >=4
- pymbar =4
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx==4.2.0
sphinx==5.0.2
nbsphinx==0.8.7
sphinx_rtd_theme==1.0.0
8 changes: 5 additions & 3 deletions physical_validation/tests/test_data_gromacs_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ def get_gromacs_simulation_data(
mdp=gromacs_files["parameters"],
top=gromacs_files["topology"],
edr=gromacs_files["energy"],
gro=gromacs_files["final configuration"]
if not use_full_trajectory
else None,
gro=(
gromacs_files["final configuration"]
if not use_full_trajectory
else None
),
trr=gromacs_files["trajectory"] if use_full_trajectory else None,
)

Expand Down
1 change: 1 addition & 0 deletions physical_validation/util/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

class PhysicalValidationError(Exception):
r"""Base class for exceptions in the physical_validation module."""

pass


Expand Down
Loading