Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI: Use scientific-python/upload-nightly-action #26023

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

Conversation

matthewfeickert
Copy link
Contributor

@matthewfeickert matthewfeickert commented Jun 1, 2023

PR summary

Follow up PR to PR #25950.

PR checklist

* Use the scientific-python/upload-nightly-action GitHub Action to
  upload the nightly wheels to the scientific-python-nightly-wheels
  Anaconda Cloud package index
  (https://anaconda.org/scientific-python-nightly-wheels).
  For security best practices pin at the commit sha corresponding to the
  last stable release and let Dependabot update the commit sha and
  comment as new releases come out.
   - c.f. https://github.com/scientific-python/upload-nightly-action
* Remove the workflow step for querying and removing all but the last 5
  nightly wheel uploads to the scientific-python-nightly-wheels Anaconda
  Cloud package index as this is now centrally done by the Scientific
  Python org for all projects that upload to
  https://anaconda.org/scientific-python-nightly-wheels.
   - c.f. scientific-python/upload-nightly-action#12
@matthewfeickert
Copy link
Contributor Author

@ksunden @QuLogic This is ready for review. Let me know if you have any questions. 👍

@ksunden
Copy link
Member

ksunden commented Jun 1, 2023

As far as the removals go, upstream does not yet actually implement deleting, but I'm fine with saying "oh, they will, and if it becomes an actual problem before they do, easy enough to put back, so cross that bridge when we come to it"

@matthewfeickert
Copy link
Contributor Author

matthewfeickert commented Jun 1, 2023

As far as the removals go, upstream does not yet actually implement deleting, but I'm fine with saying "oh, they will, and if it becomes an actual problem before they do, easy enough to put back, so cross that bridge when we come to it"

Yeah, and as scientific-python/upload-nightly-action#12 will probably be merged in the next 24 hours I don't see any harm in there potentially being 6 wheels up on the package index for a few hours in the worst case scenario. As soon as it is merged I'm also going to trigger a manual run of the wheel removal workflow with workflow dispatch.

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

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

Seems good to me, but I guess we should wait until at least one nightly wheel is uploaded using the new location, instead of stacking these two changes together.

@matthewfeickert
Copy link
Contributor Author

matthewfeickert commented Jun 1, 2023

but I guess we should wait until at least one nightly wheel is uploaded using the new location, instead of stacking these two changes together.

@ksunden has you covered and did this a few days ago. :)

https://anaconda.org/scientific-python-nightly-wheels/matplotlib/files

new-package-index

$ docker run --rm -ti python:3.11 /bin/bash
root@e22e7dd70b46:/# python -m pip download --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --no-deps matplotlib
Looking in indexes: https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
Collecting matplotlib
  Downloading https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/matplotlib/3.8.0.dev1157%2Bg2f778fda79/matplotlib-3.8.0.dev1157%2Bg2f778fda79-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.6/11.6 MB 11.3 MB/s eta 0:00:00
Saved /matplotlib-3.8.0.dev1157+g2f778fda79-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Successfully downloaded matplotlib
WARNING: There was an error checking the latest version of pip.
root@e22e7dd70b46:/# ls matplotlib-3.8.0.dev1157+g2f778fda79-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl 
matplotlib-3.8.0.dev1157+g2f778fda79-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
root@e22e7dd70b46:/# 

edit: Er, sorry maybe you meant automatically uploaded using the changes in PR #25950?

@QuLogic
Copy link
Member

QuLogic commented Jun 1, 2023

That was manual though, and won't confirm the workflow is working.

@matthewfeickert
Copy link
Contributor Author

That was manual though, and won't confirm the workflow is working.

Gotcha. 👍 Okay that will happen later tonight then now that PR #25950 is in.

After that happens, if you'd like to see an additional example of the workflow networkx has already uploaded using the same GitHub Action:

upload

networkx

@matthewfeickert
Copy link
Contributor Author

matthewfeickert commented Jun 1, 2023

Oh but you want to check that the matplotlib Anaconda Cloud API token in secrets.ANACONDA_ORG_UPLOAD_TOKEN got updated correctly. Sorry, slow on the uptake today!

@matthewfeickert
Copy link
Contributor Author

And with https://github.com/matplotlib/matplotlib/actions/runs/5151045894/jobs/9275848789 that's up and deploying correctly

...
Using Anaconda API: https://api.anaconda.org
Using "scientific-python-nightly-wheels" as upload username
Processing 'dist/matplotlib-3.8.0.dev1192+gbb335a115c-pp39-pypy39_pp73-macosx_10_12_x86_64.whl'
Detecting file type...
File type is "Standard Python"
Extracting standard python attributes for upload
Creating package "matplotlib"
Creating release "3.8.0.dev1192+gbb335a115c"
Uploading file "scientific-python-nightly-wheels/matplotlib/3.8.0.dev1192+gbb335a115c/matplotlib-3.8.0.dev1192+gbb335a115c-pp39-pypy39_pp73-macosx_10_12_x86_64.whl"

 uploaded 0 of 7335Kb: 0.00% ETA: 0.0 minutes
...
 uploaded 8279 of 8279Kb: 100.00% ETA: 0.0 minutes
Upload complete

standard python located at:
https://anaconda.org/scientific-python-nightly-wheels/matplotlib
...
$ docker run --rm -ti python:3.11 /bin/bash
root@b6fb237233dd:/# python -m pip download --index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --no-deps matplotlib
Looking in indexes: https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
Collecting matplotlib
  Downloading https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/matplotlib/3.8.0.dev1192%2Bgbb335a115c/matplotlib-3.8.0.dev1192%2Bgbb335a115c-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.6/11.6 MB 6.9 MB/s eta 0:00:00
Saved /matplotlib-3.8.0.dev1192+gbb335a115c-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Successfully downloaded matplotlib
WARNING: There was an error checking the latest version of pip.
root@b6fb237233dd:/# 

👍

@ksunden ksunden added this to the v3.8.0 milestone Jun 2, 2023
@ksunden ksunden merged commit 019dbf4 into matplotlib:main Jun 2, 2023
@matthewfeickert matthewfeickert deleted the ci/use-scientific-python-nightly-wheels-action branch June 2, 2023 17:23
@matthewfeickert
Copy link
Contributor Author

Yeah, and as scientific-python/upload-nightly-action#12 will probably be merged in the next 24 hours I don't see any harm in there potentially being 6 wheels up on the package index for a few hours in the worst case scenario. As soon as it is merged I'm also going to trigger a manual run of the wheel removal workflow with workflow dispatch.

scientific-python/upload-nightly-action#12 is now merged and has been run successfully (c.f. scientific-python/upload-nightly-action#12 (comment)).

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.

3 participants