Closed navidcy closed 6 months ago
FYI @aidanheerdegen's model release team at NRI are setting up CI test-based automated tagging, with the major version updated only if test results change, otherwise minor version is updated
Thanks for the shoutout @aekiss but I think what @navidcy is asking about is the machinery to get this working seamlessly.
If you want an example @dougiesquire recently update the payu
publishing machinery using pyproject.toml
and versioneer
.
https://github.com/payu-org/payu/pull/403
It also publishes to conda
and pypi
.
Yeap, I was thinking more something like in the spirit of what @aidanheerdegen points out! Thanks!
OK, I see now that the packages was merged in conda-forge.
But at https://anaconda.org/conda-forge/regional-mom6 I see that it show up version 0.2.1 while currently we have 0.4.0.
Can we automate the way we release a new version so that we don't have to modify the version numbers in 43 places? Could someone help us do that?
cc @dougiesquire
Would a GitHub action, e.g., like https://github.com/xgcm/xgcm/blob/master/.github/workflows/pythonpublish.yaml streamline the procedure?
@navidcy there is a bot (regro-cf-autotick-bot) that should automatically create PRs for version updates when the PyPI distribution is updated - see here for details. Version 0.2.1 is the latest version on PyPI, which is why conda-forge is the same.
So the process for updating should usually involve only two steps:
If it's helpful, I can set up a github workflow to automatically upload new releases to PyPI?
Yes please, @dougiesquire that would be great help!
Hm... I went through the resources you pointed out @dougiesquire and couldn't find an example of a GitHub action.
But after some PRs are merged, I'm gonna tag a new release v0.5.0. How do I update the pypi (and by consequence the conda-forge) when the new release is tagged? I'm just asking how to do it manually, and we'll let the automation and GitHub action for later. (I'd like @dsroberts to install the v0.5.0 in the conda-analysis 24.01 environment on NCI, that's why I'm asking.)
The pypi package is under my account, so I can do that manually once the tag is up, and then we can bump the conda version (which should be easier now that we have maintenance over it, I think?)
and then we can bump the conda version (which should be easier now that we have maintenance over it, I think?)
Yup, a PR should be opened automatically in the feedstock repo
Great! I'll ping you @angus-g when I tag the new release. Thanks both!
@angus-g can you add me as maintener on pypi? I just made an account; username navidcy
@dougiesquire pypi v0.5.0 but I don't see any automatic PR generated. Am I looking at the right spot?
oh... is it here that the PR will appear? https://github.com/conda-forge/regional-mom6-feedstock/pulls
will the PR be opened automatically even if regro-cf-autotick-bot
is not set up?
oh... is it here that the PR will appear? https://github.com/conda-forge/regional-mom6-feedstock/pulls
Yes. I don't have a sense for how long the bot takes to get around to the updates, could just take a moment...
OK, I'll give it a day or so :)
If it's helpful, I can set up a github workflow to automatically upload new releases to PyPI?
@dougiesquire I'll leave this on you, right? It will be very helpful! now both me and @angus-g are maintainers in the pypi entry of this package (I don't know if that's a useful piece of info for the GitHub action)
I'm wondering what's the proper way to automate the procedure of tagging a new release? I know how to do this for a Julia package but not with a python package.
I'm asking whether there is a way that with a simple action we get, e.g., the following:
pyproject.toml
or other.toml
and related files are updatedAt the moment, tagged versions of the package don't have their own doc version -- only the docs of the "latest" is available; see screenshot below
cc @angus-g