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

Upload nightly wheels to scientific-python-nightly-wheels #7865

Merged
merged 5 commits into from
May 23, 2023

Conversation

martinfleis
Copy link
Contributor

Closes #7863

Xarray is considered one of the core projects of the Scientific Python. As such, it would be ideal if it followed upcoming SPEC5 by building the nightly wheels. We're aware that xarray is easy to build from source but other core packages like scipy or numpy are not and we would like to ensure that all of those nightly builds can be installed in the same way to make the test against dev versions easier for downstream packages.

This PR adds a GHA job that builds the wheel and uses scientific-python/upload-nightly-action to upload them to a new location where eventually all the other projects will upload wheels as well.

You will need an upload token stored as a repository secret ANACONDA_NIGHTLY. I will need someone with the proper rights to reply here and I can either give you access to the scientific-python-nightly-wheels anaconda.org group where you can generate the token for yourself (see the readme at https://github.com/scientific-python/upload-nightly-action) or I can generate one for you but it would be better if you had a control of the token yourself as it will expire at some point.

@welcome
Copy link

welcome bot commented May 22, 2023

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@github-actions github-actions bot added the Automation Github bots, testing workflows, release automation label May 22, 2023
keewis
keewis previously requested changes May 23, 2023
Copy link
Collaborator

@keewis keewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a few changes necessary, but otherwise looks good to me.

I will need someone with the proper rights to reply here

I'll help setting that up, but I wonder if it is possible to sign up multiple people? Like with PyPI project owners, I imagine having multiple people with those permissions would make the setup a bit more resilient.

Edit: important for us: retire the TestPyPI workflow once this has been verified to work properly. That will reduce the frequency of nightly releases from one for every commit to once per day, but I don't think that makes too much of a difference (and we fill up our TestPyPI disk space too much – for reference, we're currently at 1.7GB out of 10GB total within about a year of the workflow's existence).

.github/workflows/nightly-wheels.yml Show resolved Hide resolved
.github/workflows/nightly-wheels.yml Show resolved Hide resolved
doc/whats-new.rst Show resolved Hide resolved
@martinfleis
Copy link
Contributor Author

I'll help setting that up, but I wonder if it is possible to sign up multiple people?

We can add as many people as you'd like. They just need an account on anaconda.org. Do you have an account there so I can add you? You can then add other as you'll need.

@martinfleis
Copy link
Contributor Author

Do we need to build the wheel in the same way you currently do in https://github.com/pydata/xarray/blob/main/.github/workflows/testpypi-release.yaml? I used the building workflow from the PyPI release but I just noticed that you do it a bit differently when pushing to TestPyPI.

@keewis
Copy link
Collaborator

keewis commented May 23, 2023

Do we need to build the wheel in the same way you currently do in [the TestPyPI workflow]

depends on whether we can put local versions on anaconda. PyPI and TestPyPI don't allow that, so we had to modify pyproject.toml to make setuptools-scm generate versions without the local part.

Do you have an account there so I can add you?

now I do, the username is the same as on github.

@keewis keewis dismissed their stale review May 23, 2023 15:34

obsolete

@martinfleis
Copy link
Contributor Author

depends on whether we can put local versions on anaconda

Seems okay -> https://anaconda.org/scientific-python-nightly-wheels/xarray/files

now I do, the username is the same as on github.

I've added you. You should be able to generate a token at https://anaconda.org/scientific-python-nightly-wheels/settings/access with Allow write access to the API site and Allow uploads to Standard Python repositories permissions and add the token as a ANACONDA_NIGHTLY secret.

@keewis
Copy link
Collaborator

keewis commented May 23, 2023

add the token as a ANACONDA_NIGHTLY secret.

done. Let's try it!

@keewis keewis merged commit f96aca4 into pydata:main May 23, 2023
@welcome
Copy link

welcome bot commented May 23, 2023

Congratulations on completing your first pull request! Welcome to Xarray! We are proud of you, and hope to see you again! celebration gif

@keewis
Copy link
Collaborator

keewis commented May 23, 2023

this appears to have worked. Thanks, @martinfleis!

@martinfleis martinfleis deleted the nightly branch May 23, 2023 21:45
@dcherian
Copy link
Contributor

Thanks @martinfleis this is a very valuable contribution to the ecosystem!

@keewis keewis mentioned this pull request Jun 2, 2023
2 tasks
dstansby pushed a commit to dstansby/xarray that referenced this pull request Jun 28, 2023
* upload nightly wheels

* add whats new

* empty line

* Apply suggestions from code review

Co-authored-by: Justus Magin <[email protected]>

---------

Co-authored-by: Justus Magin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation Github bots, testing workflows, release automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Produce nightly wheels
3 participants