Skip to content

Commit cb2af1b

Browse files
committed
chore: Regen template to change insiders answer
1 parent 552db0f commit cb2af1b

8 files changed

Lines changed: 33 additions & 104 deletions

File tree

.copier-answers.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier.
2-
_commit: 1.8.9
2+
_commit: 1.9.0
33
_src_path: gh:pawamoy/copier-uv
44
author_email: dev@pawamoy.fr
55
author_fullname: Timothée Mazzucotelli
@@ -8,14 +8,11 @@ copyright_date: '2021'
88
copyright_holder: Timothée Mazzucotelli
99
copyright_holder_email: dev@pawamoy.fr
1010
copyright_license: ISC
11-
insiders: true
12-
insiders_email: insiders@pawamoy.fr
13-
insiders_repository_name: griffe
11+
insiders: false
1412
project_description: Signatures for entire Python programs. Extract the structure,
1513
the frame, the skeleton of your project, to generate API documentation or find
1614
breaking changes in your API.
1715
project_name: Griffe
18-
public_release: true
1916
python_package_command_line_name: griffe
2017
python_package_distribution_name: griffe
2118
python_package_import_name: griffe

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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 thorougly 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+
11+
### Relevant resources
12+
<!-- Link to any relevant GitHub issue, PR or discussion, section in online docs, etc. -->
13+
14+
-
15+
-
16+
-

.github/workflows/ci.yml

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,35 +64,10 @@ jobs:
6464
name: objects.inv
6565
path: site/objects.inv
6666

67-
exclude-test-jobs:
68-
runs-on: ubuntu-latest
69-
outputs:
70-
jobs: ${{ steps.exclude-jobs.outputs.jobs }}
71-
steps:
72-
- id: exclude-jobs
73-
run: |
74-
if ${{ github.repository_owner == 'pawamoy-insiders' }}; then
75-
echo 'jobs=[
76-
{"os": "macos-latest"},
77-
{"os": "windows-latest"},
78-
{"python-version": "3.10"},
79-
{"python-version": "3.11"},
80-
{"python-version": "3.12"},
81-
{"python-version": "3.13"},
82-
{"python-version": "3.14"}
83-
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
84-
else
85-
echo 'jobs=[
86-
{"os": "macos-latest", "resolution": "lowest-direct"},
87-
{"os": "windows-latest", "resolution": "lowest-direct"}
88-
]' | tr -d '[:space:]' >> $GITHUB_OUTPUT
89-
fi
90-
9167
tests:
9268

9369
needs:
9470
- quality
95-
- exclude-test-jobs
9671
strategy:
9772
matrix:
9873
os:
@@ -109,7 +84,11 @@ jobs:
10984
resolution:
11085
- highest
11186
- lowest-direct
112-
exclude: ${{ fromJSON(needs.exclude-test-jobs.outputs.jobs) }}
87+
exclude:
88+
- os: macos-latest
89+
resolution: lowest-direct
90+
- os: windows-latest
91+
resolution: lowest-direct
11392
runs-on: ${{ matrix.os }}
11493
continue-on-error: ${{ matrix.python-version == '3.14' || matrix.python-version == '3.13' }}
11594

.github/workflows/release.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,9 @@ jobs:
2020
python-version: "3.12"
2121
- name: Setup uv
2222
uses: astral-sh/setup-uv@v5
23-
- name: Build dists
24-
if: github.repository_owner == 'pawamoy-insiders'
25-
run: uv tool run --from build pyproject-build
26-
- name: Upload dists artifact
27-
uses: actions/upload-artifact@v4
28-
if: github.repository_owner == 'pawamoy-insiders'
29-
with:
30-
name: griffe-insiders
31-
path: ./dist/*
3223
- name: Prepare release notes
33-
if: github.repository_owner != 'pawamoy-insiders'
3424
run: uv tool run git-changelog --release-notes > release-notes.md
35-
- name: Create release with assets
36-
uses: softprops/action-gh-release@v2
37-
if: github.repository_owner == 'pawamoy-insiders'
38-
with:
39-
files: ./dist/*
4025
- name: Create release
4126
uses: softprops/action-gh-release@v2
42-
if: github.repository_owner != 'pawamoy-insiders'
4327
with:
4428
body_path: release-notes.md

docs/.overrides/main.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{% extends "base.html" %}
22

33
{% block announce %}
4-
5-
<strong>Fund this project</strong> through
6-
<a href="https://github.com/sponsors/pawamoy"><strong>sponsorship</strong></a>
7-
<span class="twemoji heart pulse">
8-
{% include ".icons/octicons/heart-fill-16.svg" %}
9-
</span> &mdash;
4+
<strong>Fund this project</strong> through
5+
<a href="https://github.com/sponsors/pawamoy"><strong>sponsorship</strong></a>
6+
<span class="twemoji heart pulse">
7+
{% include ".icons/octicons/heart-fill-16.svg" %}
8+
</span> &mdash;
109

1110
Follow
1211
<strong>@pawamoy</strong> on

duties.py

Lines changed: 3 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77
import sys
88
import warnings
99
from contextlib import contextmanager
10-
from functools import partial, wraps
1110
from importlib.metadata import version as pkgversion
1211
from pathlib import Path
13-
from random import sample
14-
from tempfile import gettempdir
15-
from typing import TYPE_CHECKING, Any, Callable
12+
from typing import TYPE_CHECKING
1613

1714
from duty import duty, tools
1815
from pysource_codegen import generate
@@ -42,21 +39,6 @@ def _pyprefix(title: str) -> str:
4239
return title
4340

4441

45-
def _not_from_insiders(func: Callable) -> Callable:
46-
@wraps(func)
47-
def wrapper(ctx: Context, *args: Any, **kwargs: Any) -> None:
48-
origin = ctx.run("git config --get remote.origin.url", silent=True)
49-
if "pawamoy-insiders/griffe" in origin:
50-
ctx.run(
51-
lambda: False,
52-
title="Not running this task from insiders repository (do that from public repo instead!)",
53-
)
54-
return
55-
func(ctx, *args, **kwargs)
56-
57-
return wrapper
58-
59-
6042
@contextmanager
6143
def _material_insiders() -> Iterator[bool]:
6244
if "+insiders" in pkgversion("mkdocs-material"):
@@ -336,45 +318,20 @@ def docs(ctx: Context, *cli_args: str, host: str = "127.0.0.1", port: int = 8000
336318

337319

338320
@duty
339-
def docs_deploy(ctx: Context, *, force: bool = False) -> None:
321+
def docs_deploy(ctx: Context) -> None:
340322
"""Deploy the documentation to GitHub pages.
341323
342324
```bash
343325
make docs-deploy
344326
```
345327
346328
Use [MkDocs](https://www.mkdocs.org/) to build and deploy the documentation to GitHub pages.
347-
348-
Parameters:
349-
force: Whether to force deployment, even from non-Insiders version.
350329
"""
351330
os.environ["DEPLOY"] = "true"
352331
with _material_insiders() as insiders:
353332
if not insiders:
354333
ctx.run(lambda: False, title="Not deploying docs without Material for MkDocs Insiders!")
355-
origin = ctx.run("git config --get remote.origin.url", silent=True, allow_overrides=False)
356-
if "pawamoy-insiders/griffe" in origin:
357-
ctx.run(
358-
"git remote add upstream git@github.com:mkdocstrings/griffe",
359-
silent=True,
360-
nofail=True,
361-
allow_overrides=False,
362-
)
363-
ctx.run(
364-
tools.mkdocs.gh_deploy(remote_name="upstream", force=True),
365-
title="Deploying documentation",
366-
)
367-
elif force:
368-
ctx.run(
369-
tools.mkdocs.gh_deploy(force=True),
370-
title="Deploying documentation",
371-
)
372-
else:
373-
ctx.run(
374-
lambda: False,
375-
title="Not deploying docs from public repository (do that from insiders instead!)",
376-
nofail=True,
377-
)
334+
ctx.run(tools.mkdocs.gh_deploy(), title="Deploying documentation")
378335

379336

380337
@duty
@@ -416,7 +373,6 @@ def build(ctx: Context) -> None:
416373

417374

418375
@duty
419-
@_not_from_insiders
420376
def publish(ctx: Context) -> None:
421377
"""Publish source and wheel distributions to PyPI.
422378
@@ -438,7 +394,6 @@ def publish(ctx: Context) -> None:
438394

439395

440396
@duty(post=["build", "publish", "docs-deploy"])
441-
@_not_from_insiders
442397
def release(ctx: Context, version: str = "") -> None:
443398
"""Release a new version of the project.
444399

mkdocs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ extra_css:
168168
- css/custom.css
169169
- css/material.css
170170
- css/mkdocstrings.css
171-
- css/insiders.css
172171

173172
extra_javascript:
174173
- js/feedback.js
@@ -247,8 +246,8 @@ plugins:
247246
show_inheritance_diagram: true
248247
show_root_heading: true
249248
show_root_full_path: false
250-
show_source: false
251249
show_signature_annotations: true
250+
show_source: true
252251
show_symbol_type_heading: true
253252
show_symbol_type_toc: true
254253
signature_crossrefs: true

tests/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def test_api_matches_inventory(inventory: Inventory, public_objects: list[griffe
152152
ignore_names = {"__getattr__", "__init__", "__repr__", "__str__", "__post_init__"}
153153
ignore_paths = {"griffe.DataclassesExtension.*"}
154154
not_in_inventory = [
155-
obj.path
155+
f"{obj.relative_filepath}:{obj.lineno}: {obj.path}"
156156
for obj in public_objects
157157
if (
158158
obj.name not in ignore_names

0 commit comments

Comments
 (0)