Skip to content

Replace clone with download #7

Open

Description

@alecandido

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:

Activity

  1. felixhekhorn commented on Jul 22, 2022

    @felixhekhorn
    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 ;-)

  2. alecandido commented on Jul 22, 2022

    @alecandido
    ContributorAuthor

    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...).

  3. scarlehoff commented on Jul 22, 2022

    @scarlehoff
    Member

    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

  4. alecandido commented on Jul 22, 2022

    @alecandido
    ContributorAuthor

    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...)

  5. felixhekhorn commented on Jul 25, 2022

    @felixhekhorn
    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

  6. alecandido commented on Jul 25, 2022

    @alecandido
    ContributorAuthor

    Ok, that might be fine as well

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

  7. transferred this issue fromNNPDF/pinecardson Dec 14, 2022
  8. changed the title [-]Replace clone with donwload[/-] [+]Replace clone with download[/+] on Jun 16, 2023
  9. alecandido commented on Oct 23, 2024

    @alecandido
    ContributorAuthor

    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

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions