Skip to content

Commit f94e6ed

Browse files
committed
docs: a few more bits of polish
Signed-off-by: Henry Schreiner <henryfs@princeton.edu> Assisted-by: CopilotCLI:GPT-5.4-mini
1 parent 6f40a13 commit f94e6ed

7 files changed

Lines changed: 26 additions & 21 deletions

File tree

docs/assets/js/repo-review-widget.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export async function render({ model, el }) {
1919
// Determine the correct path to the app
2020
// The widget will be in /build/ and the app is in /assets/js/
2121
const baseUrl = new URL(import.meta.url);
22-
const appUrl = new URL("../../assets/js/repo-review-app.min.js", baseUrl).href;
22+
const appUrl = new URL("../../assets/js/repo-review-app.min.js", baseUrl)
23+
.href;
2324

2425
// Load the app via dynamic import
2526
try {
@@ -38,7 +39,7 @@ export async function render({ model, el }) {
3839
});
3940
} else {
4041
console.warn(
41-
"repo-review-app.min.js does not export mountApp, attempting alternative load"
42+
"repo-review-app.min.js does not export mountApp, attempting alternative load",
4243
);
4344
// Try loading as a script tag instead
4445
loadAppAsScript(appUrl);

docs/myst.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ site:
5757
logo: assets/images/logo.svg
5858
logo_text: Scientific Python Development Guide
5959
style: assets/css/site.css
60+
hide_footer_links: false

docs/pages/guides/gha_pure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ delete your user-scoped token and generate a new project-scoped token.
185185
:::
186186
::::
187187

188-
:::{dropdown} Complete recipe
188+
:::::{dropdown} Complete recipe
189189
This can be used on almost any package with a standard
190190
`.github/workflows/cd.yml` recipe. This works because `pyproject.toml` describes
191191
exactly how to build your package, hence all packages build exactly via the same
@@ -291,7 +291,7 @@ You'll need to go to PyPI, generate a token for your user, and put it into
291291
delete your user-scoped token and generate a new project-scoped token.
292292
:::
293293
::::
294-
:::
294+
:::::
295295

296296
[pep 517]: https://www.python.org/dev/peps/pep-0517/
297297
[pep 518]: https://www.python.org/dev/peps/pep-0518/

docs/pages/guides/style.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ There are a _few_ options, mostly to enable/disable certain files, remove string
140140
normalization, and to change the line length, and those go in your
141141
`pyproject.toml` file.
142142

143-
::::{tab-set}
144-
:::{tab-item} Ruff-format
143+
:::::{tab-set}
144+
::::{tab-item} Ruff-format
145145
Ruff, the powerful Rust-based linter, has a formatter that is designed with the
146146
help of some of the Black authors to look 99.9% like Black, but run 30x faster.
147147
Here is the snippet to add the formatter to your `.pre-commit-config.yml`
@@ -171,8 +171,8 @@ recommended as well.
171171
```
172172

173173
:::
174-
:::
175-
:::{tab-item} Black
174+
::::
175+
::::{tab-item} Black
176176
Here is the snippet to add Black to your `.pre-commit-config.yml`:
177177

178178
```yaml
@@ -194,9 +194,9 @@ Here is the snippet to add Black to your `.pre-commit-config.yml`:
194194
:target: https://github.com/psf/black
195195
```
196196

197-
:::
198197
:::
199198
::::
199+
:::::
200200

201201
In _very_ specific situations, like when making a 2D array, you may want to
202202
retain special formatting. After carefully deciding that it is a special use
@@ -435,7 +435,7 @@ release.
435435

436436
:::
437437

438-
:::{dropdown} Separate tools that Ruff replaces
438+
::::{dropdown} Separate tools that Ruff replaces
439439

440440
#### PyCln
441441

@@ -600,7 +600,7 @@ args: ["-a", "from __future__ import annotations"]
600600
Also make sure isort comes before pyupgrade. Now when you run pre-commit, it
601601
will clean up your annotations to 3.7+ style, too!
602602
:::
603-
:::
603+
::::
604604

605605
### Type checking
606606

@@ -681,7 +681,7 @@ errors in your typing.
681681

682682
If you use setuptools, these checks are useful:
683683

684-
:::{dropdown} Setuptools-only checks
684+
::::{dropdown} Setuptools-only checks
685685

686686
#### Check-Manifest (setuptools only)
687687

@@ -742,7 +742,7 @@ important parts (like Python classifiers) are in sync. This tool,
742742
```
743743

744744
Make sure you list the highest version of Python you are testing with here.
745-
:::
745+
::::
746746

747747
### Spelling
748748

docs/pages/principles/testing.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ the Features that your project provides. Then we will cover
1616
[Project Level Integration tests](#project-level-integration-tests), which test
1717
that the various parts of your package work together, and work with the other
1818
packages it depends on. Finally we will cover the venrable
19-
[Unit Test](#unit-tests), which test the correctness of your code from a
19+
{ref}`Unit Test <unit-tests>`, which test the correctness of your code from a
2020
perspective internal to your codebase, tests individual units in isolation, and
2121
are optimized to run quickly and often.
2222

@@ -101,11 +101,11 @@ Tests should be divided up into different Suites, which can be run independently
101101
of one another.
102102

103103
Tests which "Fail Fast" save both developer and compute time. Some tests are by
104-
necessity very slow. [Unit Tests](#unit-tests) should run extremely quickly in
105-
just a few seconds at most, while [end-to-end](#end-to-end-tests) require time
106-
to set up and may depend on slow and unreliable external services. By organizing
107-
tests into suites based on execution time, you can run fast suites first and
108-
stop if an error is encountered before running slower suites.
104+
necessity very slow. {ref}`Unit Tests <unit-tests>` should run extremely quickly
105+
in just a few seconds at most, while [end-to-end](#end-to-end-tests) require
106+
time to set up and may depend on slow and unreliable external services. By
107+
organizing tests into suites based on execution time, you can run fast suites
108+
first and stop if an error is encountered before running slower suites.
109109

110110
#### Advantages of Test Suites
111111

helpers/cog_helpers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ def __contains__(self, dotted_name: str, /) -> bool:
8484

8585
@contextlib.contextmanager
8686
def code_fence(lang: str, /, *, width: int = 3) -> Generator[None, None, None]:
87+
# Fixed in https://github.com/jupyter-book/myst-theme/pull/883
88+
if lang == "toml":
89+
lang = "ini"
8790
tics = "`" * width
8891
print("<!-- rumdl-disable MD013 -->") # noqa: T201
8992
print(f"{tics}{lang}") # noqa: T201

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"build": "cd docs && myst build --html && cd .. && bash helpers/copy-assets.sh",
7-
"serve": "cd docs && myst start",
6+
"build": "cd docs && NODE_OPTIONS='--localstorage-file=_build/.node-localstorage --no-deprecation' myst build --html && cd .. && bash helpers/copy-assets.sh",
7+
"serve": "cd docs && NODE_OPTIONS='--localstorage-file=_build/.node-localstorage --no-deprecation' myst start",
88
"clean": "rm -rf docs/_build"
99
},
1010
"dependencies": {

0 commit comments

Comments
 (0)