Skip to content

Template 0.1.26: the app's own documentation explains PyPI publishing; page links stay at the bottom - #47

Merged
IvanHCenalmor merged 1 commit into
mainfrom
claude/template-0.1.26-pypi-docs
Nov 12, 2026
Merged

IvanHCenalmor merged 1 commit into
mainfrom
claude/template-0.1.26-pypi-docs

Conversation

@IvanHCenalmor

Copy link
Copy Markdown
Collaborator

Template 0.1.26, based on main after #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: its external_code_upload.md ends at section 3, and its troubleshooting.md has 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.md gets 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.md gets the entry Publishing to PyPI fails, unless it already has it.
  • Placement: both go at the end of the page's content, just before the Previous / Home / Next links, which stay the last thing on the page. If text followed the links, the migration moves the links to the bottom. A page without links gets the text at its end.
  • A missing page is not created. The docs index is not changed: its entry for the page differs from app to app, and it still leads there.

Template documentation changes

  • troubleshooting.md has 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.
  • The Name row of the PyPI section no longer shows PYTHON_PROJ_NAME, because the form does not fill in an app's documentation. It now says the name is the name= of setup.py.
  • Both PyPI texts linked migration_0_1_25.md relatively, 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:

    • the frozen texts turn the template's 0.1.24 pages into the live pages exactly, including the troubleshooting page whose links were in the middle;
    • every documentation page of the template ends with its links;
    • the texts have no placeholder, no CR and no relative link to a page apps lack;
    • an app's page (another title, other links, CRLF) gets the section before its links and keeps CRLF.

    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.py chain from 0.1.25.

  • Results: in Ubuntu (WSL, Python 3.12), 349 passed. ruff check .template_sync .tools/python tests (0.15.20) and mypy (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.

    • Every app got both texts.
    • In every app the links are the last thing on both pages. Only Stardist2D's troubleshooting page has links; the others have none, so the entry is at their end.

Not verified

  • How the new section looks on GitHub in an app was checked only as Markdown text, not rendered.
  • The apps get this at their next synchronisation after this is merged.

🤖 Generated with Claude Code

…; 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>
@IvanHCenalmor
IvanHCenalmor merged commit 91092f0 into main Nov 12, 2026
4 checks passed
@IvanHCenalmor
IvanHCenalmor deleted the claude/template-0.1.26-pypi-docs branch November 12, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant