jupyterhub / jupyterhub/nbgitpuller

Add plugin hook to execute commands before git pulling

Open
#119 4 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
237
Forks
86
PR merge metrics
No merged PRs in 30d

Description

### Proposed change

We write a [pluggy](https://pluggy.readthedocs.io/en/latest/) based plugin system for nbgitpuller. The first hook would allow arbitrary command execution before the git-pulling happens.

This enables use cases where you want to pull from something *other than git*. But you still need git for the diffing and merging capabilities. So the solution is to:

1. Pull from original source (such as canvas, dropbox, blackboard, google drive, etc) into a hidden git repository
2. Then do nbgitpuller things from the hidden repository

This gives us proper merge resolution, without having to implement that ourselves.

### Alternative options

Support pulling from alternate sources such as canvas, URLs, blackboard, etc natively. This could provide a better integrated experience, but at the cost of much higher maintenance burden. We will also have to provide diffing and merging implementations without git, which is hard.

### Who would use this feature?

People who want to use solutions other than git to store their content. [This discourse post](https://discourse.jupyter.org/t/repo2dockerspawner-alternative-version/3584/15?u=yuvipanda) outlines some uses.

### (Optional): Suggest a solution

[rclone](https://rclone.org/) lets you sync files locally from many sources - dropbox, google drive, ftp, etc. We could try get that to work for a single source with rclone, and see what plugins we need to provide.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.