Skip to content

Commit

Permalink
Update CI (#36)
Browse files Browse the repository at this point in the history
* Update CI to exclude Python 3.12 + the latest release of MDAnalysis from the test matrix
* update to python 3.10+ and MDA 2.1.0+
  • Loading branch information
IAlibay authored Apr 29, 2024
1 parent 0507469 commit a30f466
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 29 deletions.
39 changes: 13 additions & 26 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,21 @@ defaults:
shell: bash -l {0}

jobs:
environment-config:
runs-on: ubuntu-latest
outputs:
stable-python-version: ${{ steps.get-compatible-python.outputs.stable-python }}
python-matrix: ${{ steps.get-compatible-python.outputs.python-versions }}
steps:
- uses: actions/setup-python@v4
with:
python-version: "3.11"

- id: get-compatible-python
uses: MDAnalysis/mdanalysis-compatible-python@main
with:
release: "latest"

main-tests:
if: "github.repository == 'MDAnalysis/waterdynamics'"
needs: environment-config
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: ${{ fromJSON(needs.environment-config.outputs.python-matrix) }}
python-version: ["3.10", "3.11", "3.12"]
mdanalysis-version: ["latest", "develop"]
# Manually exclude any combinations of the test matrix that can't be run
exclude:
# The latest release of MDAnalysis only supports up to Python 3.11
# so we exclude 3.12 from the test matrix (issue #37)
- python-version: "3.12"
mdanalysis-version: "latest"

steps:
- uses: actions/checkout@v4
Expand All @@ -61,7 +51,7 @@ jobs:
# More info on options: https://github.com/conda-incubator/setup-miniconda
- name: Install conda dependencies
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
environment-file: devtools/conda-envs/test_env.yaml
Expand All @@ -77,7 +67,6 @@ jobs:
auto-activate-base: false
show-channel-urls: true


- name: Install MDAnalysis version
uses: MDAnalysis/install-mdanalysis@main
with:
Expand All @@ -100,23 +89,22 @@ jobs:
conda info
conda list
- name: Run tests
run: |
pytest -n 2 -v --cov=waterdynamics --cov-report=xml --color=yes waterdynamics/tests/
pytest -n auto -v --cov=waterdynamics --cov-report=xml --color=yes waterdynamics/tests/
- name: codecov
if: github.repository == 'MDAnalysis/waterdynamics' && github.event_name != 'schedule'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: coverage.xml
name: codecov-${{ matrix.os }}-py${{ matrix.python-version }}
verbose: True
token: ${{ secrets.CODECOV_TOKEN }}


pylint_check:
if: "github.repository == 'MDAnalysis/waterdynamics'"
needs: environment-config
runs-on: ubuntu-latest

steps:
Expand All @@ -125,7 +113,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ needs.environment-config.outputs.stable-python-version }}
python-version: "3.11"

- name: Install Pylint
run: |
Expand All @@ -142,7 +130,6 @@ jobs:
pypi_check:
if: "github.repository == 'MDAnalysis/waterdynamics'"
needs: environment-config
runs-on: ubuntu-latest

steps:
Expand All @@ -151,7 +138,7 @@ jobs:
- 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 }}
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ The rules for this file:

### Authors
- fiona-naughton
- IAlibay

### Added

### Fixed

### Changed
- update changelog (PR #32)
- In line with SPEC0, the minimum supported Python version is now 3.10
- Minimum support MDAnalysis version has been raised to 2.1.0

## [1.1.0] - 2024-01-11

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@ classifiers = [
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
]
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"MDAnalysis>=2.0.0",
"MDAnalysis>=2.1.0",
"numpy>=1.22.3",
]
keywords = [
Expand Down

0 comments on commit a30f466

Please sign in to comment.