Skip to content

Commit

Permalink
added py312 testbank (#540)
Browse files Browse the repository at this point in the history
* Update setup-python to v4 to support allow-prereleases tag

* added py312 testbank, no automatic running since it fails setting up the env

* added py313 testbank, allowing pre-releases, no automatic running since it fails setting up the env
  • Loading branch information
veenstrajelmer authored Sep 30, 2023
1 parent c110845 commit 697119a
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest-py310.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest-py311.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/pytest-py312.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: pytest-py312

on:
#push:
# branches: [ main ]
#pull_request:
# branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
#allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
python -m pip install -r requirements_dev.txt
- name: list env contents
run: |
conda info
conda list
pip list
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -m "not requireslocaldata" --cov=dfm_tools --cov-report xml --cov-report term
- uses: codecov/codecov-action@v1
42 changes: 42 additions & 0 deletions .github/workflows/pytest-py313.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: pytest-py313

on:
#push:
# branches: [ main ]
#pull_request:
# branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: '3.13'
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
python -m pip install -r requirements_dev.txt
- name: list env contents
run: |
conda info
conda list
pip list
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -m "not requireslocaldata" --cov=dfm_tools --cov-report xml --cov-report term
- uses: codecov/codecov-action@v1
2 changes: 1 addition & 1 deletion .github/workflows/pytest-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest-py39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[![pytest-py39](https://github.com/Deltares/dfm_tools/actions/workflows/pytest-py39.yml/badge.svg?branch=main)](https://github.com/Deltares/dfm_tools/actions/workflows/pytest-py39.yml)
[![pytest-py310](https://github.com/Deltares/dfm_tools/actions/workflows/pytest-py310.yml/badge.svg?branch=main)](https://github.com/Deltares/dfm_tools/actions/workflows/pytest-py310.yml)
[![pytest-py311](https://github.com/Deltares/dfm_tools/actions/workflows/pytest-py311.yml/badge.svg?branch=main)](https://github.com/Deltares/dfm_tools/actions/workflows/pytest-py311.yml)
[![pytest-py312](https://github.com/Deltares/dfm_tools/actions/workflows/pytest-py312.yml/badge.svg?branch=main)](https://github.com/Deltares/dfm_tools/actions/workflows/pytest-py312.yml)
[![codecov](https://img.shields.io/codecov/c/github/deltares/dfm_tools.svg?style=flat-square)](https://app.codecov.io/gh/deltares/dfm_tools?displayType=list)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Deltares_dfm_tools&metric=alert_status)](https://sonarcloud.io/summary/overall?id=Deltares_dfm_tools)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Deltares/dfm_tools/HEAD?urlpath=/tree/docs/notebooks)
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers =
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
#python 3.12 is not supported yet: https://github.com/Deltares/dfm_tools/issues/551

[options]
python_requires = >=3.8
Expand Down

0 comments on commit 697119a

Please sign in to comment.