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

Replace clone with download #7

Open
1 of 6 tasks
alecandido opened this issue Jul 22, 2022 · 7 comments
Open
1 of 6 tasks

Replace clone with download #7

alecandido opened this issue Jul 22, 2022 · 7 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@alecandido
Copy link
Member

alecandido commented Jul 22, 2022

It seems that to clone a repository from GitHub now you always need to set credentials, whatever URL you are using.

So, I'm proposing to replace repositories (that in general are also an overkill) with the master/main branch content, i.e. instead of cloning with Git we will just download the zip content of one branch from GitHub.
E.g. for this repository the corresponding URL is https://github.com/NNPDF/runcards/archive/refs/heads/master.zip

The other option is to use the latest release, e.g. for PineAPPL the URL to the zip of the last release can be found with a request to:
https://api.github.com/repos/n3pdf/pineappl/releases/latest
(the key in the response is actually zipball_url). Once we have the URL, one GET more and we'll have the zip as well (for tarball replace zip with tar in the key.

Which one do you prefer?

  • master/main: always updated
  • latest release: more stable

TODO:

@felixhekhorn
Copy link
Contributor

latest release definetely

about which repos are we talking about? because all python stuff (eko, yadism) should come without repo (but via PyPI). If we're not using releases (everywhere) we could likewise give up on poetry ;-)

@alecandido
Copy link
Member Author

PineAPPL and MadGraph. In particular, for PineAPPL we need to install the C API, and it's not a great idea to ship it as Python package (but maybe I'm just wrong...).

@scarlehoff
Copy link
Member

scarlehoff commented Jul 22, 2022

It seems that to clone a repository from GitHub now you always need to set credentials, whatever URL you are using.

It should be possible to clone with no credentials. That said, agree with the following:

latest release definetely

@alecandido
Copy link
Member Author

alecandido commented Jul 22, 2022

It should be possible to clone with no credentials.

I thought so as well (for public repositories of course), but I was not able to do it with pygit2 and GitHub...

Ok, let's go for latest then! (unless @cschwan is strongly against it...)

@felixhekhorn
Copy link
Contributor

PineAPPL and MadGraph. In particular, for PineAPPL we need to install the C API, and it's not a great idea to ship it as Python package (but maybe I'm just wrong...).

I guess also vrap @scarlehoff ?

and to be more precise: let's not use latest, but a fixed version! to be specific for PineAPPL this would be import pineappl; pineappl.__version__ as defined by pyproject

@alecandido
Copy link
Member Author

alecandido commented Jul 25, 2022

Ok, that might be fine as well

P.S.: for the non-python dependencies instead, I will hard-code versions in the package

@alecandido alecandido transferred this issue from NNPDF/pinecards Dec 14, 2022
@felixhekhorn felixhekhorn changed the title Replace clone with donwload Replace clone with download Jun 16, 2023
@alecandido alecandido mentioned this issue Nov 27, 2023
@felixhekhorn felixhekhorn added the good first issue Good for newcomers label Sep 12, 2024
@alecandido
Copy link
Member Author

For the record: it is also possible to directly download tarballs even from Launchpad

E.g. https://bazaar.launchpad.net/~maddevelopers/mg5amcnlo/simple_unlops/tarball/973

Of course, it is also supported by GitLab (and yes, also by GitHub, otherwise this issue would have not existed at all).

This should make it completely possible to replace all clones by direct downloads of the required projects' versions (from any of the hosts we usually deal with).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants