Skip to content

Commit

Permalink
chore: Template upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Nov 10, 2023
1 parent 14ada1b commit c64bb73
Show file tree
Hide file tree
Showing 20 changed files with 484 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.6
_commit: 1.1.3
_src_path: gh:pawamoy/copier-pdm
author_email: pawamoy@pm.me
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 griffe_typingdoc.debug # | xclip -selection clipboard
```

**System (please complete the following information):**
- `Griffe TypingDoc` 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/mkdocstrings/griffe-typingdoc/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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ BASIC_DUTIES = \
docs \
docs-deploy \
format \
release
release \
vscode

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

Griffe extension for [PEP 727 – Documentation Metadata in Typing](https://peps.python.org/pep-0727/).

## Installation

With `pip`:

```bash
pip install griffe-typingdoc
```

With [`pipx`](https://github.com/pipxproject/pipx):

```bash
python3.8 -m pip install --user pipx
pipx install griffe-typingdoc
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 -->

0 comments on commit c64bb73

Please sign in to comment.