Skip to content

Commit ab76672

Browse files
committed
fix: broken raw / badges in a few places
Assisted-by: CopilotCLI:claude-hauku-4.5 Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
1 parent 82d474d commit ab76672

5 files changed

Lines changed: 1 addition & 70 deletions

File tree

docs/_partials/pyproject.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ forward) and they are more composable. In contrast with extras,
138138
dependency-groups are not available when installing your package via PyPI, but
139139
they are available for local installation (and can be installed separately from
140140
your package); the `dev` group is even installed, by default, when using `uv`'s
141-
high level commands like `uv run` and `uv sync`. {% rr PP0086 %} Here is an
141+
high level commands like `uv run` and `uv sync`. {rr}`PP006` Here is an
142142
example:
143143

144144
<!-- [[[cog

docs/pages/guides/gha_basic.md

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ adjust the Python versions to suit your taste; you can also test on different
100100
OS's if you'd like by adding them to the matrix and inputting them into
101101
`runs-on`.
102102

103-
{% raw %}
104-
105103
```yaml
106104
tests:
107105
runs-on: ubuntu-latest
@@ -131,8 +129,6 @@ tests:
131129
run: uv run pytest
132130
```
133131

134-
{% endraw %}
135-
136132
A few things to note from above:
137133

138134
The matrix should contain the versions you are interested in. You can also test
@@ -229,15 +225,11 @@ actions have outputs, and bash actions can manually write to output:
229225
run: echo "something=true" >> $GITHUB_OUTPUT
230226
```
231227

232-
{% raw %}
233-
234228
You can now refer to this step in a later step with
235229
`${{ steps.someid.something }}`. You also can get it from another job by using
236230
`${{ needs.<jobname>.outputs.something }}`. The `toJson()` function is useful
237231
for inputting JSON - you can even generate matrices dynamically this way!
238232

239-
{% endraw %}
240-
241233
#### Pretty output
242234

243235
You can write GitHub flavored markdown to `$GITHUB_STEP_SUMMARY`, and it will be
@@ -342,16 +334,12 @@ These are some things you might need.
342334
{rr}`GH102` If you add the following, you can ensure only one run per
343335
PR/branch happens at a time, cancelling the old run when a new one starts:
344336

345-
{% raw %}
346-
347337
```yaml
348338
concurrency:
349339
group: ${{ github.workflow }}-${{ github.ref }}
350340
cancel-in-progress: true
351341
```
352342

353-
{% endraw %}
354-
355343
Anything with a matching group name will count in the same group - the ref is
356344
the "from" name for the PR. If you want, you can replace `github.ref` with
357345
`github.event.pull_request.number || github.sha`; this will still cancel on PR
@@ -368,8 +356,6 @@ pass).
368356

369357
As an example, if you had `lint` and `checks` jobs, use this:
370358

371-
{% raw %}
372-
373359
```yaml
374360
pass:
375361
if: always()
@@ -381,8 +367,6 @@ pass:
381367
jobs: ${{ toJSON(needs) }}
382368
```
383369

384-
{% endraw %}
385-
386370
We want the job to always run, so we set `if: always()`. Otherwise, it might be
387371
skipped if any job it depends on is skipped, and skipped jobs count as "passing"
388372
to GitHub's automerge (yikes!). The important part of the job is the `needs:`
@@ -441,8 +425,6 @@ ideally shouldn't change the user's environment; suddenly changing the active
441425
Python version might come as a surprise. You can do that, though, using
442426
`update-environment: false` with `setup-python` and `pipx`:
443427

444-
{% raw %}
445-
446428
```yaml
447429
- uses: actions/setup-python@v6
448430
id: python
@@ -457,8 +439,6 @@ Python version might come as a surprise. You can do that, though, using
457439
github.action_path }}' ${{ inputs.some-input }}
458440
```
459441

460-
{% endraw %}
461-
462442
You use the `python-path` output from `setup-python` to get the Python you
463443
activated. You use `github.action_path` to get the path to the checked-out
464444
action.
@@ -510,8 +490,6 @@ on:
510490
Otherwise, they look like normal workflows. Then you need another reusable
511491
workflow file to decide when to run a specific situation.
512492

513-
{% raw %}
514-
515493
```yaml
516494
# reusable-change-detection.yml
517495
on:
@@ -522,17 +500,13 @@ on:
522500
# More here if you have more situations to detect
523501
```
524502

525-
{% endraw %}
526-
527503
You start by specifying outputs when running this. You'll want one output per
528504
situation you want to detect. The value will be output from our
529505
`change-detection` job below, and defaults to "false" if we don't output
530506
anything.
531507

532508
Now, we need our job:
533509

534-
{% raw %}
535-
536510
```yaml
537511
jobs:
538512
change-detection:
@@ -566,8 +540,6 @@ jobs:
566540
# Add 2 more steps per situation you have to detect
567541
```
568542

569-
{% endraw %}
570-
571543
This has a bit of boilerplate (mostly around passing variables around), but what
572544
it's doing is fairly simple. Instead of stepping through it, let's look at what
573545
it's trying to do. First, you need to find a list of all changed files in the
@@ -595,8 +567,6 @@ If you have more situations, you just repeat these two steps with different
595567
Finally, you write the overarching CI workflow that combines the reusable
596568
workflows, something like `ci.yml`:
597569

598-
{% raw %}
599-
600570
```yaml
601571
on:
602572
workflow_dispatch:
@@ -642,8 +612,6 @@ If you have more situations, add another `${{ ... }}` above, after the first
642612
one, and add them to the needs list. This is really just injecting "tests" only
643613
if the "tests" job is being skipped into `allowed-skips`.
644614

645-
{% endraw %}
646-
647615
:::{tip}
648616
Some examples of repos using this method are:
649617

@@ -690,16 +658,12 @@ configure Pages.
690658
uses: actions/configure-pages@v6
691659
```
692660

693-
{% raw %}
694-
695661
Notice this action sets an `id:`; this will allow you to use the outputs from
696662
this action later; specifically, may want to use
697663
`${{ steps.pages.outputs.base_path }}` when building (you can also get `origin`,
698664
`base_url`, or `host` - see the action
699665
[config](https://github.com/actions/configure-pages/blob/main/action.yml)).
700666

701-
{% endraw %}
702-
703667
```yaml
704668
- name: Upload artifact
705669
uses: actions/upload-pages-artifact@v5
@@ -712,8 +676,6 @@ Finally, you'll need to deploy the artifact (named `github-pages`) to Pages. You
712676
can make this a custom job with `needs:` pointing at your previous job (in this
713677
example, the previous job is called `build`):
714678

715-
{% raw %}
716-
717679
```yaml
718680
deploy:
719681
environment:
@@ -727,8 +689,6 @@ deploy:
727689
uses: actions/deploy-pages@v5
728690
```
729691

730-
{% endraw %}
731-
732692
The deploy-pages job gives a `page_url`, which is the same as `base_url` on the
733693
configure step, and can be set in the `environment`. If you want to do
734694
everything in one job, you only need one of these.

docs/pages/guides/gha_pure.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ the name "CI/CD", you can just combine the two `on` dicts.
5858

5959
### Distribution: Pure Python wheels
6060

61-
{% raw %}
62-
6361
```yaml
6462
dist:
6563
runs-on: ubuntu-latest
@@ -80,8 +78,6 @@ dist:
8078
run: pipx run twine check dist/*
8179
```
8280

83-
{% endraw %}
84-
8581
We use [PyPA-Build](https://pypa-build.readthedocs.io/en/latest/), a new build
8682
tool designed to make building wheels and SDists easy. It run a [PEP 517][]
8783
backend and can get [PEP 518][] requirements even for making SDists.
@@ -129,7 +125,6 @@ recommended {rr}`GH105`:
129125
::::{tab-set}
130126
:::{tab-item} Trusted Publishing (recommended)
131127
:sync: trusted-publishing
132-
{% raw %}
133128

134129
```yaml
135130
publish:
@@ -155,8 +150,6 @@ publish:
155150
- uses: pypa/gh-action-pypi-publish@release/v1
156151
```
157152

158-
{% endraw %}
159-
160153
When you make a GitHub release in the web UI, we publish to PyPI. You'll just
161154
need to tell PyPI which org, repo, workflow, and set the `pypi` environment to
162155
allow pushes from GitHub. If it's the first time you've published a package, go
@@ -168,7 +161,6 @@ that the artifacts were built on your actions.
168161
:::
169162
:::{tab-item} Token
170163
:sync: token
171-
{% raw %}
172164

173165
```yaml
174166
publish:
@@ -186,8 +178,6 @@ publish:
186178
password: ${{ secrets.pypi_password }}
187179
```
188180

189-
{% endraw %}
190-
191181
If you cannot use Trusted Publishing, this publishes to PyPI with a token.
192182
You'll need to go to PyPI, generate a token for your user, and put it into
193183
`pypi_password` on your repo's secrets page. Once you have a project, you should
@@ -204,7 +194,6 @@ interface:
204194
::::{tab-set}
205195
:::{tab-item} Trusted Publishing (recommended)
206196
:sync: trusted-publishing
207-
{% raw %}
208197

209198
```yaml
210199
name: CD
@@ -253,11 +242,9 @@ jobs:
253242
- uses: pypa/gh-action-pypi-publish@release/v1
254243
```
255244

256-
{% endraw %}
257245
:::
258246
:::{tab-item} Token
259247
:sync: token
260-
{% raw %}
261248

262249
```yaml
263250
name: CD
@@ -298,8 +285,6 @@ jobs:
298285
password: ${{ secrets.pypi_password }}
299286
```
300287

301-
{% endraw %}
302-
303288
If you cannot use Trusted Publishing, this publishes to PyPI with a token.
304289
You'll need to go to PyPI, generate a token for your user, and put it into
305290
`pypi_password` on your repo's secrets page. Once you have a project, you should

docs/pages/guides/gha_wheels.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ with `pipx run build==<version>`.
9393

9494
The core of the work is down here:
9595

96-
{% raw %}
97-
9896
```yaml
9997
build_wheels:
10098
name: Wheel on ${{ matrix.os }}
@@ -127,8 +125,6 @@ build_wheels:
127125
path: wheelhouse/*.whl
128126
```
129127

130-
{% endraw %}
131-
132128
There are several things to note here. First, one of the reasons this works is
133129
because you followed the suggestions in the previous sections, and your package
134130
builds nicely into a wheel without strange customizations (if you _really_ need
@@ -164,7 +160,6 @@ Trusted Publishing is more secure and recommended {rr}`GH105`:
164160
::::{tab-set}
165161
:::{tab-item} Trusted Publishing (recommended)
166162
:sync: trusted-publishing
167-
{% raw %}
168163

169164
```yaml
170165
upload_all:
@@ -192,8 +187,6 @@ upload_all:
192187
- uses: pypa/gh-action-pypi-publish@release/v1
193188
```
194189

195-
{% endraw %}
196-
197190
When you make a GitHub release in the web UI, we publish to PyPI. You'll just
198191
need to tell PyPI which org, repo, workflow, and set the `pypi` environment to
199192
allow pushes from GitHub. If it's the first time you've published a package, go
@@ -205,7 +198,6 @@ that the artifacts were built on your actions.
205198
:::
206199
:::{tab-item} Token
207200
:sync: token
208-
{% raw %}
209201

210202
```yaml
211203
upload_all:
@@ -224,8 +216,6 @@ upload_all:
224216
password: ${{ secrets.pypi_password }}
225217
```
226218

227-
{% endraw %}
228-
229219
If you cannot use Trusted Publishing, this publishes to PyPI with a token.
230220
You'll need to go to PyPI, generate a token for your user, and put it into
231221
`pypi_password` on your repo's secrets page. Once you have a project, you should

docs/pages/guides/packaging_classic.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,6 @@ computed correctly from a checkout that is too shallow. For GitHub Actions, use
184184
For GitHub actions, you can add a few lines that will enable you to manually
185185
trigger builds with custom versions:
186186

187-
{% raw %}
188-
189187
```yaml
190188
on:
191189
workflow_dispatch:
@@ -196,8 +194,6 @@ env:
196194
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.overrideVersion }}
197195
```
198196

199-
{% endraw %}
200-
201197
If you fill in the override version setting when triggering a manual workflow
202198
run, that version will be forced, otherwise, it works as normal.
203199

0 commit comments

Comments
 (0)