From 735302a7db9495a90103324d4316303253a3c614 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Fri, 8 Dec 2023 14:40:35 +0100 Subject: [PATCH] newer setuptools compatibility; silence pylint warnings on too many arguments for scenarion ctor (#92) --- .github/workflows/tests+pypi.yml | 18 ++++++++++++++++-- pyproject.toml | 2 ++ scenarios/cartesian.py | 2 +- scenarios/spherical.py | 2 +- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests+pypi.yml b/.github/workflows/tests+pypi.yml index a910462..afd51ae 100644 --- a/.github/workflows/tests+pypi.yml +++ b/.github/workflows/tests+pypi.yml @@ -136,9 +136,8 @@ jobs: name: plots path: plots - dist: + package: runs-on: ubuntu-latest - needs: [tests] steps: - uses: actions/checkout@v2 with: @@ -153,8 +152,23 @@ jobs: unset CI python -m build 2>&1 | tee build.log exit `fgrep -i warning build.log | wc -l` + - run: twine check --strict dist/* + - uses: actions/upload-artifact@v2 + with: + name: dist + path: dist + + dist: + runs-on: ubuntu-latest + needs: [package,tests] + steps: + - uses: actions/download-artifact@v2 + with: + name: dist + path: dist + - if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: pypa/gh-action-pypi-publish@unstable/v1 with: diff --git a/pyproject.toml b/pyproject.toml index 3cd3afc..835a3c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,8 @@ [tool.setuptools] py-modules = [] +[tool.setuptools_scm] + [build-system] requires = ["setuptools", "setuptools-scm"] build-backend = "setuptools.build_meta" diff --git a/scenarios/cartesian.py b/scenarios/cartesian.py index 04eaa19..ead7dd5 100644 --- a/scenarios/cartesian.py +++ b/scenarios/cartesian.py @@ -14,7 +14,7 @@ class CartesianScenario(_Scenario): [Arabas et al. 2014](https://doi.org/10.3233/SPR-140379) """ - def __init__( + def __init__( # pylint: disable=too-many-arguments self, *, mpdata_options, diff --git a/scenarios/spherical.py b/scenarios/spherical.py index b527eba..b173a44 100644 --- a/scenarios/spherical.py +++ b/scenarios/spherical.py @@ -85,7 +85,7 @@ class SphericalScenario(_Scenario): [Williamson & Rasch 1989](https://doi.org/10.1175/1520-0493(1989)117<0102:TDSLTW>2.0.CO;2) """ - def __init__( + def __init__( # pylint: disable=too-many-arguments self, *, mpdata_options, n_threads, grid, rank, size, courant_field_multiplier ): # pylint: disable=too-many-locals,invalid-name