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

Remove environment config from CI #50

Merged
merged 4 commits into from
Jul 6, 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
43 changes: 14 additions & 29 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/transport-analysis'"
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 @@ -58,10 +48,9 @@ jobs:
df -h
ulimit -a


# 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 +66,6 @@ jobs:
auto-activate-base: false
show-channel-urls: true


- name: Install MDAnalysis version
uses: MDAnalysis/install-mdanalysis@main
with:
Expand All @@ -100,23 +88,22 @@ jobs:
conda info
conda list


- name: Run tests
run: |
pytest -n 2 -v --cov=transport_analysis --cov-report=xml --color=yes transport_analysis/tests/
pytest -n auto -v --cov=transport_analysis --cov-report=xml --color=yes transport_analysis/tests/

- name: codecov
if: github.repository == 'MDAnalysis/transport-analysis' && 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/transport-analysis'"
needs: environment-config
runs-on: ubuntu-latest

steps:
Expand All @@ -125,7 +112,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 +129,6 @@ jobs:

black_check:
if: "github.repository == 'MDAnalysis/transport-analysis'"
needs: environment-config
runs-on: ubuntu-latest

steps:
Expand All @@ -156,16 +142,15 @@ jobs:

pypi_check:
if: "github.repository == 'MDAnalysis/transport-analysis'"
needs: environment-config
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ needs.environment-config.outputs.stable-python-version }}
- 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 dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ xhgchen, hmacdope, orionarcher, IAlibay

### Changed
<!-- Changes in existing functionality -->
* Minimum Python version has been increased to 3.10 (PR #50)
* Minimum MDAnalysis version has been increased to 2.1.0 (PR #50)

### Deprecated
<!-- Soon-to-be removed features -->
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ maintainers = [
{name = "Xu Hong Chen", email = "[email protected]"},
]
readme = "README.md"
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"MDAnalysis>=2.0.0",
"MDAnalysis>=2.1.0",
"tidynamics>=1.0.0",
]
keywords = [
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
# Customize MANIFEST.in if the general case does not suit your needs
# Comment out this line to prevent the files from being packaged with your software
include_package_data=True,
python_requires=">=3.9", # Python version restrictions
python_requires=">=3.10", # Python version restrictions
# Allows `setup.py test` to work correctly with pytest
setup_requires=[] + pytest_runner,
# Required packages, pulls from pip if needed
# do not use for Conda deployment
install_requires=[
"mdanalysis>=2.0.0",
"mdanalysis>=2.1.0",
"tidynamics>=1.0.0",
],
# Additional entries you may want simply uncomment the lines you want and fill in the data
Expand Down
Loading