Skip to content

Commit cc9ebc4

Browse files
committed
chore: Template upgrade
1 parent f6f1b48 commit cc9ebc4

24 files changed

Lines changed: 459 additions & 332 deletions

.copier-answers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 0.10.14
2+
_commit: 0.16.6
33
_src_path: gh:pawamoy/copier-pdm
44
author_email: pawamoy@pm.me
55
author_fullname: Timothée Mazzucotelli
@@ -8,6 +8,7 @@ copyright_date: '2023'
88
copyright_holder: Timothée Mazzucotelli
99
copyright_holder_email: pawamoy@pm.me
1010
copyright_license: ISC License
11+
insiders: false
1112
project_description: Griffe extension for @tiangolo's `typing.doc` PEP.
1213
project_name: Griffe TypingDoc
1314
python_package_command_line_name: ''
@@ -16,5 +17,4 @@ python_package_import_name: griffe_typingdoc
1617
repository_name: griffe-typingdoc
1718
repository_namespace: pawamoy
1819
repository_provider: github.com
19-
use_precommit: false
2020

.github/FUNDING.yml

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

.github/workflows/ci.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@ name: ci
22

33
on:
44
push:
5-
branches:
6-
- master
75
pull_request:
86
branches:
9-
- master
7+
- main
108

119
defaults:
1210
run:
@@ -27,16 +25,19 @@ jobs:
2725
- name: Checkout
2826
uses: actions/checkout@v3
2927

28+
- name: Fetch all tags
29+
run: git fetch --depth=1 --tags
30+
3031
- name: Set up PDM
3132
uses: pdm-project/setup-pdm@v3
3233
with:
3334
python-version: "3.9"
3435

3536
- name: Resolving dependencies
36-
run: pdm lock -v
37+
run: pdm lock -v --no-cross-platform -G ci-quality
3738

3839
- name: Install dependencies
39-
run: pdm install -G duty -G docs -G quality -G typing -G security
40+
run: pdm install -G ci-quality
4041

4142
- name: Check if the documentation builds correctly
4243
run: pdm run duty check-docs
@@ -50,20 +51,26 @@ jobs:
5051
- name: Check for vulnerabilities in dependencies
5152
run: pdm run duty check-dependencies
5253

54+
- name: Check for breaking changes in the API
55+
run: pdm run duty check-api
56+
5357
tests:
5458

5559
strategy:
60+
max-parallel: 4
5661
matrix:
5762
os:
5863
- ubuntu-latest
5964
- macos-latest
6065
- windows-latest
6166
python-version:
67+
- "3.8"
6268
- "3.9"
6369
- "3.10"
6470
- "3.11"
65-
71+
- "3.12"
6672
runs-on: ${{ matrix.os }}
73+
continue-on-error: ${{ matrix.python-version == '3.12' }}
6774

6875
steps:
6976
- name: Checkout
@@ -73,12 +80,13 @@ jobs:
7380
uses: pdm-project/setup-pdm@v3
7481
with:
7582
python-version: ${{ matrix.python-version }}
83+
allow-python-prereleases: true
7684

7785
- name: Resolving dependencies
78-
run: pdm lock -v
86+
run: pdm lock -v --no-cross-platform -G ci-tests
7987

8088
- name: Install dependencies
81-
run: pdm install --no-editable -G duty -G tests
89+
run: pdm install --no-editable -G ci-tests
8290

8391
- name: Run the test suite
8492
run: pdm run duty test

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: release
2+
3+
on: push
4+
permissions:
5+
contents: write
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
if: startsWith(github.ref, 'refs/tags/')
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Fetch all tags
15+
run: git fetch --depth=1 --tags
16+
- name: Setup Python
17+
uses: actions/setup-python@v4
18+
- name: Install git-changelog
19+
run: pip install git-changelog
20+
- name: Prepare release notes
21+
run: git-changelog --release-notes > release-notes.md
22+
- name: Create release
23+
uses: softprops/action-gh-release@v1
24+
with:
25+
body_path: release-notes.md

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ pip-wheel-metadata/
1111
.mypy_cache/
1212
site/
1313
pdm.lock
14-
.pdm.toml
14+
pdm.toml
15+
.pdm-plugins/
16+
.pdm-python
1517
__pypackages__/
1618
.venv/
19+
.cache/

.gitpod.dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
FROM gitpod/workspace-full
22
USER gitpod
33
ENV PIP_USER=no
4-
ENV PYTHON_VERSIONS=
54
RUN pip3 install pipx; \
65
pipx install pdm; \
76
pipx ensurepath

CONTRIBUTING.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,26 @@ make setup
3232
3333
You now have the dependencies installed.
3434
35-
You can run the application with `pdm run [ARGS...]`.
36-
3735
Run `make help` to see all the available actions!
3836
3937
## Tasks
4038
4139
This project uses [duty](https://github.com/pawamoy/duty) to run tasks.
4240
A Makefile is also provided. The Makefile will try to run certain tasks
4341
on multiple Python versions. If for some reason you don't want to run the task
44-
on multiple Python versions, you can do one of the following:
45-
46-
1. `export PYTHON_VERSIONS= `: this will run the task
47-
with only the current Python version
48-
2. run the task directly with `pdm run duty TASK`
42+
on multiple Python versions, you run the task directly with `pdm run duty TASK`.
4943
5044
The Makefile detects if a virtual environment is activated,
5145
so `make` will work the same with the virtualenv activated or not.
5246
47+
If you work in VSCode,
48+
[see examples of tasks and run configurations](https://pawamoy.github.io/copier-pdm/work/#vscode-setup).
49+
5350
## Development
5451
5552
As usual:
5653
57-
1. create a new branch: `git checkout -b feature-or-bugfix-name`
54+
1. create a new branch: `git switch -c feature-or-bugfix-name`
5855
1. edit the code and/or the documentation
5956
6057
**Before committing:**
@@ -63,7 +60,7 @@ As usual:
6360
1. run `make check` to check everything (fix any warning)
6461
1. run `make test` to run the tests (fix any issue)
6562
1. if you updated the documentation or the project dependencies:
66-
1. run `make docs-serve`
63+
1. run `make docs`
6764
1. go to http://localhost:8000 and check that everything looks good
6865
1. follow our [commit message convention](#commit-message-convention)
6966
@@ -140,7 +137,7 @@ git commit --fixup=SHA
140137
Once all the changes are approved, you can squash your commits:
141138

142139
```bash
143-
git rebase -i --autosquash master
140+
git rebase -i --autosquash main
144141
```
145142

146143
And force-push:

Makefile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
.DEFAULT_GOAL := help
22
SHELL := bash
3-
4-
DUTY = $(shell [ -n "${VIRTUAL_ENV}" ] || echo pdm run) duty
5-
PYTHON_VERSIONS = 3.9 3.10 3.11
3+
DUTY := $(if $(VIRTUAL_ENV),,pdm run) duty
4+
export PDM_MULTIRUN_VERSIONS ?= 3.8 3.9 3.10 3.11 3.12
65

76
args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
87
check_quality_args = files
9-
docs_serve_args = host port
8+
docs_args = host port
109
release_args = version
1110
test_args = match
1211

1312
BASIC_DUTIES = \
1413
changelog \
14+
check-api \
1515
check-dependencies \
1616
clean \
1717
coverage \
1818
docs \
1919
docs-deploy \
20-
docs-regen \
21-
docs-serve \
2220
format \
2321
release
2422

@@ -34,16 +32,16 @@ help:
3432

3533
.PHONY: lock
3634
lock:
37-
@pdm lock
35+
@pdm lock -G:all
3836

3937
.PHONY: setup
4038
setup:
4139
@bash scripts/setup.sh
4240

4341
.PHONY: check
4442
check:
45-
@pdm multirun -i 3.9,3.10,3.11 duty check-quality check-types check-docs
46-
@$(DUTY) check-dependencies
43+
@pdm multirun duty check-quality check-types check-docs
44+
@$(DUTY) check-dependencies check-api
4745

4846
.PHONY: $(BASIC_DUTIES)
4947
$(BASIC_DUTIES):

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pip install griffe-typingdoc
1717

1818
With [`pipx`](https://github.com/pipxproject/pipx):
1919
```bash
20-
python3.7 -m pip install --user pipx
20+
python3.8 -m pip install --user pipx
2121
pipx install griffe-typingdoc
2222
```
2323

config/black.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tool.black]
2+
line-length = 120
3+
exclude = "tests/fixtures"

0 commit comments

Comments
 (0)