Write figures beside the article, not beside the author - #28
Merged
Conversation
`redistribute_figure.py` wrote its output to an absolute path under a home directory. That breaks on every other machine, and it publishes a username into a repository that is public and archived. It now writes to the article's own `figures/` directory, resolved from `__file__`. A test walks every shipped example and script for `/Users/<name>` and `/home/<name>` so the next one is caught before it is published. `/home/jovyan` is allowed: it is the Docker image's own path, quoted as such in prose. Underworld development team with AI support from Claude Code
Contributor
|
Preview Or the whole site. Built from |
lmoresi
added a commit
that referenced
this pull request
Aug 20, 2026
#28 landed the absolute-path guard on the same file this branch appends its reader-page tests to. Both are new tests and neither replaces the other, so the resolution keeps both. 136 pass. Underworld development team with AI support from Claude Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
articles/moving-the-mesh-without-remaking-it/examples/redistribute_figure.pywrote its figure to
That breaks on any other machine, and it puts a home directory — a username —
into a public, archived repository. It now resolves the article's own
figures/directory from
__file__.A test walks every
articles/*/examples/*.pyandscripts/*.pyfor/Users/<name>and/home/<name>, so the next one is caught before it ispublished rather than by a reader.
/home/jovyanis allowed — it is the Dockerimage's own path and is quoted as such in prose.
131 tests pass.
Underworld development team with AI support from Claude Code