Skip to content

Commit c1c40bc

Browse files
committed
chore: Template upgrade
1 parent 8df7221 commit c1c40bc

27 files changed

+453
-352
lines changed

.copier-answers.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 0.2.2
2+
_commit: 0.3.1
33
_src_path: gh:mkdocstrings/handler-template
44
author_email: dev@pawamoy.fr
55
author_fullname: Timothée Mazzucotelli
@@ -9,6 +9,7 @@ copyright_holder: Timothée Mazzucotelli
99
copyright_holder_email: dev@pawamoy.fr
1010
copyright_license: ISC License
1111
insiders: true
12+
insiders_email: insiders@pawamoy.fr
1213
insiders_repository_name: mkdocstrings-typescript
1314
language: TypeScript
1415
project_description: A Typescript handler for mkdocstrings.

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PATH_add scripts

.github/workflows/ci.yml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414
LANG: en_US.utf-8
1515
LC_ALL: en_US.utf-8
1616
PYTHONIOENCODING: UTF-8
17+
PYTHON_VERSIONS: ""
1718

1819
jobs:
1920

@@ -23,36 +24,36 @@ jobs:
2324

2425
steps:
2526
- name: Checkout
26-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2728

2829
- name: Fetch all tags
2930
run: git fetch --depth=1 --tags
3031

31-
- name: Set up PDM
32-
uses: pdm-project/setup-pdm@v3
32+
- name: Set up Python
33+
uses: actions/setup-python@v5
3334
with:
34-
python-version: "3.8"
35+
python-version: "3.11"
3536

36-
- name: Resolving dependencies
37-
run: pdm lock -v --no-cross-platform -G ci-quality
37+
- name: Install uv
38+
run: pip install uv
3839

3940
- name: Install dependencies
40-
run: pdm install -G ci-quality
41+
run: make setup
4142

4243
- name: Check if the documentation builds correctly
43-
run: pdm run duty check-docs
44+
run: make check-docs
4445

4546
- name: Check the code quality
46-
run: pdm run duty check-quality
47+
run: make check-quality
4748

4849
- name: Check if the code is correctly typed
49-
run: pdm run duty check-types
50+
run: make check-types
5051

5152
- name: Check for vulnerabilities in dependencies
52-
run: pdm run duty check-dependencies
53+
run: make check-dependencies
5354

5455
- name: Check for breaking changes in the API
55-
run: pdm run duty check-api
56+
run: make check-api
5657

5758
exclude-test-jobs:
5859
runs-on: ubuntu-latest
@@ -78,7 +79,6 @@ jobs:
7879

7980
needs: exclude-test-jobs
8081
strategy:
81-
max-parallel: 4
8282
matrix:
8383
os:
8484
- ubuntu-latest
@@ -96,19 +96,22 @@ jobs:
9696

9797
steps:
9898
- name: Checkout
99-
uses: actions/checkout@v3
99+
uses: actions/checkout@v4
100100

101-
- name: Set up PDM
102-
uses: pdm-project/setup-pdm@v3
101+
- name: Set up Python
102+
uses: actions/setup-python@v5
103103
with:
104104
python-version: ${{ matrix.python-version }}
105-
allow-python-prereleases: true
105+
allow-prereleases: true
106106

107-
- name: Resolving dependencies
108-
run: pdm lock -v --no-cross-platform -G ci-tests
107+
- name: Install uv
108+
run: pip install uv
109109

110110
- name: Install dependencies
111-
run: pdm install --no-editable -G ci-tests
111+
run: |
112+
uv venv
113+
uv pip install -r devdeps.txt
114+
uv pip install "mkdocstrings-typescript @ ."
112115
113116
- name: Run the test suite
114-
run: pdm run duty test
117+
run: make test

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
if: startsWith(github.ref, 'refs/tags/')
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
- name: Fetch all tags
1515
run: git fetch --depth=1 --tags
1616
- name: Setup Python
@@ -22,7 +22,7 @@ jobs:
2222
if: github.repository_owner == 'pawamoy-insiders'
2323
run: python -m build
2424
- name: Upload dists artifact
25-
uses: actions/upload-artifact@v3
25+
uses: actions/upload-artifact@v4
2626
if: github.repository_owner == 'pawamoy-insiders'
2727
with:
2828
name: typescript-insiders

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
2+
.vscode/
23
__pycache__/
34
*.py[cod]
45
dist/
@@ -9,11 +10,8 @@ htmlcov/
910
pip-wheel-metadata/
1011
.pytest_cache/
1112
.mypy_cache/
13+
.ruff_cache/
1214
site/
13-
pdm.lock
14-
pdm.toml
15-
.pdm-plugins/
16-
.pdm-python
17-
__pypackages__/
1815
.venv/
16+
.venvs/
1917
.cache/

.gitpod.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ FROM gitpod/workspace-full
22
USER gitpod
33
ENV PIP_USER=no
44
RUN pip3 install pipx; \
5-
pipx install pdm; \
5+
pipx install uv; \
66
pipx ensurepath

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ make setup
1717
> NOTE:
1818
> If it fails for some reason,
1919
> you'll need to install
20-
> [PDM](https://github.com/pdm-project/pdm)
20+
> [uv](https://github.com/astral-sh/uv)
2121
> manually.
2222
>
2323
> You can install it with:
2424
>
2525
> ```bash
2626
> python3 -m pip install --user pipx
27-
> pipx install pdm
27+
> pipx install uv
2828
> ```
2929
>
3030
> Now you can try running `make setup` again,
31-
> or simply `pdm install`.
31+
> or simply `uv install`.
3232
3333
You now have the dependencies installed.
3434
@@ -39,13 +39,13 @@ Run `make help` to see all the available actions!
3939
This project uses [duty](https://github.com/pawamoy/duty) to run tasks.
4040
A Makefile is also provided. The Makefile will try to run certain tasks
4141
on multiple Python versions. If for some reason you don't want to run the task
42-
on multiple Python versions, you run the task directly with `pdm run duty TASK`.
42+
on multiple Python versions, you run the task directly with `make run duty TASK`.
4343
4444
The Makefile detects if a virtual environment is activated,
4545
so `make` will work the same with the virtualenv activated or not.
4646
4747
If you work in VSCode, we provide
48-
[an action to configure VSCode](https://pawamoy.github.io/copier-pdm/work/#vscode-setup)
48+
[an action to configure VSCode](https://pawamoy.github.io/copier-uv/work/#vscode-setup)
4949
for the project.
5050
5151
## Development

Makefile

Lines changed: 15 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,27 @@
1-
.DEFAULT_GOAL := help
2-
SHELL := bash
3-
DUTY := $(if $(VIRTUAL_ENV),,pdm run) duty
4-
export PDM_MULTIRUN_VERSIONS ?= 3.8 3.9 3.10 3.11 3.12
1+
# If you have `direnv` loaded in your shell, and allow it in the repository,
2+
# the `make` command will point at the `scripts/make` shell script.
3+
# This Makefile is just here to allow auto-completion in the terminal.
54

6-
args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
7-
check_quality_args = files
8-
docs_args = host port
9-
release_args = version
10-
test_args = match
11-
12-
BASIC_DUTIES = \
5+
actions = \
136
changelog \
7+
check \
148
check-api \
159
check-dependencies \
10+
check-docs \
11+
check-quality \
12+
check-types \
1613
clean \
1714
coverage \
1815
docs \
1916
docs-deploy \
2017
format \
18+
help \
2119
release \
20+
run \
21+
setup \
22+
test \
2223
vscode
2324

24-
QUALITY_DUTIES = \
25-
check-quality \
26-
check-docs \
27-
check-types \
28-
test
29-
30-
.PHONY: help
31-
help:
32-
@$(DUTY) --list
33-
34-
.PHONY: lock
35-
lock:
36-
@pdm lock -G:all
37-
38-
.PHONY: setup
39-
setup:
40-
@bash scripts/setup.sh
41-
42-
.PHONY: check
43-
check:
44-
@pdm multirun duty check-quality check-types check-docs
45-
@$(DUTY) check-dependencies check-api
46-
47-
.PHONY: $(BASIC_DUTIES)
48-
$(BASIC_DUTIES):
49-
@$(DUTY) $@ $(call args,$@)
50-
51-
.PHONY: $(QUALITY_DUTIES)
52-
$(QUALITY_DUTIES):
53-
@pdm multirun duty $@ $(call args,$@)
25+
.PHONY: $(actions)
26+
$(actions):
27+
@bash scripts/make "$@"

config/black.toml

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

config/coverage.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ source =
88
[coverage:paths]
99
equivalent =
1010
src/
11-
__pypackages__/
11+
.venv/lib/*/site-packages/
12+
.venvs/*/lib/*/site-packages/
1213

1314
[coverage:report]
1415
precision = 2

config/pytest.ini

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
[pytest]
2-
norecursedirs =
3-
.git
4-
.tox
5-
.env
6-
dist
7-
build
82
python_files =
93
test_*.py
104
*_test.py

config/ruff.toml

Lines changed: 23 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,27 @@
11
target-version = "py38"
2-
line-length = 132
2+
line-length = 120
3+
4+
[lint]
35
exclude = [
46
"fixtures",
57
"site",
68
]
79
select = [
8-
"A",
9-
"ANN",
10-
"ARG",
11-
"B",
12-
"BLE",
13-
"C",
14-
"C4",
10+
"A", "ANN", "ARG",
11+
"B", "BLE",
12+
"C", "C4",
1513
"COM",
16-
"D",
17-
"DTZ",
18-
"E",
19-
"ERA",
20-
"EXE",
21-
"F",
22-
"FBT",
14+
"D", "DTZ",
15+
"E", "ERA", "EXE",
16+
"F", "FBT",
2317
"G",
24-
"I",
25-
"ICN",
26-
"INP",
27-
"ISC",
18+
"I", "ICN", "INP", "ISC",
2819
"N",
29-
"PGH",
30-
"PIE",
31-
"PL",
32-
"PLC",
33-
"PLE",
34-
"PLR",
35-
"PLW",
36-
"PT",
37-
"PYI",
20+
"PGH", "PIE", "PL", "PLC", "PLE", "PLR", "PLW", "PT", "PYI",
3821
"Q",
39-
"RUF",
40-
"RSE",
41-
"RET",
42-
"S",
43-
"SIM",
44-
"SLF",
45-
"T",
46-
"T10",
47-
"T20",
48-
"TCH",
49-
"TID",
50-
"TRY",
22+
"RUF", "RSE", "RET",
23+
"S", "SIM", "SLF",
24+
"T", "T10", "T20", "TCH", "TID", "TRY",
5125
"UP",
5226
"W",
5327
"YTT",
@@ -73,7 +47,7 @@ ignore = [
7347
"TRY003", # Avoid specifying long messages outside the exception class
7448
]
7549

76-
[per-file-ignores]
50+
[lint.per-file-ignores]
7751
"src/*/cli.py" = [
7852
"T201", # Print statement
7953
]
@@ -91,14 +65,18 @@ ignore = [
9165
"S101", # Use of assert detected
9266
]
9367

94-
[flake8-quotes]
68+
[lint.flake8-quotes]
9569
docstring-quotes = "double"
9670

97-
[flake8-tidy-imports]
71+
[lint.flake8-tidy-imports]
9872
ban-relative-imports = "all"
9973

100-
[isort]
74+
[lint.isort]
10175
known-first-party = ["mkdocstrings_handlers.typescript"]
10276

103-
[pydocstyle]
77+
[lint.pydocstyle]
10478
convention = "google"
79+
80+
[format]
81+
docstring-code-format = true
82+
docstring-code-line-length = 80

0 commit comments

Comments
 (0)