Skip to content

Commit

Permalink
chore: Template upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Jan 18, 2024
1 parent bd54095 commit f99f0cb
Show file tree
Hide file tree
Showing 22 changed files with 490 additions and 142 deletions.
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 0.16.8
_commit: 1.2.0
_src_path: gh:pawamoy/copier-pdm
author_email: [email protected]
author_fullname: Timothée Mazzucotelli
Expand Down
73 changes: 51 additions & 22 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,61 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
about: Create a bug report to help us improve.
title: "bug: "
labels: unconfirmed
assignees: ''

assignees: [pawamoy]
---

**Describe the bug**
A clear and concise description of what the bug is.
### Description of the bug
<!-- Please provide a clear and concise description of what the bug is. -->

### To Reproduce
<!-- Please provide a Minimal Reproducible Example (MRE) if possible.
Try to boil down the problem to a few lines of code.
Your code should run by simply copying and pasting it.
Example:
```
git clone https://github.com/username/repro
cd repro
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
... # command or code showing the issue
```
-->

```
WRITE MRE / INSTRUCTIONS HERE
```

### Full traceback
<!-- Please provide the full error message / traceback if any, by pasting it in the code block below.
No screenshots! -->

<details><summary>Full traceback</summary>

```python
PASTE TRACEBACK HERE
```

</details>

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

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

**Screenshots**
If applicable, add screenshots to help explain your problem.
```bash
python -m mkdocs_spellcheck.debug # | xclip -selection clipboard
```

**System (please complete the following information):**
- `MkDocs SpellCheck` version: [e.g. 0.2.1]
- Python version: [e.g. 3.8]
- OS: [Windows/Linux]
PASTE OUTPUT HERE

**Additional context**
Add any other context about the problem here.
### Additional context
<!-- Add any other relevant context about the problem here,
like links to other issues or pull requests, screenshots, etc.
-->
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: I have a question / I need help
url: https://github.com/pawamoy/mkdocs-spellcheck/discussions/new?category=q-a
about: Ask and answer questions in the Discussions tab.
23 changes: 11 additions & 12 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
about: Suggest an idea for this project.
title: "feature: "
labels: feature
assignees: ''

assignees: pawamoy
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
### Is your feature request related to a problem? Please describe.
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]. -->

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

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

**Additional context**
Add any other context or screenshots about the feature request here.
### Additional context
<!-- Add any other context or screenshots about the feature request here. -->
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ on multiple Python versions, you run the task directly with `pdm run duty TASK`.
The Makefile detects if a virtual environment is activated,
so `make` will work the same with the virtualenv activated or not.
If you work in VSCode,
[see examples of tasks and run configurations](https://pawamoy.github.io/copier-pdm/work/#vscode-setup).
If you work in VSCode, we provide
[an action to configure VSCode](https://pawamoy.github.io/copier-pdm/work/#vscode-setup)
for the project.
## Development
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
SHELL := bash
DUTY := $(if $(VIRTUAL_ENV),,pdm run) duty
export PDM_MULTIRUN_VERSIONS ?= 3.8 3.9 3.10 3.11 3.12
export PDM_MULTIRUN_USE_VENVS ?= $(if $(shell pdm config python.use_venv | grep True),1,0)

args = $(foreach a,$($(subst -,_,$1)_args),$(if $(value $a),$a="$($a)"))
check_quality_args = files
Expand All @@ -18,7 +19,8 @@ BASIC_DUTIES = \
docs \
docs-deploy \
format \
release
release \
vscode

QUALITY_DUTIES = \
check-quality \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![documentation](https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat)](https://pawamoy.github.io/mkdocs-spellcheck/)
[![pypi version](https://img.shields.io/pypi/v/mkdocs-spellcheck.svg)](https://pypi.org/project/mkdocs-spellcheck/)
[![gitpod](https://img.shields.io/badge/gitpod-workspace-blue.svg?style=flat)](https://gitpod.io/#https://github.com/pawamoy/mkdocs-spellcheck)
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://gitter.im/mkdocs-spellcheck/community)
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#mkdocs-spellcheck:gitter.im)

A spell checker plugin for MkDocs.

Expand Down
8 changes: 8 additions & 0 deletions config/git-changelog.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
bump = "auto"
convention = "angular"
in-place = true
output = "CHANGELOG.md"
parse-refs = false
parse-trailers = true
sections = ["build", "deps", "feat", "fix", "refactor"]
template = "keepachangelog"
3 changes: 3 additions & 0 deletions config/ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ ignore = [
"src/*/cli.py" = [
"T201", # Print statement
]
"src/*/debug.py" = [
"T201", # Print statement
]
"scripts/*.py" = [
"INP001", # File is part of an implicit namespace package
"T201", # Print statement
Expand Down
36 changes: 36 additions & 0 deletions config/vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "python (current file)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "test",
"type": "python",
"request": "launch",
"module": "pytest",
"justMyCode": false,
"args": [
"-c=config/pytest.ini",
"-vvv",
"--no-cov",
"--dist=no",
"tests",
"-k=${input:tests_selection}"
]
}
],
"inputs": [
{
"id": "tests_selection",
"type": "promptString",
"description": "Tests selection",
"default": ""
}
]
}
52 changes: 52 additions & 0 deletions config/vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"files.watcherExclude": {
"**/__pypackages__/**": true,
"**/.venv*/**": true,
"**/venv*/**": true
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.autoComplete.extraPaths": [
"__pypackages__/3.8/lib",
"__pypackages__/3.9/lib",
"__pypackages__/3.10/lib",
"__pypackages__/3.11/lib",
"__pypackages__/3.12/lib"
],
"python.analysis.extraPaths": [
"__pypackages__/3.8/lib",
"__pypackages__/3.9/lib",
"__pypackages__/3.10/lib",
"__pypackages__/3.11/lib",
"__pypackages__/3.12/lib"
],
"black-formatter.args": [
"--config=config/black.toml"
],
"mypy-type-checker.args": [
"--config-file=config/mypy.ini"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": [
"--config-file=config/pytest.ini"
],
"ruff.format.args": [
"--config=config/ruff.toml"
],
"ruff.lint.args": [
"--config=config/ruff.toml"
],
"yaml.schemas": {
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
},
"yaml.customTags": [
"!ENV scalar",
"!ENV sequence",
"!relative scalar",
"tag:yaml.org,2002:python/name:materialx.emoji.to_svg",
"tag:yaml.org,2002:python/name:materialx.emoji.twemoji",
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
]
}
93 changes: 93 additions & 0 deletions config/vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "changelog",
"type": "shell",
"command": "pdm run duty changelog"
},
{
"label": "check",
"type": "shell",
"command": "pdm run duty check"
},
{
"label": "check-quality",
"type": "shell",
"command": "pdm run duty check-quality"
},
{
"label": "check-types",
"type": "shell",
"command": "pdm run duty check-types"
},
{
"label": "check-docs",
"type": "shell",
"command": "pdm run duty check-docs"
},
{
"label": "check-dependencies",
"type": "shell",
"command": "pdm run duty check-dependencies"
},
{
"label": "check-api",
"type": "shell",
"command": "pdm run duty check-api"
},
{
"label": "clean",
"type": "shell",
"command": "pdm run duty clean"
},
{
"label": "docs",
"type": "shell",
"command": "pdm run duty docs"
},
{
"label": "docs-deploy",
"type": "shell",
"command": "pdm run duty docs-deploy"
},
{
"label": "format",
"type": "shell",
"command": "pdm run duty format"
},
{
"label": "lock",
"type": "shell",
"command": "pdm lock -G:all"
},
{
"label": "release",
"type": "shell",
"command": "pdm run duty release ${input:version}"
},
{
"label": "setup",
"type": "shell",
"command": "bash scripts/setup.sh"
},
{
"label": "test",
"type": "shell",
"command": "pdm run duty test coverage",
"group": "test"
},
{
"label": "vscode",
"type": "shell",
"command": "pdm run duty vscode"
}
],
"inputs": [
{
"id": "version",
"type": "promptString",
"description": "Version"
}
]
}
2 changes: 2 additions & 0 deletions docs/credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ hide:
- toc
---

<!-- blacken-docs:off -->
```python exec="yes"
--8<-- "scripts/gen_credits.py"
```
<!-- blacken-docs:on -->
4 changes: 3 additions & 1 deletion docs/known_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ www
https
html
faq
code_of_conduct
code_of_conduct
dataclass
ahrens
Loading

0 comments on commit f99f0cb

Please sign in to comment.