Repository navigation
Template 0.1.26: the app's own documentation explains PyPI publishing; page links stay at the bottom - #47
Merged
Conversation
…; page links stay at the bottom The 0.1.25 migration added publish_pypi.yml and pypi_package.py to every app but left the app's documentation as it was. The 0.1.26 migration adds the template's section "4. Publish the code on PyPI (optional)" to the app's external_code_upload.md and the entry "Publishing to PyPI fails" to its troubleshooting.md, byte for byte, at the end of the page's content and before its Previous / Home / Next links, which stay the last thing on the page. A page with a section 4 of its own is skipped; nothing is created or deleted; line endings are kept; a second run changes nothing. Template docs: the Name row no longer shows PYTHON_PROJ_NAME (the form does not fill in an app's documentation), the 0.1.25 design note is linked by its address (apps do not have it), and troubleshooting.md has its links at the bottom again (the 0.1.23-0.1.25 entries had been added after them). A test checks that every documentation page ends with its links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Template 0.1.26, based on
mainafter #46 (0.1.25). The 0.1.25 migration added PyPI publishing to every app (publish_pypi.yml,pypi_package.py) but left the app's own documentation as it was. The Playground's sync pull request (CellMigrationLab/LabConstrictor-Playground#39) shows it: itsexternal_code_upload.mdends at section 3, and itstroubleshooting.mdhas no PyPI entry. This migration adds both. It changes documentation only.What the migration does
Surgical and idempotent. It never deletes, never raises for a customised file, and keeps line endings. The added texts are the template's, byte for byte (
.template_sync/resources/v0_1_25_to_v0_1_26/.tools/docs/)..tools/docs/external_code_upload.mdgets the section 4. Publish the code on PyPI (optional). A page that already has it is unchanged. A page with a section 4 of its own is left as it is (SKIPPED)..tools/docs/troubleshooting.mdgets the entry Publishing to PyPI fails, unless it already has it.Template documentation changes
troubleshooting.mdhas its Previous / Home / Next links at the bottom again. The 0.1.23, 0.1.24 and 0.1.25 entries had been added after them, so they sat in the middle of the page. No app page had this: those entries were never migrated to apps. A new test checks that every documentation page of the template ends with its links.PYTHON_PROJ_NAME, because the form does not fill in an app's documentation. It now says the name is thename=ofsetup.py.migration_0_1_25.mdrelatively, and apps don't have that page. They now link it by its address on GitHub.Checks
Tests:
tests/test_template_sync_0_1_26.py(17 tests). They check that:They also cover a troubleshooting page with links, with text after its links and without links, a page with its own section 4, pages that already explain it, missing and unreadable pages, a second run, and the
sync.pychain from 0.1.25.Results: in Ubuntu (WSL, Python 3.12), 349 passed.
ruff check .template_sync .tools/python tests(0.15.20) andmypy(1.20.2, 71 files) are clean.Real apps: copies of CellPatcher, CellTracksColab, GuessTheCondition, LabChronicle, VLab4Mic, LabConstrictor_Demo, NucleiSky, Stardist2D and the Playground went through their whole chain (from 0.1.19 to 0.1.22 → 0.1.26), with exit 0. A second run changed nothing. The Playground's current
main(0.1.25, after Sync template to version 0.1.25 LabConstrictor-Playground#39) was also run from 0.1.25.Not verified
🤖 Generated with Claude Code