-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #162 from yuvipanda/contributing
Document how to do local development
- Loading branch information
Showing
4 changed files
with
51 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Contributing | ||
|
||
## Setup | ||
|
||
nbgitpuller is a [jupyter | ||
serverextension](https://jupyter-notebook.readthedocs.io/en/stable/extending/handlers.html), | ||
and hence can be developed locally without needing a JupyterHub. | ||
|
||
1. Fork the nbgitpuller repository and `git clone` it to your local computer. | ||
|
||
2. Inside the nbgitpuller clone on your local machine, setup a virtual | ||
environment to do development in | ||
|
||
```bash | ||
python3 -m venv venv | ||
source venv/bin/activate | ||
``` | ||
|
||
3. Install nbgitpuller with its dependencies in this virtual environment | ||
|
||
```bash | ||
pip install -e . | ||
``` | ||
|
||
4. Enable the nbgitpuller jupyter serverextension | ||
|
||
```bash | ||
jupyter serverextension enable --sys-prefix nbgitpuller | ||
``` | ||
|
||
5. Start the notebook server. This will open the classic notebook in your web | ||
browser, and automatically authenticate you as a side effect. | ||
|
||
```bash | ||
jupyter notebook | ||
``` | ||
|
||
6. You can now test nbgitpuller locally, by hitting the `/git-pull` url with any | ||
of the [URL query parameters](topic/url-options.rst). For example, to pull the | ||
[data-8/textbook](https://github.com/data-8/textbook) repository's `gh-pages` | ||
branch, you can use the following URL: | ||
|
||
``` | ||
http://localhost:8888/git-sync?repo=https://github.com/data-8/textbook&branch=gh-pages | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,3 @@ | ||
recommonmark==0.4.0 | ||
myst_parser | ||
sphinx_copybutton | ||
traitlets | ||
jupyterhub | ||
sphinx>=1.3.6,!=1.5.4 | ||
sphinx-book-theme | ||
memory_profiler | ||
pytest | ||
PyGitHub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,7 @@ Full Contents | |
:maxdepth: 2 | ||
|
||
install | ||
contributing | ||
topic/automatic-merging | ||
topic/url-options | ||
link |