Skip to content

Commit 143d768

Browse files
committed
chore: Template upgrade
1 parent 225a6f2 commit 143d768

26 files changed

+527
-127
lines changed

.copier-answers.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 0.16.5
2+
_commit: 1.2.3
33
_src_path: gh:pawamoy/copier-pdm
4-
author_email: [email protected]
4+
author_email: [email protected]
55
author_fullname: Timothée Mazzucotelli
66
author_username: pawamoy
77
copyright_date: '2019'
88
copyright_holder: Timothée Mazzucotelli
9-
copyright_holder_email: [email protected]
9+
copyright_holder_email: [email protected]
1010
copyright_license: ISC License
1111
insiders: false
1212
project_description: Automatically link across pages in MkDocs.

.github/ISSUE_TEMPLATE/bug_report.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Bug report
3+
about: Create a bug report to help us improve.
4+
title: "bug: "
5+
labels: unconfirmed
6+
assignees: [pawamoy]
7+
---
8+
9+
### Description of the bug
10+
<!-- Please provide a clear and concise description of what the bug is. -->
11+
12+
### To Reproduce
13+
<!-- Please provide a Minimal Reproducible Example (MRE) if possible.
14+
Try to boil down the problem to a few lines of code.
15+
Your code should run by simply copying and pasting it.
16+
17+
Example:
18+
19+
```
20+
git clone https://github.com/username/repro
21+
cd repro
22+
python -m venv .venv
23+
. .venv/bin/activate
24+
pip install -r requirements.txt
25+
... # command or code showing the issue
26+
```
27+
-->
28+
29+
```
30+
WRITE MRE / INSTRUCTIONS HERE
31+
```
32+
33+
### Full traceback
34+
<!-- Please provide the full error message / traceback if any, by pasting it in the code block below.
35+
No screenshots! -->
36+
37+
<details><summary>Full traceback</summary>
38+
39+
```python
40+
PASTE TRACEBACK HERE
41+
```
42+
43+
</details>
44+
45+
### Expected behavior
46+
<!-- Please provide a clear and concise description of what you expected to happen. -->
47+
48+
### Environment information
49+
<!-- Please run the following command in your repository and paste its output below it,
50+
redacting sensitive information. -->
51+
52+
```bash
53+
python -m mkdocs_autorefs.debug # | xclip -selection clipboard
54+
```
55+
56+
PASTE OUTPUT HERE
57+
58+
### Additional context
59+
<!-- Add any other relevant context about the problem here,
60+
like links to other issues or pull requests, screenshots, etc.
61+
-->

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: I have a question / I need help
4+
url: https://github.com/mkdocstrings/autorefs/discussions/new?category=q-a
5+
about: Ask and answer questions in the Discussions tab.
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project.
4+
title: "feature: "
5+
labels: feature
6+
assignees: pawamoy
7+
---
8+
9+
### Is your feature request related to a problem? Please describe.
10+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]. -->
11+
12+
### Describe the solution you'd like
13+
<!-- A clear and concise description of what you want to happen. -->
14+
15+
### Describe alternatives you've considered
16+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
17+
18+
### Additional context
19+
<!-- Add any other context or screenshots about the feature request here. -->

.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323

2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v3
26+
uses: actions/checkout@v4
2727

2828
- name: Fetch all tags
2929
run: git fetch --depth=1 --tags
3030

3131
- name: Set up PDM
32-
uses: pdm-project/setup-pdm@v3
32+
uses: pdm-project/setup-pdm@v4
3333
with:
3434
python-version: "3.8"
3535

@@ -74,10 +74,10 @@ jobs:
7474

7575
steps:
7676
- name: Checkout
77-
uses: actions/checkout@v3
77+
uses: actions/checkout@v4
7878

7979
- name: Set up PDM
80-
uses: pdm-project/setup-pdm@v3
80+
uses: pdm-project/setup-pdm@v4
8181
with:
8282
python-version: ${{ matrix.python-version }}
8383
allow-python-prereleases: true

.github/workflows/release.yml

+1-1
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

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
2+
.vscode/
23
__pycache__/
34
*.py[cod]
45
dist/

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ representative at an online or offline event.
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6262
reported to the community leaders responsible for enforcement at
63-
63+
6464
All complaints will be reviewed and investigated promptly and fairly.
6565

6666
All community leaders are obligated to respect the privacy and security of the

CONTRIBUTING.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ on multiple Python versions, you run the task directly with `pdm run duty TASK`.
4444
The Makefile detects if a virtual environment is activated,
4545
so `make` will work the same with the virtualenv activated or not.
4646
47-
If you work in VSCode,
48-
[see examples of tasks and run configurations](https://pawamoy.github.io/copier-pdm/work/#vscode-setup).
47+
If you work in VSCode, we provide
48+
[an action to configure VSCode](https://pawamoy.github.io/copier-pdm/work/#vscode-setup)
49+
for the project.
4950
5051
## Development
5152

Makefile

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
SHELL := bash
33
DUTY := $(if $(VIRTUAL_ENV),,pdm run) duty
44
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)
56

67
args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
78
check_quality_args = files
@@ -18,7 +19,8 @@ BASIC_DUTIES = \
1819
docs \
1920
docs-deploy \
2021
format \
21-
release
22+
release \
23+
vscode
2224

2325
QUALITY_DUTIES = \
2426
check-quality \

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
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)
77
[![gitpod](https://img.shields.io/badge/gitpod-workspace-blue.svg?style=flat)](https://gitpod.io/#https://github.com/mkdocstrings/autorefs)
8-
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://gitter.im/mkdocstrings/autorefs)
8+
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#autorefs:gitter.im)
99

1010
Automatically link across pages in MkDocs.
1111

1212
## Installation
1313

1414
With `pip`:
15+
1516
```bash
1617
python3 -m pip install mkdocs-autorefs
1718
```

config/git-changelog.toml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
bump = "auto"
2+
convention = "angular"
3+
in-place = true
4+
output = "CHANGELOG.md"
5+
parse-refs = false
6+
parse-trailers = true
7+
sections = ["build", "deps", "feat", "fix", "refactor"]
8+
template = "keepachangelog"

config/ruff.toml

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
target-version = "py38"
2-
line-length = 132
2+
line-length = 120
33
exclude = [
44
"fixtures",
55
"site",
@@ -77,6 +77,9 @@ ignore = [
7777
"src/*/cli.py" = [
7878
"T201", # Print statement
7979
]
80+
"src/*/debug.py" = [
81+
"T201", # Print statement
82+
]
8083
"scripts/*.py" = [
8184
"INP001", # File is part of an implicit namespace package
8285
"T201", # Print statement
@@ -99,3 +102,7 @@ known-first-party = ["mkdocs_autorefs"]
99102

100103
[pydocstyle]
101104
convention = "google"
105+
106+
[format]
107+
docstring-code-format = true
108+
docstring-code-line-length = 80

config/vscode/launch.json

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "python (current file)",
6+
"type": "debugpy",
7+
"request": "launch",
8+
"program": "${file}",
9+
"console": "integratedTerminal",
10+
"justMyCode": false
11+
},
12+
{
13+
"name": "test",
14+
"type": "debugpy",
15+
"request": "launch",
16+
"module": "pytest",
17+
"justMyCode": false,
18+
"args": [
19+
"-c=config/pytest.ini",
20+
"-vvv",
21+
"--no-cov",
22+
"--dist=no",
23+
"tests",
24+
"-k=${input:tests_selection}"
25+
]
26+
}
27+
],
28+
"inputs": [
29+
{
30+
"id": "tests_selection",
31+
"type": "promptString",
32+
"description": "Tests selection",
33+
"default": ""
34+
}
35+
]
36+
}

config/vscode/settings.json

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"files.watcherExclude": {
3+
"**/__pypackages__/**": true,
4+
"**/.venv*/**": true,
5+
"**/venv*/**": true
6+
},
7+
"[python]": {
8+
"editor.defaultFormatter": "ms-python.black-formatter"
9+
},
10+
"python.autoComplete.extraPaths": [
11+
"__pypackages__/3.8/lib",
12+
"__pypackages__/3.9/lib",
13+
"__pypackages__/3.10/lib",
14+
"__pypackages__/3.11/lib",
15+
"__pypackages__/3.12/lib"
16+
],
17+
"python.analysis.extraPaths": [
18+
"__pypackages__/3.8/lib",
19+
"__pypackages__/3.9/lib",
20+
"__pypackages__/3.10/lib",
21+
"__pypackages__/3.11/lib",
22+
"__pypackages__/3.12/lib"
23+
],
24+
"black-formatter.args": [
25+
"--config=config/black.toml"
26+
],
27+
"mypy-type-checker.args": [
28+
"--config-file=config/mypy.ini"
29+
],
30+
"python.testing.unittestEnabled": false,
31+
"python.testing.pytestEnabled": true,
32+
"python.testing.pytestArgs": [
33+
"--config-file=config/pytest.ini"
34+
],
35+
"ruff.format.args": [
36+
"--config=config/ruff.toml"
37+
],
38+
"ruff.lint.args": [
39+
"--config=config/ruff.toml"
40+
],
41+
"yaml.schemas": {
42+
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
43+
},
44+
"yaml.customTags": [
45+
"!ENV scalar",
46+
"!ENV sequence",
47+
"!relative scalar",
48+
"tag:yaml.org,2002:python/name:materialx.emoji.to_svg",
49+
"tag:yaml.org,2002:python/name:materialx.emoji.twemoji",
50+
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
51+
]
52+
}

0 commit comments

Comments
 (0)