Contributing¶
Setup¶
nbgitpuller is a jupyter serverextension, and hence can be developed locally without needing a JupyterHub.
Fork the nbgitpuller repository and
git clone
it to your local computer.Inside the nbgitpuller clone on your local machine, setup a virtual environment to do development in
python3 -m venv venv source venv/bin/activate
Install nbgitpuller with its dependencies in this virtual environment
pip install -e .
Enable the nbgitpuller jupyter serverextension
jupyter serverextension enable --sys-prefix nbgitpuller
Start the notebook server. This will open the classic notebook in your web browser, and automatically authenticate you as a side effect.
jupyter notebook
You can now test nbgitpuller locally, by hitting the
/git-pull
url with any of the URL query parameters. For example, to pull the data-8/textbook repository’sgh-pages
branch, you can use the following URL:http://localhost:8888/git-sync?repo=https://github.com/data-8/textbook&branch=gh-pages