Skip to content

Commit 8131235

Browse files
committed
chore: Template upgrade
1 parent fb2d660 commit 8131235

File tree

12 files changed

+245
-230
lines changed

12 files changed

+245
-230
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 1.4.1
2+
_commit: 1.5.4
33
_src_path: gh:pawamoy/copier-uv
44
author_email: [email protected]
55
author_fullname: Timothée Mazzucotelli

.github/workflows/ci.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
fetch-tags: true
2831

29-
- name: Fetch all tags
30-
run: git fetch --depth=1 --tags
31-
32-
- name: Set up Python
32+
- name: Setup Python
3333
uses: actions/setup-python@v5
3434
with:
35-
python-version: "3.11"
35+
python-version: "3.12"
3636

37-
- name: Install uv
38-
run: pip install uv
37+
- name: Setup uv
38+
uses: astral-sh/setup-uv@v3
39+
with:
40+
enable-cache: true
41+
cache-dependency-glob: pyproject.toml
3942

4043
- name: Install dependencies
4144
run: make setup
@@ -67,6 +70,7 @@ jobs:
6770
- "3.11"
6871
- "3.12"
6972
- "3.13"
73+
- "3.14"
7074
resolution:
7175
- highest
7276
- lowest-direct
@@ -76,22 +80,27 @@ jobs:
7680
- os: windows-latest
7781
resolution: lowest-direct
7882
runs-on: ${{ matrix.os }}
79-
continue-on-error: ${{ matrix.python-version == '3.13' }}
83+
continue-on-error: ${{ matrix.python-version == '3.14' }}
8084

8185
steps:
8286
- name: Checkout
8387
uses: actions/checkout@v4
88+
with:
89+
fetch-depth: 0
90+
fetch-tags: true
8491

85-
- name: Set up Python
92+
- name: Setup Python
8693
uses: actions/setup-python@v5
8794
with:
8895
python-version: ${{ matrix.python-version }}
8996
allow-prereleases: true
9097

9198
- name: Setup uv
92-
uses: astral-sh/setup-uv@v1
99+
uses: astral-sh/setup-uv@v3
93100
with:
94101
enable-cache: true
102+
cache-dependency-glob: pyproject.toml
103+
cache-suffix: py${{ matrix.python-version }}
95104

96105
- name: Install dependencies
97106
env:

.github/workflows/release.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v4
14-
- name: Fetch all tags
15-
run: git fetch --depth=1 --tags
14+
with:
15+
fetch-depth: 0
16+
fetch-tags: true
1617
- name: Setup Python
17-
uses: actions/setup-python@v4
18-
- name: Install git-changelog
19-
run: pip install git-changelog
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.12"
21+
- name: Setup uv
22+
uses: astral-sh/setup-uv@v3
2023
- name: Prepare release notes
21-
run: git-changelog --release-notes > release-notes.md
24+
run: uv tool run git-changelog --release-notes > release-notes.md
2225
- name: Create release
23-
uses: softprops/action-gh-release@v1
26+
uses: softprops/action-gh-release@v2
2427
with:
2528
body_path: release-notes.md

.gitpod.dockerfile

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

.gitpod.yml

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

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ make setup
2323
> You can install it with:
2424
>
2525
> ```bash
26-
> python3 -m pip install --user pipx
27-
> pipx install uv
26+
> curl -LsSf https://astral.sh/uv/install.sh | sh
2827
> ```
2928
>
3029
> Now you can try running `make setup` again,
31-
> or simply `uv install`.
30+
> or simply `uv sync`.
3231
3332
You now have the dependencies installed.
3433

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,20 @@
44
[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/pytkdocs/)
55
[![pypi version](https://img.shields.io/pypi/v/pytkdocs.svg)](https://pypi.org/project/pytkdocs/)
66
[![conda version](https://img.shields.io/conda/vn/conda-forge/pytkdocs)](https://anaconda.org/conda-forge/pytkdocs)
7-
[![gitpod](https://img.shields.io/badge/gitpod-workspace-708FCC.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/pytkdocs)
87
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#pytkdocs:gitter.im)
98

109
Load Python objects documentation.
1110

1211
## Installation
1312

14-
With `pip`:
15-
1613
```bash
1714
pip install pytkdocs
1815
```
1916

20-
With [`pipx`](https://github.com/pipxproject/pipx):
17+
With [`uv`](https://docs.astral.sh/uv/):
2118

2219
```bash
23-
python3.8 -m pip install --user pipx
24-
pipx install pytkdocs
20+
uv tool install pytkdocs
2521
```
2622

2723
With `conda`:

duties.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
from contextlib import contextmanager
88
from importlib.metadata import version as pkgversion
99
from pathlib import Path
10-
from typing import TYPE_CHECKING, Iterator
10+
from typing import TYPE_CHECKING
1111

1212
from duty import duty, tools
1313

1414
if TYPE_CHECKING:
15+
from collections.abc import Iterator
16+
1517
from duty.context import Context
1618

1719

pyproject.toml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ classifiers = [
1717
"Programming Language :: Python",
1818
"Programming Language :: Python :: 3",
1919
"Programming Language :: Python :: 3 :: Only",
20-
"Programming Language :: Python :: 3.8",
2120
"Programming Language :: Python :: 3.9",
2221
"Programming Language :: Python :: 3.10",
2322
"Programming Language :: Python :: 3.11",
2423
"Programming Language :: Python :: 3.12",
2524
"Programming Language :: Python :: 3.13",
25+
"Programming Language :: Python :: 3.14",
2626
"Topic :: Documentation",
2727
"Topic :: Software Development",
2828
"Topic :: Utilities",
@@ -58,6 +58,8 @@ version = {source = "scm"}
5858
[tool.pdm.build]
5959
package-dir = "src"
6060
editable-backend = "editables"
61+
62+
# Include as much as possible in the source distribution, to help redistributors.
6163
excludes = ["**/.pytest_cache"]
6264
source-includes = [
6365
"config",
@@ -72,19 +74,22 @@ source-includes = [
7274
]
7375

7476
[tool.pdm.build.wheel-data]
77+
# Manual pages can be included in the wheel.
78+
# Depending on the installation tool, they will be accessible to users.
79+
# pipx supports it, uv does not yet, see https://github.com/astral-sh/uv/issues/4731.
7580
data = [
7681
{path = "share/**/*", relative-to = "."},
7782
]
7883

79-
[tool.uv]
80-
dev-dependencies = [
84+
[dependency-groups]
85+
dev = [
8186
# dev
8287
"editables>=0.5",
8388

8489
# maintenance
8590
"build>=1.2",
8691
"git-changelog>=2.5",
87-
"twine>=5.0; python_version < '3.13'",
92+
"twine>=5.1",
8893

8994
# ci
9095
"docstring-parser>=0.7",
@@ -113,5 +118,6 @@ dev-dependencies = [
113118
"mkdocs-material>=9.5",
114119
"mkdocs-minify-plugin>=0.8",
115120
"mkdocstrings[python]>=0.25",
121+
# YORE: EOL 3.10: Remove line.
116122
"tomli>=2.0; python_version < '3.11'",
117123
]

scripts/gen_credits.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
import os
66
import sys
77
from collections import defaultdict
8+
from collections.abc import Iterable
89
from importlib.metadata import distributions
910
from itertools import chain
1011
from pathlib import Path
1112
from textwrap import dedent
12-
from typing import Dict, Iterable, Union
13+
from typing import Dict, Union
1314

1415
from jinja2 import StrictUndefined
1516
from jinja2.sandbox import SandboxedEnvironment
1617
from packaging.requirements import Requirement
1718

18-
# TODO: Remove once support for Python 3.10 is dropped.
19+
# YORE: EOL 3.10: Replace block with line 2.
1920
if sys.version_info >= (3, 11):
2021
import tomllib
2122
else:
@@ -26,7 +27,7 @@
2627
pyproject = tomllib.load(pyproject_file)
2728
project = pyproject["project"]
2829
project_name = project["name"]
29-
devdeps = [dep for dep in pyproject["tool"]["uv"]["dev-dependencies"] if not dep.startswith("-e")]
30+
devdeps = [dep for dep in pyproject["dependency-groups"]["dev"] if not dep.startswith("-e")]
3031

3132
PackageMetadata = Dict[str, Union[str, Iterable[str]]]
3233
Metadata = Dict[str, PackageMetadata]

0 commit comments

Comments
 (0)