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

Proper/better way to tag new releases? #110

Closed
navidcy opened this issue Feb 22, 2024 · 18 comments · Fixed by #151
Closed

Proper/better way to tag new releases? #110

navidcy opened this issue Feb 22, 2024 · 18 comments · Fixed by #151
Labels
documentation 📔 Improvements or additions to documentation package 📦

Comments

@navidcy
Copy link
Contributor

navidcy commented Feb 22, 2024

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:

  • a new tag
  • a new GitHub release
  • the pyproject.toml or other .toml and related files are updated
  • conda knows about the latest version of the package
  • and the docs populate a new version

At 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

Screenshot 2024-02-22 at 13 32 56

cc @angus-g

@navidcy navidcy added package 📦 documentation 📔 Improvements or additions to documentation labels Feb 22, 2024
@navidcy navidcy changed the title Proper way to tag new releases? Proper/better way to tag new releases? Feb 22, 2024
@aekiss
Copy link
Contributor

aekiss commented Feb 22, 2024

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

@aidanheerdegen
Copy link

aidanheerdegen commented Feb 26, 2024

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.

payu-org/payu#403

It also publishes to conda and pypi.

@navidcy
Copy link
Contributor Author

navidcy commented Feb 26, 2024

Yeap, I was thinking more something like in the spirit of what @aidanheerdegen points out! Thanks!

@navidcy
Copy link
Contributor Author

navidcy commented Apr 15, 2024

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

@navidcy
Copy link
Contributor Author

navidcy commented Apr 15, 2024

Would a GitHub action, e.g., like https://github.com/xgcm/xgcm/blob/master/.github/workflows/pythonpublish.yaml streamline the procedure?

@dougiesquire
Copy link
Collaborator

@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?

@navidcy
Copy link
Contributor Author

navidcy commented Apr 16, 2024

Yes please, @dougiesquire that would be great help!

@navidcy
Copy link
Contributor Author

navidcy commented Apr 16, 2024

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.)

@angus-g
Copy link
Collaborator

angus-g commented Apr 16, 2024

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?)

@dougiesquire
Copy link
Collaborator

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

@navidcy
Copy link
Contributor Author

navidcy commented Apr 16, 2024

Great! I'll ping you @angus-g when I tag the new release. Thanks both!

@navidcy
Copy link
Contributor Author

navidcy commented Apr 16, 2024

@angus-g can you push v0.5.0 to pypi?

@navidcy
Copy link
Contributor Author

navidcy commented Apr 16, 2024

@angus-g can you add me as maintener on pypi? I just made an account; username navidcy

@navidcy
Copy link
Contributor Author

navidcy commented Apr 16, 2024

@dougiesquire pypi v0.5.0 but I don't see any automatic PR generated. Am I looking at the right spot?

@navidcy
Copy link
Contributor Author

navidcy commented Apr 16, 2024

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?

@angus-g
Copy link
Collaborator

angus-g commented Apr 16, 2024

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...

@navidcy
Copy link
Contributor Author

navidcy commented Apr 16, 2024

OK, I'll give it a day or so :)

@navidcy
Copy link
Contributor Author

navidcy commented Apr 17, 2024

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)

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 package 📦
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants