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.
Release automation
Adds a workflow
release.yml
to make FloPy releases. There are some manual steps that must be completed before initiating the automatic release, as before (steps 1-5 indocs/make_release.md
).Approach
The approach is similar to that introduced in modflow6 PR 1069: the
release.yml
workflow is triggered by pushing a release branch named e.g.v3.3.6rc
orv3.3.6
. If the branch name ends withrc
, it's a dry run and the workflow ends after updating version files, recreating plugin classes, updating the changelog, and running tests and notebooks. If the branch name doesn't end withrc
the release is considered approved and production-ready, and after the preceding steps a draft PR is created from the candidate branch intomaster
. Merging this PR triggers a job to draft a release. The release post's content is the changelog since the last release. Publishing the release triggers a final job to publish the Python package to PyPI. Opening a PR to updateconda-forge/flopy-feedstock
was considered but does not seem necessary as there seems to be a bot which auto-detects package updates and creates PRs for us.Refactoring
A
version.txt
file is added in the project root. Functionality fromscripts/make-release.py
andscripts/update-version_changes.py
is consolidated inscripts/update_version.py
, which acquires a file lock and updates version numbers and timestamps, first inversion.txt
then in other files includingflopy/version.py
,README.md
, etc. Sample usage:Changelogs are generated with
git-cliff
viaorhun/git-cliff-action
in the release workflow, and changes for each new release are automatically prepended todocs/version_changes.md
, so code inscripts/update-version_changes.py
is removed. Acliff.toml
config file is added in the project root. The format ofdocs/version_changes.md
is standardized. The updated procedure is described indocs/make_release.md
.get-modflow
--subset
matching behavior to include*dbl
variantsget-modflow
script test cases by valid/invalid options for finer-grained debuggingcode.json
formodflow6
andmodflow6-nightly-build
repos since they use a different format thanexecutables
The first two items are a result of my jumping the gun in #1641 and "fixing" a test that was only failing due to temporary state of the
executables
repo releases.Miscellanous
etc/environment.yml
autotest
files and notebook utilitiespytest-dotenv
as a testing dependency (allows defining environment variables e.g.GITHUB_TOKEN
in a.env
file)