Skip to content

chore: add DEVELOPER.md, fold in pub guide, simplify version script - #123

Open
wpbonelli wants to merge 3 commits into
MODFLOW-ORG:developfrom
wpbonelli:docs/developer-guide
Open

chore: add DEVELOPER.md, fold in pub guide, simplify version script#123
wpbonelli wants to merge 3 commits into
MODFLOW-ORG:developfrom
wpbonelli:docs/developer-guide

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Sep 8, 2026

Copy link
Copy Markdown
Member

Two things

One, add a DEVELOPER.md file with instructions on setting up an environment, linting, testing, and releasing (folded in from guide-to-publish.md etc).

Two, simplify update_version.py to

  • drop --bump and git inspection
  • add --release to strip .devN segment
  • add --post-release to bump minor +1 and append .dev0
  • always print the resolved version to stdout, drop --get
  • add --dry-run to control whether anything is written

The --bump option didn't buy much, just saved typing a version number. IMO it's simpler to specify a version explicitly or just treat version.txt as the source of truth when version isn't explicitly specified. and also git tags aren't always available e.g. in a shallow clone.

Overall I think this is a smaller user interface that's easier to reason about

Command Resolves/Prints Writes?
update_version.py 1.2.0.dev0 (unchanged) yes — re-stamps the date
update_version.py --dry-run 1.2.0.dev0 no
update_version.py -v 1.5.0 1.5.0 yes
update_version.py -v 1.5.0 --dry-run 1.5.0 no
update_version.py --release 1.2.0 (strip .dev) yes
update_version.py --release --dry-run 1.2.0 no
update_version.py --post-release 1.3.0.dev0 (minor +1, .dev0) yes
update_version.py --post-release --dry-run 1.3.0.dev0 no

The main use cases being

  • --release --dry-run → release workflow's "Resolve version" step: get the version to be released
  • -v X → release workflow's "Update version" step, and any ad-hoc use
  • --post-release → post-release reset workflow
  • --dry-run alone → "what version is this"

This pattern could be followed for update_version.py everywhere

wpbonelli and others added 3 commits September 7, 2026 08:23
Move the release procedure from guide-to-publish.md into a new DEVELOPER.md
that also covers development setup, linting and testing, matching the layout
of modflow-devtools. Includes the conda-forge step and the trusted-publisher
rename caveat. Link it from the README.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UVbcrMW2Ax1LwR9bskJdeu
Drop the tag-relative --bump {major,minor,patch,dev}. It shelled out to
git tag and kept a second source of truth alongside version.txt that could
disagree with it, and the 'dev' choice was a --bump value that ignored tags
entirely. The development version on develop already names the next release,
so --release derives it by stripping the development suffix (1.2.0.dev0 ->
1.2.0).

Rename --get to --dry-run, move the "Updated ..." lines to stderr, and print
the resolved version on stdout whether or not it was written. The develop
reset previously ran the script twice -- once to compute the next version,
once to write it -- in an order that silently double-bumped if reversed;
`next=$(update_version.py --post-release)` now does both.

Rename --next-dev to --post-release: it pairs with --release, and "next dev"
read like incrementing the .devN counter.

The dispatch form loses the bump input; the common case needs no input at
all, and the version input still overrides.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UVbcrMW2Ax1LwR9bskJdeu
@wpbonelli wpbonelli added the documentation Improvements or additions to documentation label Sep 8, 2026
@wpbonelli
wpbonelli marked this pull request as ready for review September 8, 2026 12:00
wpbonelli added a commit to MODFLOW-ORG/modflow-devtools that referenced this pull request Sep 8, 2026
…ion script (#354)

* add release instructions to DEVELOPER.md
* automate the post-release reset step in the release workflow
* add --release and --post-release options to update_version.py

cf MODFLOW-ORG/modflowapi#123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant