Skip to content

Commit d687a80

Browse files
committed
chore: Switch to Copier UV template
1 parent f5a7b70 commit d687a80

26 files changed

+603
-424
lines changed

.copier-answers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 1.2.6
3-
_src_path: gh:pawamoy/copier-pdm
2+
_commit: 1.2.4
3+
_src_path: gh:pawamoy/copier-uv
44
author_email: [email protected]
55
author_fullname: Timothée Mazzucotelli
66
author_username: pawamoy

.envrc

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

.github/FUNDING.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
github: pawamoy
2+
ko_fi: pawamoy
3+
polar: pawamoy
4+
custom:
5+
- https://www.paypal.me/pawamoy

.github/workflows/ci.yml

Lines changed: 31 additions & 20 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

@@ -28,36 +29,35 @@ jobs:
2829
- name: Fetch all tags
2930
run: git fetch --depth=1 --tags
3031

31-
- name: Set up PDM
32-
uses: pdm-project/setup-pdm@v4
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
tests:
5859

5960
strategy:
60-
max-parallel: 4
6161
matrix:
6262
os:
6363
- ubuntu-latest
@@ -69,24 +69,35 @@ jobs:
6969
- "3.10"
7070
- "3.11"
7171
- "3.12"
72+
- "3.13"
73+
resolution:
74+
- highest
75+
- lowest-direct
76+
exclude:
77+
- os: macos-latest
78+
resolution: lowest-direct
79+
- os: windows-latest
80+
resolution: lowest-direct
7281
runs-on: ${{ matrix.os }}
73-
continue-on-error: ${{ matrix.python-version == '3.12' }}
82+
continue-on-error: ${{ matrix.python-version == '3.13' }}
7483

7584
steps:
7685
- name: Checkout
7786
uses: actions/checkout@v4
7887

79-
- name: Set up PDM
80-
uses: pdm-project/setup-pdm@v4
88+
- name: Set up Python
89+
uses: actions/setup-python@v5
8190
with:
8291
python-version: ${{ matrix.python-version }}
83-
allow-python-prereleases: true
92+
allow-prereleases: true
8493

85-
- name: Resolving dependencies
86-
run: pdm lock -v --no-cross-platform -G ci-tests
94+
- name: Install uv
95+
run: pip install uv
8796

8897
- name: Install dependencies
89-
run: pdm install --no-editable -G ci-tests
98+
env:
99+
UV_RESOLUTION: ${{ matrix.resolution }}
100+
run: make setup
90101

91102
- name: Run the test suite
92-
run: pdm run duty test
103+
run: make test

.gitignore

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1+
# editors
12
.idea/
23
.vscode/
3-
__pycache__/
4-
*.py[cod]
5-
dist/
4+
5+
# python
66
*.egg-info/
7-
build/
8-
htmlcov/
9-
.coverage*
10-
pip-wheel-metadata/
11-
.pytest_cache/
12-
.python-version
13-
site/
14-
pdm.lock
15-
pdm.toml
16-
.pdm-plugins/
17-
.pdm-python
18-
__pypackages__/
7+
*.py[cod]
198
.venv/
9+
.venvs/
10+
/build/
11+
/dist/
12+
13+
# tools
14+
.coverage*
15+
/.pdm-build/
16+
/htmlcov/
17+
/site/
18+
19+
# cache
2020
.cache/
21+
.pytest_cache/
22+
.mypy_cache/
23+
.ruff_cache/
24+
__pycache__/

.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: 17 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,29 @@
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
5-
export PDM_MULTIRUN_USE_VENVS ?= $(if $(shell pdm config python.use_venv | grep True),1,0)
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.
64

7-
args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
8-
check_quality_args = files
9-
docs_args = host port
10-
release_args = version
11-
test_args = cleancov match
12-
13-
BASIC_DUTIES = \
5+
actions = \
6+
allrun \
147
changelog \
8+
check \
159
check-api \
1610
check-dependencies \
11+
check-docs \
12+
check-quality \
13+
check-types \
1714
clean \
1815
coverage \
1916
docs \
2017
docs-deploy \
2118
format \
19+
help \
20+
multirun \
2221
release \
22+
run \
23+
setup \
24+
test \
2325
vscode
2426

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# mkdocs-autorefs
22

33
[![ci](https://github.com/mkdocstrings/autorefs/workflows/ci/badge.svg)](https://github.com/mkdocstrings/autorefs/actions?query=workflow%3Aci)
4-
[![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://mkdocstrings.github.io/autorefs/)
4+
[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://mkdocstrings.github.io/autorefs/)
55
[![pypi version](https://img.shields.io/pypi/v/mkdocs-autorefs.svg)](https://pypi.org/project/mkdocs-autorefs/)
66
[![conda version](https://img.shields.io/conda/vn/conda-forge/mkdocs-autorefs.svg)](https://anaconda.org/conda-forge/mkdocs-autorefs)
7-
[![gitpod](https://img.shields.io/badge/gitpod-workspace-blue.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/autorefs)
7+
[![gitpod](https://img.shields.io/badge/gitpod-workspace-708FCC.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/autorefs)
88
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#autorefs:gitter.im)
99

1010
Automatically link across pages in MkDocs.

config/black.toml

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

0 commit comments

Comments
 (0)