Skip to content

Commit

Permalink
chore: drop python 3.8 support (#710)
Browse files Browse the repository at this point in the history
* dropped python 3.8 support

* updated netcdf4 version specification to include new 1.7.2

* remove py38 from tests/ci

* updated workflow action versions

* updated docs
  • Loading branch information
veenstrajelmer authored Oct 23, 2024
1 parent 02e3eec commit ffb328d
Show file tree
Hide file tree
Showing 10 changed files with 535 additions and 633 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.12"]
python-version: ["3.9", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Run image
uses: abatilo/actions-poetry@v2
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.8.2
poetry-version: 1.8.3
- name: Cache Poetry virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: ~/.virtualenvs
Expand All @@ -40,11 +40,16 @@ jobs:
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'

- name: list env contents
run: |
poetry show
pip list
- name: Test with pytest
run: poetry run pytest --cov . --cov-report xml:coverage-reports/coverage-hydrolib-core.xml --junitxml=xunit-reports/xunit-result-hydrolib-core.xml

- name: Autoformat code if the check fails
if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.python-version == 3.8) }}
if: ${{ (matrix.os == 'ubuntu-latest') && (matrix.python-version == 3.12) }}
run: |
poetry run isort .
poetry run black .
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: 1.4.0
poetry-version: 1.8.3
- name: Cache Poetry virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: ~/.virtualenvs
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: 1.4.0
poetry-version: 1.8.3
- name: Cache Poetry virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: ~/.virtualenvs
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.9]
python-version: [3.12]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: 1.4.0
poetry-version: 1.8.3

- name: Cache Poetry virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: ~/.virtualenvs
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.12

- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: 1.4.0
poetry-version: 1.8.3

- name: Cache Poetry virtualenv
uses: actions/cache@v3
uses: actions/cache@v4
id: cache
with:
path: ~/.virtualenvs
key: venv-ubuntu-latest-3.8-${{ hashFiles('**/poetry.lock') }}
key: venv-ubuntu-latest-${{ hashFiles('**/poetry.lock') }}

- name: Set Poetry config
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ When starting development on a branch, a pull request should be created for revi
In the description text area on GitHub, use a [closing keyword](https://docs.github.com/articles/closing-issues-using-keywords) such that this PR will be automatically linked to the issue.
For example: `Fixes #160`.

During continuous integration, the checks will be run with python 3.8, 3.9 and 3.12 on Windows, Ubuntu and MacOS. The checks consist of running the tests, checking the code formatting and running SonarCloud.
During continuous integration, the checks will be run with several Python versions on Windows, Ubuntu and MacOS. The checks consist of running the tests, checking the code formatting and running SonarCloud.
We advise to use a draft pull request, to prevent the branch to be merged back before developement is finished. When the branch is ready for review, you can update the status of the pull request to "ready for review".

### Reviews
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pip install hydrolib-core

If you want to create a fresh test environment for hydrolib-core, you could use the following command (only once):
``` bash
conda create -n hydrolib python=3.8 -c conda-forge
conda create -n hydrolib python=3.12 -c conda-forge
```
Prior to the `pip install`, first activate the desired environment:
``` bash
Expand Down
Loading

0 comments on commit ffb328d

Please sign in to comment.