-
Notifications
You must be signed in to change notification settings - Fork 906
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
Investigate how we can remove Kedro's dependency on git (for starters) #2051
Comments
Cookiecutter exposes a git clone functionality using this API so you can clone starters without using Git. IIRC the only other point we need this is recording the hash in exp tracking. |
Related to #1451 |
Has https://www.pygit2.org/ (the Python bindings of https://libgit2.org/) been evaluated? |
tl;dr: maybe I'm missing something but I'm pretty confused by this ticket and don't really understand what (if anything) we should do here. Fully agree that kedro shouldn't require use of git, but at the moment it 99.9% doesn't already, and it's not clear to me whether/how we should solve that 0.1%. The
... and so switching to using this won't help here. AFAIK we actually don't currently have a hard dependency on git anywhere - the only things that won't work are:
As far as I can see the only place where we actually import gitpython is in |
Just to add here that -- should this be resolved and the dependency is removed -- we should update the docs to remove the requirement for I don't know how many are affected tbh @AntonyMilneQB. I did a full walkthrough of setup and spaceflights on my old windows laptop and it didn't have git installed, so it caught me out. Maybe there will be quite a few of our McK users likewise? We'd like to take out the "accidental complexity" of asking people to install git from the docs, but it's clearly not a high priority to fix a framework ticket just to tidy up the docs a bit! But should anyone get round to resolving this issue, please let me know, or drop by the Get Started docs and remove the text. Would this maybe make a suitable community ticket perhaps @astrojuanlu ? |
I think this would be a suitable community ticket as long as we have a clear consensus on how to move forward, which is not entirely clear to me (but please correct me if I'm wrong). |
The git dependency comes from It's also unclear at the moment what breaks if you don't have
|
Following discussion in planning 20/03/2023What we're currently saying in the docs about git (following my recent updates to onboarding docs): https://docs.kedro.org/en/latest/get_started/install.html#installation-prerequisites
We could say
However, I think a better approach is, as @AntonyMilneQB suggests, to take
I think we should do it in each place because there are different paths to these pages and not everyone will work through sequentially. I can do this, but not today. |
To note, there was 1 suggestion to cookiecutter in 2016 to replace the This shouldn't be a problem nowadays, see the amount of wheels: https://pypi.org/project/pygit2/1.11.1/#files However, Just in case, I opened an issue in Copier about this: copier-org/copier#1045 |
Fully agree with this @stichbury, thanks for writing it up. Just for completeness, let me add my other comments here too. If someone still wants to do But honestly I haven’t heard anyone ask for that before, so I don’t think there would be much call for it. At the moment I think the main problem is just that the docs make it sounds like git is a core dependency when it’s not actually. |
Related: #1826 (comment) |
Dumping some ideas on how migrating away from cookiecutter could potentially help us on various fronts. If we were to choose copier it could help with:
Another alternative, cruft, inherits some flaws from |
CC'ed for opinions: @merelcht, @astrojuanlu, @stichbury Discussed in backlog grooming today. @deepyaman, @lrcouto, @noklam, @SajidAlamQB and myself were in favour of closing this PR due to the dependencies of the revamped
Given the recent work using cookiecutter and the kedro-starters repo to populate a new project with example code (when selected by the user), moving away from cookiecutter, and therefore git, would require some severe reworking of the current implementation.
Given that
@deepyaman did mention a use case where users may not have access to git, and as such, this workaround would be good to highlight. I support this suggestion to add this to the starters documentation. |
Supported. Please could you make any tickets necessary for updating documentation e.g. where it may not yet be clear that git is a pre-req (we already have it in our docs for the "set up Kedro" section) and any other docs changes you think needed. I'm not sure if adding the workaround for not having git makes sense in the place you've linked it (in |
Closing in favour on #3571 |
Description
Currently, Kedro has a (subtle) dependency on
git
; it is required to create a new project when using one of the default starters. This is because Kedro imports and usesgitpython
, which requires that git is installed on the system.Context
@stichbury documented that
git
is a requirement for installing Kedro as part of #1989, @yetudada pointed out that it is not a good idea to require users who may not be familiar withgit
to install the executable as part of the set-up process for Kedro.Possible Implementation
Instead of using
gitpython
(and therefore thegit
executable) to clone the git repositories, we can use a different protocol, perhaps http via therequests
library.The text was updated successfully, but these errors were encountered: