WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 0abfe76

Browse files
committed
Merge branch 'main' of github.com:pawamoy/copier-uv
2 parents 186f388 + c47b815 commit 0abfe76

File tree

15 files changed

+187
-35
lines changed

15 files changed

+187
-35
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,38 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

88
<!-- insertion marker -->
9+
## [1.5.0](https://github.com/mkdocstrings/handler-template/releases/tag/1.5.0) - 2025-10-09
10+
11+
<small>[Compare with 1.4.5](https://github.com/mkdocstrings/handler-template/compare/1.4.5...1.5.0)</small>
12+
13+
### Merge upstream
14+
15+
#### Bug Fixes
16+
17+
- Fix typo in PR template ([b270abc](https://github.com/pawamoy/copier-uv/commit/b270abcd8a4cf25819ac2dbed5de9aa506dfea07) by Timothée Mazzucotelli).
18+
19+
#### Features
20+
21+
- Warn on default encoding in `open()` calls ([f41edb4](https://github.com/pawamoy/copier-uv/commit/f41edb4bf2955944f41905db003ceb3414707286) by Bartosz Sławecki). [PR-77](https://github.com/pawamoy/copier-uv/pull/77)
22+
- Run quality CI on matrix ([27ffb20](https://github.com/pawamoy/copier-uv/commit/27ffb20707594ae9e8d3c18cee67b8750cff8b66) by Bartosz Sławecki). [PR-73](https://github.com/pawamoy/copier-uv/pull/73)
23+
- Don't run CI on topic branches without a PR ([0c4f6cd](https://github.com/pawamoy/copier-uv/commit/0c4f6cd4cf5a00e67ec64d61078c8b0cc8891e87) by Bartosz Sławecki). [PR-71](https://github.com/pawamoy/copier-uv/pull/71)
24+
- Cancel no longer useful runs in the same PR ([34b8778](https://github.com/pawamoy/copier-uv/commit/34b8778f63a3986d26a521917658c7057541ab51) by Bartosz Sławecki). [PR-74](https://github.com/pawamoy/copier-uv/pull/74)
25+
- Print file:lineno in API test output ([fce4ee4](https://github.com/pawamoy/copier-uv/commit/fce4ee494b095fdd998f00a695b93580e5518917) by Timothée Mazzucotelli).
26+
- Add pull request template ([5f60cf1](https://github.com/pawamoy/copier-uv/commit/5f60cf1c6b25490c0798e1b3d5e661160f78a993) by Timothée Mazzucotelli).
27+
28+
#### Code Refactoring
29+
30+
- Support light and dark background logos for premium sponsors ([852105a](https://github.com/pawamoy/copier-uv/commit/852105a6c5fc57f456b4f11b44badff9c939c3cc) by Timothée Mazzucotelli).
31+
- Don't fail fast ([bce6109](https://github.com/pawamoy/copier-uv/commit/bce61095c99a0b95f89f0edfa9a2a616580b7084) by Bartosz Sławecki). [PR-75](https://github.com/pawamoy/copier-uv/pull/75)
32+
- Be more resilient to errors in latest (dev) Python version ([898db72](https://github.com/pawamoy/copier-uv/commit/898db72f88f12707452727afcd60701c7f7d433c) by Timothée Mazzucotelli).
33+
- Remove Radicle badge extension (too bothersome, will add badges manually) ([1e2dbfd](https://github.com/pawamoy/copier-uv/commit/1e2dbfdeaa6891d2204ad192bd60e43d702a6d4a) by Timothée Mazzucotelli).
34+
- Debug Radicle ID context hook ([d8069b9](https://github.com/pawamoy/copier-uv/commit/d8069b9990c86dcba61ac88cd09d0d4c1613b1fc) by Timothée Mazzucotelli).
35+
- Take control over the Gitter/Matrix badge's color ([a8f9282](https://github.com/pawamoy/copier-uv/commit/a8f92822ddc4bc607cba12bfbf0de8e99faf3a14) by Timothée Mazzucotelli).
36+
- Add a `rad clone` badge if the repository was `rad init`'d ([ee65aee](https://github.com/pawamoy/copier-uv/commit/ee65aee0375d4a381dbd9e59f4d9b525c9ca5b6b) by Timothée Mazzucotelli).
37+
- Use new package name for extensions ([27c1d8e](https://github.com/pawamoy/copier-uv/commit/27c1d8e8b2e55c2b2c7e78af13c655fa5c5ccb08) by Timothée Mazzucotelli).
38+
- Improve initial output of `make` ([ac0da32](https://github.com/pawamoy/copier-uv/commit/ac0da32484365a593b79b98acf25301704653223) by Timothée Mazzucotelli). [PR-griffe-393](https://github.com/mkdocstrings/griffe/pull/393)
39+
- Ignore Ruff/ty warnings, prepare ty use ([d581cd6](https://github.com/pawamoy/copier-uv/commit/d581cd6164a82c47924e908a6287b4cfde850412) by Timothée Mazzucotelli).
40+
941
## [1.4.5](https://github.com/mkdocstrings/handler-template/releases/tag/1.4.5) - 2025-05-20
1042

1143
<small>[Compare with 1.4.4](https://github.com/mkdocstrings/handler-template/compare/1.4.4...1.4.5)</small>

copier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ _subdirectory: project
77
_templates_suffix: .jinja
88
_preserve_symlinks: true
99
_jinja_extensions:
10-
- copier_templates_extensions.TemplateExtensionLoader
10+
- copier_template_extensions.TemplateExtensionLoader
1111
- extensions.py:CurrentYearExtension
1212
- extensions.py:GitExtension
1313
- extensions.py:SlugifyExtension
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
### For reviewers
2+
<!-- Help reviewers by letting them know whether AI was used to create this PR. -->
3+
4+
- [ ] I did not use AI
5+
- [ ] I used AI and thoroughly reviewed every code/docs change
6+
7+
### Description of the change
8+
<!-- Quick sentence for small changes, longer description for more impacting changes. -->
9+
10+
### Relevant resources
11+
<!-- Link to any relevant GitHub issue, PR or discussion, section in online docs, etc. -->
12+
13+
-
14+
-
15+
-

project/.github/workflows/ci.yml.jinja

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@ name: ci
22

33
on:
44
push:
5+
- main
6+
- test-me-*
57
pull_request:
68
branches:
79
- main
810

11+
concurrency:
12+
group: {% raw %}${{ github.workflow }}-${{ github.ref }}{% endraw %}
13+
cancel-in-progress: {% raw %}${{ github.event_name == 'pull_request' }}{% endraw %}
14+
915
defaults:
1016
run:
1117
shell: bash
@@ -14,13 +20,30 @@ env:
1420
LANG: en_US.utf-8
1521
LC_ALL: en_US.utf-8
1622
PYTHONIOENCODING: UTF-8
23+
PYTHONWARNDEFAULTENCODING: "1"
1724
PYTHON_VERSIONS: ""
1825

1926
jobs:
2027

2128
quality:
29+
strategy:
30+
matrix:
31+
os:
32+
- ubuntu-latest
33+
- macos-latest
34+
- windows-latest
35+
python-version:
36+
- "3.9"
37+
- "3.13"
38+
include:
39+
- os: ubuntu-latest
40+
python-version: "3.10"
41+
- os: ubuntu-latest
42+
python-version: "3.11"
43+
- os: ubuntu-latest
44+
python-version: "3.12"
2245

23-
runs-on: ubuntu-latest
46+
runs-on: {% raw %}${{ matrix.os }}{% endraw %}
2447

2548
steps:
2649
- name: Checkout
@@ -32,7 +55,7 @@ jobs:
3255
- name: Setup Python
3356
uses: actions/setup-python@v5
3457
with:
35-
python-version: "3.12"
58+
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
3659

3760
- name: Setup uv
3861
uses: astral-sh/setup-uv@v5
@@ -120,7 +143,7 @@ jobs:
120143
resolution: lowest-direct
121144
{%- endif %}
122145
runs-on: {% raw %}${{ matrix.os }}{% endraw %}
123-
continue-on-error: {% raw %}${{ matrix.python-version == '3.14' }}{% endraw %}
146+
continue-on-error: true
124147

125148
steps:
126149
- name: Checkout

project/Makefile.jinja

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
# the `make` command will point at the `scripts/make` shell script.
33
# This Makefile is just here to allow auto-completion in the terminal.
44

5+
default: help
6+
@echo
7+
@echo 'Enable direnv in your shell to use the `make` command: `direnv allow`'
8+
@echo 'Or use `python scripts/make ARGS` to run the commands/tasks directly.'
9+
10+
.DEFAULT_GOAL: default
11+
512
actions = \
613
allrun \
714
changelog \

project/README.md.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
{% if not insiders or public_release -%}
88
[![pypi version](https://img.shields.io/pypi/v/{{ python_package_distribution_name }}.svg)](https://pypi.org/project/{{ python_package_distribution_name }}/)
99
{% endif -%}
10-
[![gitter](https://badges.gitter.im/join%20chat.svg)](https://app.gitter.im/#/room/#{{ repository_name }}:gitter.im)
10+
[![gitter](https://img.shields.io/badge/matrix-chat-4DB798.svg?style=flat)](https://app.gitter.im/#/room/#{{ repository_name }}:gitter.im)
1111

1212
{{ project_description }}
1313

project/config/pytest.ini.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ testpaths =
1010
# action:message_regex:warning_class:module_regex:line
1111
filterwarnings =
1212
error
13+
default::EncodingWarning
14+
error::EncodingWarning:{{python_package_import_name}}
1315
# TODO: remove once pytest-xdist 4 is released
1416
ignore:.*rsyncdir:DeprecationWarning:xdist

project/config/pytest_39.ini.jinja

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# YORE: EOL 3.9: Remove file.
2+
# This file is used on 3.9 due to forward compatibility issue with filterwarnings.
3+
# See https://github.com/pytest-dev/pytest/issues/11101.
4+
[pytest]
5+
python_files =
6+
test_*.py
7+
addopts =
8+
--cov
9+
--cov-config config/coverage.ini
10+
testpaths =
11+
tests
12+
13+
# action:message_regex:warning_class:module_regex:line
14+
filterwarnings =
15+
error
16+
# TODO: remove once pytest-xdist 4 is released
17+
ignore:.*rsyncdir:DeprecationWarning:xdist

project/docs/js/{% if insiders %}insiders.js{% endif %}.jinja

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ function updatePremiumSponsors(dataURL, rank) {
2929
let html = '';
3030
html += `<b>${capRank} sponsors</b><p>`
3131
sponsors.forEach(function (sponsor) {
32-
html += `
33-
<a href="${sponsor.url}" target="_blank" title="${sponsor.name}">
34-
<img alt="${sponsor.name}" src="${sponsor.image}" style="height: ${sponsor.imageHeight}px;">
35-
</a>
36-
`
32+
html += `<a href="${sponsor.url}" target="_blank" title="${sponsor.name}">`
33+
if (sponsor.image) {
34+
html += `<img alt="${sponsor.name}" src="${sponsor.image}" style="height: ${sponsor.imageHeight}px;">`
35+
} else if (sponsor.imageLight && sponsor.imageDark) {
36+
html += `<img alt="${sponsor.name}" src="${sponsor.imageLight}#only-light" style="height: ${sponsor.imageHeight}px;">`
37+
html += `<img alt="${sponsor.name}" src="${sponsor.imageDark}#only-dark" style="height: ${sponsor.imageHeight}px;">`
38+
}
39+
html += '</a>';
3740
});
3841
html += '</p>'
3942
sponsorsDiv.innerHTML = html;

project/duties.py.jinja

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ CI = os.environ.get("CI", "0") in {"1", "true", "yes", ""}
2828
WINDOWS = os.name == "nt"
2929
PTY = not WINDOWS and not CI
3030
MULTIRUN = os.environ.get("MULTIRUN", "0") == "1"
31+
PY_VERSION = f"{sys.version_info.major}{sys.version_info.minor}"
32+
PY_DEV = "314"
3133

3234

3335
def pyprefix(title: str) -> str:
@@ -90,7 +92,7 @@ def check(ctx: Context) -> None:
9092
"""Check it all!"""
9193

9294

93-
@duty
95+
@duty(nofail=PY_VERSION == PY_DEV)
9496
def check_quality(ctx: Context) -> None:
9597
"""Check the code quality."""
9698
ctx.run(
@@ -99,7 +101,7 @@ def check_quality(ctx: Context) -> None:
99101
)
100102

101103

102-
@duty
104+
@duty(nofail=PY_VERSION == PY_DEV)
103105
def check_docs(ctx: Context) -> None:
104106
"""Check if the documentation builds correctly."""
105107
Path("htmlcov").mkdir(parents=True, exist_ok=True)
@@ -111,7 +113,7 @@ def check_docs(ctx: Context) -> None:
111113
)
112114

113115

114-
@duty
116+
@duty(nofail=PY_VERSION == PY_DEV)
115117
def check_types(ctx: Context) -> None:
116118
"""Check that the code is correctly typed."""
117119
os.environ["MYPYPATH"] = "src"
@@ -122,7 +124,7 @@ def check_types(ctx: Context) -> None:
122124
)
123125

124126

125-
@duty
127+
@duty(nofail=PY_VERSION == PY_DEV)
126128
def check_api(ctx: Context, *cli_args: str) -> None:
127129
"""Check for API breaking changes."""
128130
ctx.run(
@@ -255,19 +257,24 @@ def coverage(ctx: Context) -> None:
255257
ctx.run(tools.coverage.html(rcfile="config/coverage.ini"))
256258

257259

258-
@duty
259-
def test(ctx: Context, *cli_args: str, match: str = "") -> None:
260+
@duty(nofail=PY_VERSION == PY_DEV)
261+
def test(ctx: Context, *cli_args: str, match: str = "") -> None: # noqa: PT028
260262
"""Run the test suite.
261263

262264
Parameters:
263265
match: A pytest expression to filter selected tests.
264266
"""
265-
py_version = f"{sys.version_info.major}{sys.version_info.minor}"
266-
os.environ["COVERAGE_FILE"] = f".coverage.{py_version}"
267+
os.environ["COVERAGE_FILE"] = f".coverage.{PY_VERSION}"
268+
os.environ["PYTHONWARNDEFAULTENCODING"] = "1"
269+
config_file = "config/pytest.ini"
270+
# YORE: EOL 3.9: Remove block.
271+
if sys.version_info[:2] < (3, 10):
272+
config_file = "config/pytest_39.ini"
273+
267274
ctx.run(
268275
tools.pytest(
269276
"tests",
270-
config_file="config/pytest.ini",
277+
config_file=config_file,
271278
select=match,
272279
color="yes",
273280
).add_args("-n", "auto", *cli_args),

0 commit comments

Comments
 (0)