scientific-python / upload-nightly-action

This action is used to upload nightly builds of your package.
https://anaconda.org/scientific-python-nightly-wheels
BSD 3-Clause "New" or "Revised" License
7 stars 10 forks source link

Add ability to select package index for upload #8

Closed matthewfeickert closed 1 year ago

matthewfeickert commented 1 year ago

At the moment the package index to upload the distributions is hardcoded to https://anaconda.org/scientific-python-nightly-wheels

https://github.com/scientific-python/upload-nightly-action/blob/80af44feb2d73fe29869d46207c02f88885ea5b8/entrypoint.sh#L17

Related to https://github.com/scientific-python/upload-nightly-action/issues/5#issuecomment-1564723037, this should not be hardcoded as there are additional nightly package indexes that can reasonably be desired to be used. As an explicit example, at the moment matplotlib uploads nightly wheels to https://anaconda.org/scipy-wheels-nightly (@tacaswell @QuLogic I'm not sure if there was discussion at the 2023 summit about switching where you do nightly uploads to, so I'll let you comment here).


You may be very reasonably wondering why there is an https://anaconda.org/scientific-python-nightly-wheels/matplotlib if that's not where matplotlib publishes their nightlies, and then answer is that while I was working on https://github.com/scientific-python/nightly-wheels @jarrodmillman had freshly made https://anaconda.org/scientific-python-nightly-wheels/ and to do tests of the action workflow I used matplotlib as I already had that working well for matplotlib on the scipy-wheels-nightly Anaconda org.

@tacaswell @QuLogic I have a private IRIS-HEP Slack chat with @tacaswell from 2022-08-19 where I got permission to use matplotlib as a test upload (just wanted to make it very clear I wasn't going about distributing packages without express approval).


So this also means that until this feature is added

https://github.com/scientific-python/upload-nightly-action/blob/80af44feb2d73fe29869d46207c02f88885ea5b8/README.md?plain=1#L32

and

https://github.com/scientific-python/upload-nightly-action/blob/80af44feb2d73fe29869d46207c02f88885ea5b8/README.md?plain=1#L49-L54

are wrong (well, at least severely out of date) and matplotlib should not be used as an example.

If people are in agreement with me that this should be configurable (I would argue that unless you want this to be insular to only the Scientific Python org community this should not have a default but be a required argument) I'm happy to PR this.

betatim commented 1 year ago

I don't think we need this to be configurable right now. The main goal of the SPEC is to move the location where nightlies are uploaded to https://pypi.anaconda.org/scientific-python-nightly-wheels from the old place. The reason for the move is that we can setup a way to have a group of people feel responsible for maintaining access rights and such. For example @tupui is organising to give people access with a model that has nicer security than the old location

Similarly the link to use to install the nightlies should be easy to consume (copy and paste). At least I don't see this SPEC as something that is meant to be general purpose. For that there are many tutorials and tools out there.

It would be great to get as many projects as possible moved, but of course no one has to.


There are already ideas about having maybe one anaconda location per project and operating a simple webserver that merges all of them into one. At this point it would become useful to have a configurable upload URL. But that is still a bit in the future I'd say.

matthewfeickert commented 1 year ago

The main goal of the SPEC is to move the location where nightlies are uploaded to https://pypi.anaconda.org/scientific-python-nightly-wheels from the old place [https://anaconda.org/scipy-wheels-nightly]

Having just reread the draft of https://scientific-python.org/specs/spec-0004/ before opening this Issue this is not clear. (But having just reread it I now also see that I'm an author — didn't know that! :smile: — and so I guess I should take some responsibility and go contribute.)

However, if this really is the goal then why not make it configurable and then just set it to a default value of "scientific-python-nightly-wheels"? Why force other projects that are already publishing nighties to other places to have to use different infrastructure right up until they decide to switch (or indefinitely) rather than making it even easier for them to switch by just deleting an argument to the action?

matthewfeickert commented 1 year ago

I'm not sure if there was discussion at the 2023 summit about switching where you do nightly uploads to, so I'll let you comment here)

This is occurring in https://github.com/matplotlib/matplotlib/pull/25950

betatim commented 1 year ago

But having just reread it I now also see that I'm an author — didn't know that! 😄 — and so I guess I should take some responsibility and go contribute.

You were listed as one, so I just kept you on there. But yeah, contributions welcome :D

My assumption is that most established projects won't end up using this action because they already have ways of uploading wheels and sticking to the existing stuff is easier. But really, I'm happy if people maintain this and with that comes "add or remove what you want"

bsipocz commented 1 year ago

Why force other projects that are already publishing nighties to other places to have to use different infrastructure right up until they decide to switch (or indefinitely) rather than making it even easier for them to switch by just deleting an argument to the action?

No one is forcing anyone for anything, certainly not forcing using this action. In fact it was written to help those packages that didn't do nightlies yet to cross the finish line and publish nightlies.