Skip to content

Commit

Permalink
update tox configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeitsperre committed Nov 14, 2024
1 parent 071188c commit e988018
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ] # 'macos-latest' disabled until a new build of raven-hydro is available
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
python-version: [ "3.9", "3.11", "3.12" ]
# - "3.13" # not yet supported by dependencies
upstream-branch: [ 'main' ]
include:
- os: 'ubuntu-latest'
python-version: '3.10'
upstream: true
upstream-branch: 'main'
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
Expand Down Expand Up @@ -113,7 +113,11 @@ jobs:
python3 -m pip install --require-hashes -r CI/requirements_ci.txt
- name: Test with tox and report coverage
run: |
python3 -m tox
if [ "${{ matrix.upstream }}" = "true" ]; then
python3 -m tox -e py${{ matrix.python-version }}-coveralls-${{ matrix.upstream-branch }}
else
python3 -m tox -e py${{ matrix.python-version }}-coveralls
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: run-Python${{ matrix.python-version }}-${{ matrix.os }}
Expand All @@ -128,8 +132,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
os: [ "ubuntu-latest" ]
# - macos-latest # disabled until a new build of raven-hydro is available
# - windows-latest # disabled until xesmf is available
python-version: [ "3.9", "3.10", "3.11", "3.12" ]
Expand Down
2 changes: 1 addition & 1 deletion src/ravenpy/config/rvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def set_params(self, params: Union[dict, Sequence]) -> "Config":
# Create params with numerical values
if not self.is_symbolic:
raise ValueError(
"Setting `params` on a configuration without symbolic expressions has no effect."
"Setting `params` on a configuration without symbolic expressions has no effect. "
"Leave `params` to its default value when instantiating the emulator configuration."
)

Expand Down
13 changes: 7 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
min_version = 4.18.0
envlist =
lint
py{39,310,311,312,313}
py{3.9,3.10,3.11,3.12,3.13}
docs
requires =
flit >= 3.9.0,<4.0
Expand All @@ -13,11 +13,11 @@ opts =

[gh]
python =
3.9 = py39-coveralls
3.10 = py310-coveralls-upstream
3.11 = py311-coveralls
3.12 = py312-coveralls
3.13 = py313-coveralls
3.9 = py3.9-coveralls
3.10 = py3.10-coveralls-upstream
3.11 = py3.11-coveralls
3.12 = py3.12-coveralls
3.13 = py3.13-coveralls

[testenv:lint]
skip_install = True
Expand Down Expand Up @@ -46,6 +46,7 @@ allowlist_externals =
setenv =
PYTEST_ADDOPTS = --numprocesses=logical --durations=10
PYTHONPATH = {toxinidir}
UPSTREAM_BRANCH = main
passenv =
CI
COVERALLS_*
Expand Down

0 comments on commit e988018

Please sign in to comment.