Skip to content

Commit 4f25069

Browse files
committed
Update infra.
1 parent a5c6937 commit 4f25069

File tree

11 files changed

+129
-237
lines changed

11 files changed

+129
-237
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ on:
1515

1616
jobs:
1717

18+
run-type-checking:
19+
20+
name: Run tests for type-checking
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: actions/setup-python@v5
26+
with:
27+
python-version-file: .python-version
28+
allow-prereleases: true
29+
cache: pip
30+
- run: pip install tox-uv
31+
- run: tox -e typing
32+
1833
run-tests:
1934

2035
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
@@ -24,7 +39,7 @@ jobs:
2439
fail-fast: false
2540
matrix:
2641
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
27-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
42+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
2843

2944
steps:
3045
- uses: actions/checkout@v4
@@ -35,7 +50,7 @@ jobs:
3550
allow-prereleases: true
3651
- uses: prefix-dev/setup-pixi@v0.8.1
3752
with:
38-
pixi-version: v0.22.0
53+
pixi-version: v0.34.3
3954
run-install: false
4055

4156
- run: pip install tox-uv

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,4 @@ dist
151151

152152
.ruff_cache
153153
.mypy_cache
154+
uv.lock

.pre-commit-config.yaml

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ repos:
1515
- id: check-yaml
1616
exclude: |
1717
(?x)^(
18-
{{cookiecutter.project_slug}}/environment.yml|
1918
{{cookiecutter.project_slug}}/.pre-commit-config.yaml
2019
)$
2120
- id: debug-statements
@@ -34,10 +33,6 @@ repos:
3433
- id: python-no-log-warn
3534
- id: python-use-type-annotations
3635
- id: text-unicode-replacement-char
37-
- repo: https://github.com/aio-libs/sort-all
38-
rev: v1.3.0
39-
hooks:
40-
- id: sort-all
4136
- repo: https://github.com/astral-sh/ruff-pre-commit
4237
rev: v0.8.4
4338
hooks:
@@ -46,18 +41,13 @@ repos:
4641
pass_filenames: false
4742
- id: ruff-format
4843
args: [--config, pyproject.toml]
49-
- repo: https://github.com/dosisod/refurb
50-
rev: v2.0.0
51-
hooks:
52-
- id: refurb
53-
exclude: ({{cookiecutter.project_slug}})
5444
- repo: https://github.com/executablebooks/mdformat
5545
rev: 0.7.21
5646
hooks:
5747
- id: mdformat
5848
additional_dependencies: [
5949
mdformat-gfm,
60-
mdformat-black,
50+
mdformat-ruff,
6151
]
6252
args: [--wrap, "88"]
6353
files: (README\.md)
@@ -71,22 +61,23 @@ repos:
7161
- id: mdformat
7262
additional_dependencies: [
7363
mdformat-myst,
74-
mdformat-black,
64+
mdformat-ruff,
7565
]
7666
args: [--wrap, "88"]
7767
files: (docs/.)
78-
- repo: https://github.com/codespell-project/codespell
79-
rev: v2.3.0
80-
hooks:
81-
- id: codespell
82-
additional_dependencies: [tomli]
83-
- repo: https://github.com/pre-commit/mirrors-mypy
84-
rev: 'v1.14.0'
68+
- repo: https://github.com/crate-ci/typos
69+
rev: v1.28.4
8570
hooks:
86-
- id: mypy
87-
pass_filenames: false
71+
- id: typos
8872
- repo: meta
8973
hooks:
9074
- id: check-hooks-apply
9175
- id: check-useless-excludes
9276
# - id: identity # Prints all files passed to pre-commits. Debugging.
77+
- repo: local
78+
hooks:
79+
- id: typing
80+
name: typing
81+
language: system
82+
entry: uv run tox -e typing
83+
pass_filenames: false

cookiecutter.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"python_version": "3.10",
1010
"add_tox": ["yes", "no"],
1111
"add_github_actions": ["yes", "no"],
12-
"add_mypy": ["yes", "no"],
1312
"add_readthedocs": ["yes", "no"],
1413
"open_source_license": [
1514
"MIT",

hooks/pre_gen_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
MODULE_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]*$"
66
ENVIRON_REGEX = r"^[-_a-zA-Z0-9]*$"
77
PYTHONVERSION_REGEX = r"^(3\.(1[0-9]|[8-9])(\.[0-9]{1,2})?)$"
8-
PYTHONVERSION_MIN = "3.8"
8+
PYTHONVERSION_MIN = "3.9"
99

1010
EXCEPTION_MSG_MODULE_NAME = """
1111
ERROR: The project slug ({module_name}) is not a valid Python module name.

pyproject.toml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ classifiers = [
1515
"Topic :: Scientific/Engineering",
1616
"Topic :: Software Development :: Build Tools",
1717
]
18-
requires-python = ">=3.8"
18+
requires-python = ">=3.9"
1919
dependencies = ["cookiecutter"]
2020

2121
[[project.authors]]
2222
name = "Tobias Raabe"
2323
email = "raabe@posteo.de"
2424

25+
[tool.uv]
26+
dev-dependencies = ["tox-uv>=1.7.0"]
27+
2528
[project.optional-dependencies]
2629
docs = [
2730
"furo",
@@ -36,6 +39,7 @@ docs = [
3639
"sphinxext-opengraph",
3740
]
3841
test = ["pytest", "pytest-cookies", "pytest-cov"]
42+
typing = ["mypy"]
3943

4044
[project.readme]
4145
file = "README.md"
@@ -51,13 +55,6 @@ Documentation = "https://cookiecutter-pytask-project.readthedocs.io/en/latest"
5155
Github = "https://github.com/pytask-dev/cookiecutter-pytask-project"
5256
Tracker = "https://github.com/pytask-dev/cookiecutter-pytask-project/issues"
5357

54-
[tool.rye]
55-
managed = true
56-
virtual = true
57-
dev-dependencies = [
58-
"tox-uv>=1.8.2",
59-
]
60-
6158
[tool.mypy]
6259
files = ["hooks", "tests"]
6360
exclude = "{{cookiecutter.project_slug}}"
@@ -75,7 +72,7 @@ disallow_untyped_defs = false
7572
ignore_errors = true
7673

7774
[tool.ruff]
78-
target-version = "py38"
75+
target-version = "py39"
7976
fix = true
8077
unsafe-fixes = true
8178

requirements-dev.lock

Lines changed: 0 additions & 80 deletions
This file was deleted.

requirements.lock

Lines changed: 0 additions & 52 deletions
This file was deleted.

{{cookiecutter.project_slug}}/.github/workflows/main.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,19 @@ on:
1515

1616
jobs:
1717

18+
run-type-checking:
19+
20+
name: Run tests for type-checking
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: prefix-dev/setup-pixi@v0.8.1
26+
with:
27+
pixi-version: v0.34.3
28+
cache: true
29+
- run: pixi run typing
30+
1831
run-tests:
1932

2033
name: Run tests for ${{ matrix.os }} on ${{ matrix.python-version }}
@@ -28,9 +41,9 @@ jobs:
2841

2942
steps:
3043
- uses: actions/checkout@v4
31-
- uses: prefix-dev/setup-pixi@v0.7.0
44+
- uses: prefix-dev/setup-pixi@v0.8.1
3245
with:
33-
pixi-version: v0.22.0
46+
pixi-version: v0.34.3
3447
cache: true
3548

3649
- name: Run tests and doctests.

0 commit comments

Comments
 (0)