Skip to content

Commit

Permalink
Added compatibility with MDAnalysis 2.4 (#36)
Browse files Browse the repository at this point in the history
* Update propkatraj to be compatible with with MDAnalysis 2.x
- Removed the `get_propka` function (next version must be 2.0.0)
- PropkaTraj constructor accepts atom indices for selections
- Pandas Index with a dtype of float64 instead of Float64Index,
  per deprecation warning from Pandas
- Removed removed tests for `get_propka` and changed the baseanalysis
  test names to be being the standard
- Expanded parameters for `test_single_frame_regression`
- Removed MDAnalysis version constraint in setup.py
- Update dev environment requirements
* Added GitHub actions workflow
* Including pylintrc from MDAKit cookiecutter
* Added py311 to tested versions
  • Loading branch information
ianmkenney authored Feb 3, 2023
1 parent 20dbca2 commit f3c8f56
Show file tree
Hide file tree
Showing 12 changed files with 1,196 additions and 1,073 deletions.
141 changes: 141 additions & 0 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
name: GH Actions CI
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
schedule:
- cron: "0 0 * * 0"

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

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

jobs:
environment-config:
runs-on: ubuntu-latest
outputs:
stable-python-version: ${{ steps.get_python_version.outputs.python-version }}
steps:
- uses: actions/checkout@v3

- id: get-python-version
uses: MDAnalysis/get-latest-python-version@main
with:
last-n-minor-release: 1

main-tests:
if: "github.repository == 'Becksteinlab/propkatraj'"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
mdanalysis-version: ["latest", "develop"]

steps:
- uses: actions/checkout@v3
- name: Build information
run: |
uname -a
df -h
ulimit -a
- name: Install conda dependencies
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
environment-file: devtools/environment.yml
add-pip-as-python-dependency: true
architecture: x64

miniforge-variant: Mambaforge
use-mamba: true
channels: conda-forge, defaults

activate-environment: propkatraj-test
auto-update-conda: true
auto-activate-base: false
show-channel-urls: true

- name: Install MDAnalysis version
uses: MDAnalysis/install-mdanalysis@main
with:
version: ${{ matrix.mdanalysis-version }}
install-tests: true
installer: mamba
shell: bash -l {0}

- name: Install package
run: |
python --version
python -m pip install . --no-deps
- name: Python information
run: |
which python
which pip
pip list
conda info
conda list
- name: Run tests
run: |
pytest -v --color=yes propkatraj/tests/
pylint_check:
if: "github.repository == 'Becksteinlab/propkatraj'"
needs: environment-config
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ needs.environment-config.outputs.stable-python-version }}

- name: Install Pylint
run: |
which pip
which python
pip install pylint MDAnalysis>=2.0.0
- name: Run Pylint
env:
PYLINTRC: .pylintrc
run: |
pylint propkatraj
pypi_check:
if: "github.repository == 'Becksteinlab/propkatraj'"
needs: environment-config
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ needs.environment-config.outputs.stable-python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ needs.environment-config.outputs.stable-python-version }}

- name: Install dependencies
run: |
pip install setuptools cython numpy twine
- name: Build package
run: |
python setup.py sdist
- name: Check package build
run: |
DISTRIBUTION=$(ls -t1 dist/propkatraj-*.tar.gz | head -n 1)
test -n "${DISTRIBUTION}" || { echo "no distribution dist/propkatraj-*.tar.gz found"; exit 1; }
echo "twine check $DISTRIBUTION"
twine check $DISTRIBUTION
Loading

0 comments on commit f3c8f56

Please sign in to comment.