Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(release): reinit release notes, update dist scripts #1283

Merged
merged 11 commits into from
Jul 14, 2023

Conversation

wpbonelli
Copy link
Contributor

@wpbonelli wpbonelli commented Jun 29, 2023

  • reinitialize release notes
  • substitute version into folder tree shown in release notes (previously was 6.x.x)
  • add OS tag to distribution name substituted into release notes and mf6io
  • refactor update_version.py with packaging.version.Version and convert version.txt to plain text
    • consistent with flopy and what Python projects will need to adopt
    • replace "+" suffix indicating dev status with ".dev0" to comply with PEP 440 and allow using Python's built-in versioning utils
  • use .mf6minsim for sample mf6 output in build_docs.py instead of ex-gwf-twri01 from ex-gwf-twri.py
  • add --repo-owner option to build_docs.py to allow testing on a fork
  • add meson.options to full distribution
  • fix check_dist.py example script tests: previously expected run scripts to be in top-level example model dir, but some examples have nested subdirs

@mwtoews
Copy link
Contributor

mwtoews commented Jun 29, 2023

To me, the development version should be 6.4.3.dev0. This would fix the "major" and "minor" positions, and conform to version comparisons ("greater than"). For instance, compare:

from packaging.version import Version

# This is the latest release to compare to
v642 = Version("6.4.2")

v = Version("6.dev4")
print(f"{v.major=} {v.minor=} {v.micro=} {v.dev=} {v > v642}")
# v.major=6 v.minor=0 v.micro=0 v.dev=4 False

v = Version("6.4.3.dev0")
print(f"{v.major=} {v.minor=} {v.micro=} {v.dev=} {v > v642}")
# v.major=6 v.minor=4 v.micro=3 v.dev=0 True

and if you want to get fancy, things like setuptools-scm use git describe for the dev local info based on the git hash. For example 1ce12a2 would be version 6.4.3.dev3+g1ce12a2de0:

from subprocess import check_output

check_output('git describe --dirty --tags --long --match "*[0-9]*"', text=True).strip()
# 6.4.2-3-g1ce12a2de0

v = Version("6.4.3.dev3+g1ce12a2de0")
print(f"{v.major=} {v.minor=} {v.micro=} {v.dev=} {v.local=} {v > v642}")
# v.major=6 v.minor=4 v.micro=3 v.dev=3 v.local='g1ce12a2de0' True

@wpbonelli
Copy link
Contributor Author

Thank you @mwtoews the hope was less frequent need to change develop branch version numbers but I see it was wrong / out of order. Updated to your suggestion

@wpbonelli
Copy link
Contributor Author

Would you suggest any way to achieve something like v6.4.2+? Motivation being not to specify the version under development, as it's not known what the next release number will be, but still indicate development has continued?

@mwtoews
Copy link
Contributor

mwtoews commented Jun 30, 2023

From what I've seen, usually the "next release" is just to increment the micro number, so long as it has something like "dev" in it. The actual version number, when published, can jump up to a major version. Often these decisions are made close to the release, depending on things like big new features or breaking changes.

@wpbonelli wpbonelli marked this pull request as ready for review June 30, 2023 12:32
@wpbonelli wpbonelli marked this pull request as draft June 30, 2023 13:47
* reinit release notes for next development cycle
* add --repo-owner option to build_docs.py
* use .mf6minsim model for sample mf6 output in docs
* refactor update_version.py to use packaging.version
* convert version.txt to plain text
* convert dev version to v6.4.3.dev0
* sub version into release notes folder structure
@wpbonelli wpbonelli force-pushed the release-notes branch 2 times, most recently from eba830a to b16d58d Compare June 30, 2023 19:30
@wpbonelli wpbonelli force-pushed the release-notes branch 3 times, most recently from f18bfee to e4e87ce Compare June 30, 2023 22:47
@wpbonelli
Copy link
Contributor Author

@mwtoews after discussion it was decided to bump minor instead of micro, otherwise I believe the plan is to adopt your proposed scheme here, flopy and other related repos. Thanks for the guidance here

@wpbonelli wpbonelli merged commit 697b889 into MODFLOW-USGS:develop Jul 14, 2023
19 checks passed
@wpbonelli wpbonelli deleted the release-notes branch July 14, 2023 20:04
jdhughes-usgs pushed a commit to jdhughes-usgs/modflow6 that referenced this pull request Jul 16, 2023
…1283)

* reinit release notes for next development cycle
* add --repo-owner option to build_docs.py
* use .mf6minsim model for sample mf6 output in docs
* refactor update_version.py to use packaging.version
* convert version.txt to plain text
* convert development version to v6.4.3.dev0
* include ostag in versions subbed into docs
* check dist subdirs in check_dist.py
* include meson.options in full dist
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.

2 participants