Skip to content

ci(release): keep code.md and zipped code.json in sync with fetched versions - #81

Merged
wpbonelli merged 3 commits into
MODFLOW-ORG:masterfrom
wpbonelli:fix-code-md
Nov 10, 2026
Merged

wpbonelli merged 3 commits into
MODFLOW-ORG:masterfrom
wpbonelli:fix-code-md

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Pymake's make-code-json writes code.json and code.md from pymake's catalog, which can lag behind the versions fetched via releases.json. This repo's script patch_code_json.py corrected code.json but not code.md, which feeds the release notes and README table. It also appended to a zip that already held pymake's stale code.json, leaving a duplicate entry.

Fixes:

  • make patch_code_json.py regenerate code.md from the patched code.json
  • run make-code-json without --zip, make patch_code_json.py add code.json to the zip, and fail if one is already there

wpbonelli and others added 2 commits November 10, 2026 03:52
make-code-json writes both code.json and code.md from pymake's internal
program catalog. patch_code_json.py corrected code.json to the versions
actually fetched via releases.json, but code.md was left stale, and it is
what feeds the release body and the README table. Regenerate code.md from
the patched code.json in the same format pymake uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
patch_code_json.py appended the patched code.json to a zip that already
contained make-code-json's copy, producing a duplicate entry whose
resolution depends on the extracting tool, and left the stale copy in the
app directory untouched. Rebuild the archive without the old entry, and
overwrite the appdir copy via a new --appdir option.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@wpbonelli wpbonelli added the bug Something isn't working label Nov 10, 2026
…the zip

Rather than letting make-code-json zip a stale code.json and then rebuilding
the archive to replace it, run make-code-json without --zip and have
patch_code_json.py add the corrected code.json once (every run, including
when nothing changed). It fails if the zip already holds a code.json instead
of writing a duplicate entry. Drop --appdir: the program directory is not
distributed, so its stale copy does not matter.

Document the metadata steps in DEVELOPER.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@wpbonelli wpbonelli changed the title ci(release): keep code.md and zipped code.json in sync with patched versions ci(release): keep code.md and zipped code.json in sync with fetched versions Nov 10, 2026
@wpbonelli
wpbonelli merged commit e3aac2d into MODFLOW-ORG:master Nov 10, 2026
3 checks passed
@wpbonelli
wpbonelli deleted the fix-code-md branch November 10, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant