Skip to content

Commit 7c21717

Browse files
authored
Merge pull request #31 from astrojuanlu/modernisation
Modernisation
2 parents 7275b77 + 40a4e9e commit 7c21717

File tree

12 files changed

+77
-74
lines changed

12 files changed

+77
-74
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
12+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1313
steps:
14-
- uses: actions/checkout@v2
15-
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
14+
- uses: actions/checkout@v4
15+
- name: Install the latest version of uv and set the python version
16+
uses: astral-sh/setup-uv@v6
1717
with:
18-
python-version: ${{ matrix.python-version }}
19-
- name: Install uv
20-
run: python -m pip install uv
18+
python-version: "${{ matrix.python-version }}"
19+
activate-environment: true
2120
- name: Install dependencies
2221
run: |
23-
uv pip install --system tox tox-uv tox-gh-actions
22+
uv pip install tox tox-uv tox-gh-actions
2423
- name: Test with tox
2524
run: tox

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ exclude: '^\{\{cookiecutter\.project_name\}\}/'
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.3.0
5+
rev: v5.0.0
66
hooks:
77
- id: check-added-large-files
88
- id: check-merge-conflict

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ copier copy gh:astrojuanlu/copier-pylib path/to/destination
3737
[uv]: https://github.com/astral-sh/uv
3838
[copier]: https://github.com/copier-org/copier/
3939
[mypy]: http://mypy.readthedocs.io/
40-
[PDM]: https://pdm-project.org/
4140
[pytest]: https://docs.pytest.org/
4241
[Sphinx]: http://www.sphinx-doc.org/
4342
[tox]: https://tox.readthedocs.io/

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[mypy]
2-
python_version = 3.8
2+
python_version = 3.9
33
warn_redundant_casts = True
44
warn_unused_configs = True
55
pretty = True

requirements.txt

Lines changed: 39 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,82 @@
1-
# This file was autogenerated by uv v0.1.4 via the following command:
1+
# This file was autogenerated by uv via the following command:
22
# uv pip compile requirements.in -o requirements.txt
3-
annotated-types==0.6.0
3+
annotated-types==0.7.0
44
# via pydantic
55
colorama==0.4.6
66
# via copier
7-
copier==9.1.1
7+
copier==9.7.1
88
# via pytest-copie
9-
decorator==5.1.1
10-
# via copier
11-
deprecated==1.2.14
9+
deprecated==1.2.18
1210
# via pytest-copie
13-
dunamai==1.19.2
11+
dunamai==1.24.1
1412
# via copier
15-
exceptiongroup==1.2.0
13+
exceptiongroup==1.2.2
1614
# via pytest
1715
funcy==2.0
1816
# via copier
19-
iniconfig==2.0.0
17+
iniconfig==2.1.0
2018
# via pytest
21-
jinja2==3.1.3
19+
jinja2==3.1.6
2220
# via
2321
# copier
2422
# jinja2-ansible-filters
2523
jinja2-ansible-filters==1.3.2
2624
# via copier
27-
markupsafe==2.1.5
25+
markupsafe==3.0.2
2826
# via jinja2
29-
mypy==1.8.0
30-
mypy-extensions==1.0.0
27+
mypy==1.15.0
28+
# via -r requirements.in
29+
mypy-extensions==1.1.0
3130
# via mypy
32-
packaging==23.2
31+
packaging==25.0
3332
# via
3433
# copier
3534
# dunamai
3635
# pytest
3736
pathspec==0.12.1
3837
# via copier
39-
pluggy==1.4.0
40-
# via pytest
41-
plumbum==1.8.2
38+
platformdirs==4.3.8
4239
# via copier
43-
prompt-toolkit==3.0.36
40+
pluggy==1.5.0
41+
# via pytest
42+
plumbum==1.9.0
43+
# via
44+
# copier
45+
# pytest-copie
46+
prompt-toolkit==3.0.51
4447
# via questionary
45-
pydantic==2.6.1
48+
pydantic==2.11.4
4649
# via copier
47-
pydantic-core==2.16.2
50+
pydantic-core==2.33.2
4851
# via pydantic
49-
pygments==2.17.2
52+
pygments==2.19.1
5053
# via copier
51-
pytest==8.0.1
52-
# via pytest-copie
53-
pytest-copie==0.1.6
54-
pyyaml==6.0.1
54+
pytest==8.3.5
55+
# via
56+
# -r requirements.in
57+
# pytest-copie
58+
pytest-copie==0.2.2
59+
# via -r requirements.in
60+
pyyaml==6.0.2
5561
# via
5662
# copier
5763
# jinja2-ansible-filters
58-
# pyyaml-include
59-
pyyaml-include==1.3.2
60-
# via copier
61-
questionary==2.0.1
64+
questionary==2.1.0
6265
# via copier
63-
tomli==2.0.1
66+
tomli==2.2.1
6467
# via
6568
# mypy
6669
# pytest
67-
typing-extensions==4.9.0
70+
typing-extensions==4.13.2
6871
# via
72+
# copier
6973
# mypy
7074
# pydantic
7175
# pydantic-core
76+
# typing-inspection
77+
typing-inspection==0.4.0
78+
# via pydantic
7279
wcwidth==0.2.13
7380
# via prompt-toolkit
74-
wrapt==1.16.0
81+
wrapt==1.17.2
7582
# via deprecated

template/.github/workflows/publish.yml.j2

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@ jobs:
1616
contents: write
1717
steps:
1818
- uses: actions/checkout@v4
19-
- name: Set up Python
20-
uses: actions/setup-python@v5
19+
- name: Install the latest version of uv and set the python version
20+
uses: astral-sh/setup-uv@v6
2121
with:
22-
python-version: '3.8'
23-
- name: Install uv
24-
run: python -m pip install uv
22+
python-version: {% raw %}"${{ matrix.python-version }}"{% endraw %}
23+
activate-environment: true
2524
- name: Install build dependencies
26-
run: uv pip install --system build
25+
run: uv pip install build
2726
- name: Build package
2827
run: python -m build
2928
- name: Publish to PyPI

template/.github/workflows/test.yml.j2

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,16 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
9+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1010
steps:
11-
- uses: actions/checkout@v2
12-
- name: Set up Python {{ '${{ matrix.python-version }}' }}
13-
uses: actions/setup-python@v2
11+
- uses: actions/checkout@v4
12+
- name: Install the latest version of uv and set the python version
13+
uses: astral-sh/setup-uv@v6
1414
with:
15-
python-version: {{ '${{ matrix.python-version }}' }}
16-
- name: Install uv
17-
run: python -m pip install uv
15+
python-version: {% raw %}"${{ matrix.python-version }}"{% endraw %}
16+
activate-environment: true
1817
- name: Install dependencies
1918
run: |
20-
uv pip install --system tox tox-uv tox-gh-actions
19+
uv pip install tox tox-uv tox-gh-actions
2120
- name: Test with tox
2221
run: tox

template/.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.3.0
3+
rev: v5.0.0
44
hooks:
55
- id: check-added-large-files
66
- id: check-merge-conflict

template/.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 2
55
build:
66
os: ubuntu-22.04
77
tools:
8-
python: "3.8"
8+
python: "3.9"
99

1010
sphinx:
1111
fail_on_warning: true

template/pyproject.toml.j2

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@
22
requires = ["uv-build>=0.6.6,<0.7"]
33
build-backend = "uv_build"
44
5+
[tool.uv.build-backend]
6+
module-name = "{{ package_name }}"
7+
58
[project]
69
name = "{{ project_name }}"
710
readme = "README.md"
8-
requires-python = ">=3.8"
11+
requires-python = ">=3.9"
12+
version = 0.1.dev0
913
license = {file = "LICENSE"}
1014
description = "{{ short_description }}"
1115
dependencies = [
@@ -21,20 +25,19 @@ classifiers = [
2125
"Operating System :: OS Independent",
2226
"Programming Language :: Python",
2327
"Programming Language :: Python :: 3",
24-
"Programming Language :: Python :: 3.8",
2528
"Programming Language :: Python :: 3.9",
2629
"Programming Language :: Python :: 3.10",
2730
"Programming Language :: Python :: 3.11",
2831
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: 3.13",
2933
]
30-
dynamic = ["version"]
3134

3235
[project.urls]
3336
source = "https://github.com/{{ github_org }}/{{ project_name }}"
3437
tracker = "https://github.com/{{ github_org }}/{{ project_name }}/issues"
3538
documentation = "https://{{ project_name }}.readthedocs.io"
3639

37-
[project.optional-dependencies]
40+
[dependency-groups]
3841
test = [
3942
"mypy",
4043
"hypothesis",
@@ -48,9 +51,6 @@ doc = [
4851
"sphinx-copybutton",
4952
]
5053

51-
[tool.pdm.version]
52-
source = "scm"
53-
5454
[tool.ruff]
5555
show-fixes = true
5656

@@ -72,7 +72,7 @@ select = [
7272
convention = "numpy"
7373

7474
[tool.mypy]
75-
python_version = "3.8"
75+
python_version = "3.9"
7676
warn_redundant_casts = true
7777
warn_unused_configs = true
7878
pretty = true

0 commit comments

Comments
 (0)