From baa3b22632fe04d02afc3dc1bf430fe071a2d9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20S=C3=B8rli?= <81353974+arneso-ssb@users.noreply.github.com> Date: Mon, 8 Apr 2024 19:31:54 +0200 Subject: [PATCH] Update to newest version of ssb-pypitemplate --- .cruft.json | 2 +- .github/workflows/constraints.txt | 4 ++-- .github/workflows/docs.yml | 8 +++---- .github/workflows/release.yml | 12 +++++------ .github/workflows/tests.yml | 36 +++++++++++++++---------------- .pre-commit-config.yaml | 2 +- CONTRIBUTING.md | 2 +- noxfile.py | 2 +- pyproject.toml | 6 +++--- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.cruft.json b/.cruft.json index 84eee87..7c05cb2 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/statisticsnorway/ssb-pypitemplate.git", - "commit": "e81154758223bbeb62e2117de27029295c13e126", + "commit": "be07b1714e102b263e86c5f6f5578af4db38a03e", "checkout": null, "context": { "cookiecutter": { diff --git a/.github/workflows/constraints.txt b/.github/workflows/constraints.txt index 35433f6..3cffcc0 100644 --- a/.github/workflows/constraints.txt +++ b/.github/workflows/constraints.txt @@ -1,5 +1,5 @@ pip==24.0 -nox==2023.4.22 +nox==2024.3.2 nox-poetry==1.0.3 -poetry==1.8.1 +poetry==1.8.2 virtualenv==20.25.1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c98b026..9be33e4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,13 +30,13 @@ jobs: - name: Install Poetry run: | - pipx install --pip-args "-c .github/workflows/constraints.txt" poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry poetry --version - name: Set up Python - uses: actions/setup-python@v5.0.0 + uses: actions/setup-python@v5.1.0 with: - python-version: "3.11" + python-version: "3.12" cache: "poetry" - name: Install dependencies @@ -60,7 +60,7 @@ jobs: needs: build steps: - name: Setup Pages - uses: actions/configure-pages@v4 + uses: actions/configure-pages@v5 - name: Deploy to GitHub Pages id: deployment diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dbb6329..0b6abc7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,18 +21,18 @@ jobs: fetch-depth: 2 - name: Set up Python - uses: actions/setup-python@v5.0.0 + uses: actions/setup-python@v5.1.0 with: - python-version: "3.11" + python-version: "3.12" - name: Upgrade pip run: | - pip install -c .github/workflows/constraints.txt pip + pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt pip pip --version - name: Install Poetry run: | - pip install -c .github/workflows/constraints.txt poetry + pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt poetry poetry --version - name: Check if there is a parent commit @@ -61,11 +61,11 @@ jobs: - name: Publish package on PyPI if: steps.check-version.outputs.tag - uses: pypa/gh-action-pypi-publish@v1.8.12 + uses: pypa/gh-action-pypi-publish@v1.8.14 - name: Publish package on TestPyPI if: (!steps.check-version.outputs.tag) - uses: pypa/gh-action-pypi-publish@v1.8.12 + uses: pypa/gh-action-pypi-publish@v1.8.14 with: repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 80ea694..193954e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,16 +16,16 @@ jobs: matrix: include: - { python: "3.10", os: "ubuntu-latest", session: "pre-commit" } - - { python: "3.11", os: "ubuntu-latest", session: "mypy" } - { python: "3.10", os: "ubuntu-latest", session: "mypy" } - - { python: "3.9", os: "ubuntu-latest", session: "mypy" } - - { python: "3.11", os: "ubuntu-latest", session: "tests" } + - { python: "3.11", os: "ubuntu-latest", session: "mypy" } + - { python: "3.12", os: "ubuntu-latest", session: "mypy" } - { python: "3.10", os: "ubuntu-latest", session: "tests" } - - { python: "3.9", os: "ubuntu-latest", session: "tests" } - - { python: "3.11", os: "windows-latest", session: "tests" } - - { python: "3.11", os: "macos-latest", session: "tests" } + - { python: "3.11", os: "ubuntu-latest", session: "tests" } + - { python: "3.12", os: "ubuntu-latest", session: "tests" } + - { python: "3.12", os: "windows-latest", session: "tests" } + - { python: "3.12", os: "macos-latest", session: "tests" } - { python: "3.10", os: "ubuntu-latest", session: "typeguard" } - - { python: "3.11", os: "ubuntu-latest", session: "xdoctest" } + - { python: "3.10", os: "ubuntu-latest", session: "xdoctest" } - { python: "3.10", os: "ubuntu-latest", session: "docs-build" } env: @@ -38,13 +38,13 @@ jobs: uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v5.0.0 + uses: actions/setup-python@v5.1.0 with: python-version: ${{ matrix.python }} - name: Upgrade pip run: | - pip install -c .github/workflows/constraints.txt pip + pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt pip pip --version - name: Upgrade pip in virtual environments @@ -58,13 +58,13 @@ jobs: - name: Install Poetry run: | - pipx install --pip-args "-c .github/workflows/constraints.txt" poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry poetry --version - name: Install Nox run: | - pipx install --pip-args "-c .github/workflows/constraints.txt" nox - pipx inject --pip-args "-c .github/workflows/constraints.txt" nox nox-poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox + pipx inject --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox nox-poetry nox --version - name: Compute pre-commit cache key @@ -120,24 +120,24 @@ jobs: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Set up Python - uses: actions/setup-python@v5.0.0 + uses: actions/setup-python@v5.1.0 with: - python-version: "3.11" + python-version: "3.12" - name: Upgrade pip run: | - pip install -c .github/workflows/constraints.txt pip + pip install -c ${{ github.workspace }}/.github/workflows/constraints.txt pip pip --version - name: Install Poetry run: | - pipx install --pip-args "-c .github/workflows/constraints.txt" poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" poetry poetry --version - name: Install Nox run: | - pipx install --pip-args "-c .github/workflows/constraints.txt" nox - pipx inject --pip-args "-c .github/workflows/constraints.txt" nox nox-poetry + pipx install --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox + pipx inject --pip-args "-c ${{ github.workspace }}/.github/workflows/constraints.txt" nox nox-poetry nox --version - name: Download coverage data diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc13de3..926462b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,7 +68,7 @@ repos: stages: [manual] - id: ruff name: ruff - entry: ruff --fix --exit-non-zero-on-fix + entry: ruff check --fix --exit-non-zero-on-fix language: system types_or: [python, jupyter] require_serial: true diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dcc5ecc..b9b3252 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ Request features on the [Issue Tracker]. ## How to set up your development environment -You need Python 3.9+ and the following tools: +You need Python 3.10+ and the following tools: - [Poetry] - [Nox] diff --git a/noxfile.py b/noxfile.py index 41b7c37..74eff9c 100644 --- a/noxfile.py +++ b/noxfile.py @@ -23,7 +23,7 @@ raise SystemExit(dedent(message)) from None package = "ssb_konjunk" -python_versions = ["3.10", "3.11", "3.9"] +python_versions = ["3.10", "3.11", "3.12"] nox.needs_version = ">= 2021.6.6" nox.options.sessions = ( "pre-commit", diff --git a/pyproject.toml b/pyproject.toml index 9882505..642f225 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ classifiers = ["Development Status :: 1 - Planning"] Changelog = "https://github.com/statisticsnorway/ssb-konjunk/releases" [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" click = ">=8.0.1" pandas = "^2.2.0" @@ -36,7 +36,7 @@ sphinx-click = ">=3.0.2" typeguard = ">=2.13.3" xdoctest = { extras = ["colors"], version = ">=0.15.10" } myst-parser = { version = ">=0.16.1" } -pandas-stubs = "^2.1.4.231227" +pandas-stubs = ">=2.1.4.231227" [tool.pytest.ini_options] @@ -69,7 +69,7 @@ show_error_context = true force-exclude = true # Apply excludes to pre-commit show-fixes = true src = ["src", "tests"] -target-version = "py39" # Minimum Python version supported +target-version = "py310" # Minimum Python version supported include = ["*.py", "*.pyi", "**/pyproject.toml", "*.ipynb"] extend-exclude = [ "__pycache__",