Read user forces in narupa.mdanalysis.universe #71
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [push] | |
name: "Tests and validation" | |
jobs: | |
python-tests: | |
name: Python unit and integration tests | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
# This is necessary for the conda action. It replaces `conda init` as | |
# the shell does not load ,profile or .bashrc. | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
miniforge-version: latest | |
- name: Install narupa dependancies | |
run: conda install mpi4py openmm | |
- name: Install tests dependancies | |
run: python -m pip install -r python-libraries/requirements.test | |
- name: Compile | |
run: ./compile.sh --no-dotnet | |
- name: Parallel tests | |
run: python -m pytest --cov narupa python-libraries -n auto -m 'not serial' | |
- name: Serial tests | |
run: python -m pytest --cov narupa python-libraries -n auto -m 'serial' | |
mypy: | |
name: Type analysis for python | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
# This is necessary for the conda action. It replaces `conda init` as | |
# the shell does not load ,profile or .bashrc. | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
miniforge-version: latest | |
- name: Install narupa dependancies | |
run: conda install mpi4py openmm | |
- name: Install tests dependancies | |
run: python -m pip install -r python-libraries/requirements.test | |
- name: Compile | |
run: ./compile.sh --no-dotnet | |
- name: mypy | |
run: | | |
# Mypy accepts paths, modules or packages as inputs. However, only | |
# packages work reasonably well with packages. So we need to generate | |
# a list of the packages we want to test. | |
packages=$(find python-libraries -name __init__.py \ | |
| sed 's/__init__.py//g' \ | |
| awk '{split($0, a, /src/); print(a[2])}' \ | |
| sed 's#/#.#g' \ | |
| cut -c 2- \ | |
| sed 's/\.$//g' \ | |
| grep -v '^$' \ | |
| grep -v protocol \ | |
| sed 's/^/-p /g' \ | |
| grep -v '\..*\.' \ | |
| tr '\n' ' ') | |
mypy --ignore-missing-imports --namespace-packages --check-untyped-defs --allow-redefinition $packages | |
ruff: | |
name: Ruff to lint python code | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
# This is necessary for the conda action. It replaces `conda init` as | |
# the shell does not load ,profile or .bashrc. | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
miniforge-version: latest | |
- name: Install narupa dependancies | |
run: conda install mpi4py openmm | |
- name: Install ruff | |
run: python -m pip install ruff black | |
- name: Compile | |
run: ./compile.sh --no-dotnet | |
- name: Ruff | |
run: ruff ./python-libraries | |
- name: Black | |
run: black --diff --check ./python-libraries | |
csharp-tests: | |
name: C# unit and integration tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '2.1.x' | |
- name: Compile | |
run: ./compile.sh --no-python | |
- name: Tests | |
run: cd ./csharp-libraries && dotnet test |