Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to newest version of ssb-pypitemplate #23

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/statisticsnorway/ssb-pypitemplate.git",
"commit": "e81154758223bbeb62e2117de27029295c13e126",
"commit": "be07b1714e102b263e86c5f6f5578af4db38a03e",
"checkout": null,
"context": {
"cookiecutter": {
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -61,11 +61,11 @@ jobs:

- name: Publish package on PyPI
if: steps.check-version.outputs.tag
uses: pypa/[email protected].12
uses: pypa/[email protected].14

- name: Publish package on TestPyPI
if: (!steps.check-version.outputs.tag)
uses: pypa/[email protected].12
uses: pypa/[email protected].14
with:
repository-url: https://test.pypi.org/legacy/

Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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]
Expand Down Expand Up @@ -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__",
Expand Down