Skip to content

Commit

Permalink
chore: Template upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Oct 23, 2023
1 parent e217804 commit 34b08aa
Show file tree
Hide file tree
Showing 22 changed files with 518 additions and 129 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.5
_commit: 1.1.1
_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
git-changelog --debug-info # | xclip -selection clipboard
```

**System (please complete the following information):**
- `git-changelog` 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/git-changelog/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 @@ -46,8 +46,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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ Automatic Changelog generator using Jinja2 templates. From git logs to change lo
## Installation

With `pip`:

```bash
pip install git-changelog
```

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

```bash
python3.8 -m pip install --user pipx
pipx install git-changelog
Expand Down
3 changes: 3 additions & 0 deletions config/ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,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 -->
1 change: 1 addition & 0 deletions docs/css/mkdocstrings.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ a.external::after,
a.autorefs-external::after {
/* https://primer.style/octicons/arrow-up-right-24 */
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.25 15.5a.75.75 0 00.75-.75v-9a.75.75 0 00-.75-.75h-9a.75.75 0 000 1.5h7.19L6.22 16.72a.75.75 0 101.06 1.06L17.5 7.56v7.19c0 .414.336.75.75.75z"></path></svg>');
content: ' ';

display: inline-block;
Expand Down
Loading

0 comments on commit 34b08aa

Please sign in to comment.