astropy / conda-builder-affiliated

THIS REPO IS DEPRECATED -- see astropy/conda-channel-astropy instead:
https://github.com/astropy/conda-channel-astropy
BSD 3-Clause "New" or "Revised" License
2 stars 10 forks source link

Be able to upload pre-release versions to a different channel #28

Closed Cadair closed 8 years ago

Cadair commented 9 years ago

I am trying to work this one out for SunPy, in reality once I go to sleep in about 30 mins, this will be low priority. However, it would be nice to be able to upload pre-release versions to a pre channel or similar.

I was looking at doing it, but the Obvious CI scripts for the recipe builds seem to pose a problem.

mwcraig commented 9 years ago

I think it should be possible. Right now the builder skips over pre-releases at https://github.com/astropy/conda-builder-affiliated/blob/master/affiliate-builder/prepare_packages.py#L100

I think it should be possible -- is the obvious-ci issue that it only uploads to the main channel for a user?

Cadair commented 9 years ago

the obvious-ci issue is that the packages built through the recipies do not go through the upload python script, so there is not one place to modify the upload channel based on if it is a pre-release or not.

It would be conceptually easy to put a version check in the bdist_conda upload script and change channel if it was a pre-release. Doing the same for obvious-ci would need to be done on that side I guess.

mwcraig commented 9 years ago

If one could specify the upload channel in the recipe would that work? I know that would require a change in obvious-ci but I think I can do that.

Cadair commented 9 years ago

yeah, that could work. If that is the easiest way to do it. As I said I was thinking of something that was dependant on version number.

mwcraig commented 9 years ago

As I said I was thinking of something that was dependant on version number.

Right, managed to forget that...though you did only say it twice ;)

It seems like the place to put the logic that decides what to do with pre-releases is in conda-builder-affiliated somewhere in prepare_packages.

Since the recipes are already being built from templates I could imagine writing a channel into the recipe, as long as obvious-ci is willing to pull the channel from the recipe.

Until recently that wouldn't have been possible because meta.yaml was constrained to contain only certain sections and keys, but a recent update added an extra section that could be used for this.

Alternatively, prepare_packages could produce two separate recipe directories, one for each channel. That might actually be cleaner.

Cadair commented 9 years ago

having a recipe directory per channel would work, I guess that would not need any alterations in obvious-ci either.

I will leave it up to you where to define a channel for pre releases, and if you want to go further down that rabbit hole.

mwcraig commented 9 years ago

I'll give this a try in the morning (unless I come to me senses before then).

Cadair commented 9 years ago

I have just had another thought here...

Being able to specify one or more channels to upload to would be quite cool from the sunpy perspective, because then we would be able to use this repo to maintain our own collection of packages. Although, I suppose that really means being able to upload as different users, which is a whole other thing...

mwcraig commented 8 years ago

This issue was moved to astropy/conda-build-tools#13