Skip to content

Commit 145e9bc

Browse files
committed
chore: Template upgrade
1 parent 6667513 commit 145e9bc

22 files changed

+493
-144
lines changed

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: 0.16.5
2+
_commit: 1.2.0
33
_src_path: gh:pawamoy/copier-pdm
44
author_email: [email protected]
55
author_fullname: Timothée Mazzucotelli

.github/ISSUE_TEMPLATE/bug_report.md

+51-22
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,61 @@
11
---
22
name: Bug report
3-
about: Create a report to help us improve
4-
title: ''
3+
about: Create a bug report to help us improve.
4+
title: "bug: "
55
labels: unconfirmed
6-
assignees: ''
7-
6+
assignees: [pawamoy]
87
---
98

10-
**Describe the bug**
11-
A clear and concise description of what the bug is.
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>
1244

13-
**To Reproduce**
14-
Steps to reproduce the behavior:
15-
1. Go to '...'
16-
2. Run command '...'
17-
3. Scroll down to '...'
18-
4. See error
45+
### Expected behavior
46+
<!-- Please provide a clear and concise description of what you expected to happen. -->
1947

20-
**Expected behavior**
21-
A clear and concise description of what you expected to happen.
48+
### Environment information
49+
<!-- Please run the following command in your repository and paste its output below it,
50+
redacting sensitive information. -->
2251

23-
**Screenshots**
24-
If applicable, add screenshots to help explain your problem.
52+
```bash
53+
python -m mkdocs_coverage.debug # | xclip -selection clipboard
54+
```
2555

26-
**System (please complete the following information):**
27-
- `MkDocs Coverage Plugin` version: [e.g. 0.2.1]
28-
- Python version: [e.g. 3.8]
29-
- OS: [Windows/Linux]
56+
PASTE OUTPUT HERE
3057

31-
**Additional context**
32-
Add any other context about the problem here.
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/pawamoy/mkdocs-coverage/discussions/new?category=q-a
5+
about: Ask and answer questions in the Discussions tab.
+11-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
---
22
name: Feature request
3-
about: Suggest an idea for this project
4-
title: ''
3+
about: Suggest an idea for this project.
4+
title: "feature: "
55
labels: feature
6-
assignees: ''
7-
6+
assignees: pawamoy
87
---
98

10-
**Is your feature request related to a problem? Please describe.**
11-
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
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 [...]. -->
1211

13-
**Describe the solution you'd like**
14-
A clear and concise description of what you want to happen.
12+
### Describe the solution you'd like
13+
<!-- A clear and concise description of what you want to happen. -->
1514

16-
**Describe alternatives you've considered**
17-
A clear and concise description of any alternative solutions or features you've considered.
15+
### Describe alternatives you've considered
16+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
1817

19-
**Additional context**
20-
Add any other context or screenshots about the feature request here.
18+
### Additional context
19+
<!-- Add any other context or screenshots about the feature request here. -->

CONTRIBUTING.md

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

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@
44
[![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://pawamoy.github.io/mkdocs-coverage/)
55
[![pypi version](https://img.shields.io/pypi/v/mkdocs-coverage.svg)](https://pypi.org/project/mkdocs-coverage/)
66
[![gitpod](https://img.shields.io/badge/gitpod-workspace-blue.svg?style=flat)](https://gitpod.io/#https://github.com/pawamoy/mkdocs-coverage)
7-
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://gitter.im/mkdocs-coverage/community)
7+
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#mkdocs-coverage:gitter.im)
88

99
MkDocs plugin to integrate your coverage HTML report into your site.
1010

1111
## Installation
1212

1313
With `pip`:
14+
1415
```bash
1516
pip install mkdocs-coverage
1617
```
1718

1819
With [`pipx`](https://github.com/pipxproject/pipx):
20+
1921
```bash
2022
python3.8 -m pip install --user pipx
2123
pipx install mkdocs-coverage

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

+3
Original file line numberDiff line numberDiff line change
@@ -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

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": "python",
7+
"request": "launch",
8+
"program": "${file}",
9+
"console": "integratedTerminal",
10+
"justMyCode": false
11+
},
12+
{
13+
"name": "test",
14+
"type": "python",
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+
}

config/vscode/tasks.json

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "changelog",
6+
"type": "shell",
7+
"command": "pdm run duty changelog"
8+
},
9+
{
10+
"label": "check",
11+
"type": "shell",
12+
"command": "pdm run duty check"
13+
},
14+
{
15+
"label": "check-quality",
16+
"type": "shell",
17+
"command": "pdm run duty check-quality"
18+
},
19+
{
20+
"label": "check-types",
21+
"type": "shell",
22+
"command": "pdm run duty check-types"
23+
},
24+
{
25+
"label": "check-docs",
26+
"type": "shell",
27+
"command": "pdm run duty check-docs"
28+
},
29+
{
30+
"label": "check-dependencies",
31+
"type": "shell",
32+
"command": "pdm run duty check-dependencies"
33+
},
34+
{
35+
"label": "check-api",
36+
"type": "shell",
37+
"command": "pdm run duty check-api"
38+
},
39+
{
40+
"label": "clean",
41+
"type": "shell",
42+
"command": "pdm run duty clean"
43+
},
44+
{
45+
"label": "docs",
46+
"type": "shell",
47+
"command": "pdm run duty docs"
48+
},
49+
{
50+
"label": "docs-deploy",
51+
"type": "shell",
52+
"command": "pdm run duty docs-deploy"
53+
},
54+
{
55+
"label": "format",
56+
"type": "shell",
57+
"command": "pdm run duty format"
58+
},
59+
{
60+
"label": "lock",
61+
"type": "shell",
62+
"command": "pdm lock -G:all"
63+
},
64+
{
65+
"label": "release",
66+
"type": "shell",
67+
"command": "pdm run duty release ${input:version}"
68+
},
69+
{
70+
"label": "setup",
71+
"type": "shell",
72+
"command": "bash scripts/setup.sh"
73+
},
74+
{
75+
"label": "test",
76+
"type": "shell",
77+
"command": "pdm run duty test coverage",
78+
"group": "test"
79+
},
80+
{
81+
"label": "vscode",
82+
"type": "shell",
83+
"command": "pdm run duty vscode"
84+
}
85+
],
86+
"inputs": [
87+
{
88+
"id": "version",
89+
"type": "promptString",
90+
"description": "Version"
91+
}
92+
]
93+
}

docs/credits.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ hide:
33
- toc
44
---
55

6+
<!-- blacken-docs:off -->
67
```python exec="yes"
78
--8<-- "scripts/gen_credits.py"
89
```
10+
<!-- blacken-docs:on -->

0 commit comments

Comments
 (0)