Closed garryod closed 1 year ago
Merging #94 (4981421) into main (4981421) will not change coverage. The diff coverage is
n/a
.:exclamation: Current head 4981421 differs from pull request most recent head 74b599b. Consider uploading reports for the commit 74b599b to get more accurate results
@@ Coverage Diff @@
## main #94 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 13 13
=========================================
Hits 13 13
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
What steps do you need to take on the conda forge side to make this work? An org level token? Or do you need to manually make a project there and give a token from that?
What steps do you need to take on the conda forge side to make this work? An org level token? Or do you need to manually make a project there and give a token from that?
An org level token is sufficient. I believe @PeterC-DLS currently owns the DiamondLightSource org, and have been in touch with him to look at that side of things
See the following CI workflows for proper testing of the publish action:
Package is here: https://anaconda.org/garryod/python3-pip-skeleton
Looks good. I have a good candidate project to try out the 'token gated' Pypi release on which I'll try to test on Friday.
To preempt the question of "why do we now have this awful build stage?"... Uploading the dist
to anaconda
did indeed give us a package hosted on anaconda.org, this package was however a pip
package installable via pip install -i https://anaconda.org/garryod/ python3-pip-skeleton
and carried with it the same compatibility issues experience when installing pip
packages from pypi
into a conda
environment
See this CI job for a run with publish to anaconda.org
At the moment, we do not automatically push to global PyPI just by adopting the pip skeleton.
According to Giles, a global conda token has already been provided. Can we please make the skeleton behave identically for both and not automatically release to conda?
There is no Diamond-wide org on PyPI (I have a DLS-Scisoft one). PyPI's organization support is rather lacking but a project exists to improve things.
At the moment, we do not automatically push to global PyPI just by adopting the pip skeleton.
According to Giles, a global conda token has already been provided. Can we please make the skeleton behave identically for both and not automatically release to conda?
Yes, a organisation level anaconda token is provided for all public github repos, meaning that the default behaviour will be pushing to anaconda on release, my understanding is that it is our intention to have the same setup for PyPI once support for organisations is implemented
Is there a particular use case in which we wouldn't want to push to our anaconda channel by default?
At the moment, we do not automatically push to global PyPI just by adopting the pip skeleton. According to Giles, a global conda token has already been provided. Can we please make the skeleton behave identically for both and not automatically release to conda?
Yes, a organisation level anaconda token is provided for all public github repos, meaning that the default behaviour will be pushing to anaconda on release, my understanding is that it is our intention to have the same setup for PyPI once support for organisations is implemented
Is there a particular use case in which we wouldn't want to push to our anaconda channel by default?
As of this moment, I just want PyPI and Conda to have similar behaviours. Personally, I prefer to 'enable' things like pushing to PyPI or Conda, although I understand you do need to push a tag.
I believe private services, test repos etc make this opt-in behaviour useful, but I understand that some people would disagree.
At the moment, we do not automatically push to global PyPI just by adopting the pip skeleton. According to Giles, a global conda token has already been provided. Can we please make the skeleton behave identically for both and not automatically release to conda?
Yes, a organisation level anaconda token is provided for all public github repos, meaning that the default behaviour will be pushing to anaconda on release, my understanding is that it is our intention to have the same setup for PyPI once support for organisations is implemented Is there a particular use case in which we wouldn't want to push to our anaconda channel by default?
As of this moment, I just want PyPI and Conda to have similar behaviours. Personally, I prefer to 'enable' things like pushing to PyPI or Conda, although I understand you do need to push a tag.
I believe private services, test repos etc make this opt-in behaviour useful, but I understand that some people would disagree.
Yeah, I would have to agree that similar behaviour is desirable, though there will always be some intrinsic difference as PyPI adopts a flat structure whilst Anaconda has "channels".
In my head the visibility of the repository makes for a good indicator of whether it should be visible on package repositories, but perhaps this is not the case for some of your projects?
If we want to do a switch on public/private we probably need to use the API to get that info: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository
You can also switch public/private for the conda channel.
If we want to do a switch on public/private we probably need to use the API to get that info: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#get-a-repository
The org level anaconda key is only for public repos, so this is built in as is
Can be done afterwards manually - it's a one-off for each package (not each version).
I think we are talking about two different things here:
I'm happy with this if @MJGaughran is satisfied with the "global token" behaviour
This seems acceptable until we can get the global PyPI key set up. We should just make it clear in the docs that this will happen automatically.
I would be wary about adding such things to the skeleton in the future, though. You wouldn't expect such functionality to be added as part of an update merge.
Resolves #87 by adding
conda upload
to the release CI