File tree Expand file tree Collapse file tree 4 files changed +51
-22
lines changed
Expand file tree Collapse file tree 4 files changed +51
-22
lines changed Original file line number Diff line number Diff line change 33
44import os
55import requests
6- from recommonmark .transform import AutoStructify
76
87github_doc_root = "https://github.com/rtfd/recommonmark/tree/master/doc/"
98
109
1110def setup (app ):
12- app .add_config_value (
13- "recommonmark_config" ,
14- {
15- "url_resolver" : lambda url : github_doc_root + url ,
16- "auto_toc_tree_section" : "Contents" ,
17- },
18- True ,
19- )
20- app .add_transform (AutoStructify )
2111 app .add_stylesheet ("custom.css" )
2212 app .add_javascript ("link_gen/link.js" )
2313
@@ -31,7 +21,10 @@ def setup(app):
3121# Add any Sphinx extension module names here, as strings. They can be
3222# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3323# ones.
34- extensions = ["sphinx_copybutton" ]
24+ extensions = [
25+ "myst_parser" ,
26+ "sphinx.ext.intersphinx" ,
27+ ]
3528
3629# Add any paths that contain templates here, relative to this directory.
3730templates_path = ["_templates" ]
@@ -41,10 +34,6 @@ def setup(app):
4134
4235source_suffix = [".rst" , ".md" ]
4336
44- from recommonmark .parser import CommonMarkParser
45-
46- source_parsers = {".md" : CommonMarkParser }
47-
4837
4938# The master toctree document.
5039master_doc = "index"
Original file line number Diff line number Diff line change 1+ # Contributing
2+
3+ ## Setup
4+
5+ nbgitpuller is a [ jupyter
6+ serverextension] ( https://jupyter-notebook.readthedocs.io/en/stable/extending/handlers.html ) ,
7+ and hence can be developed locally without needing a JupyterHub.
8+
9+ 1 . Fork the nbgitpuller repository and ` git clone ` it to your local computer.
10+
11+ 2 . Inside the nbgitpuller clone on your local machine, setup a virtual
12+ environment to do development in
13+
14+ ``` bash
15+ python3 -m venv venv
16+ source venv/bin/activate
17+ ```
18+
19+ 3 . Install nbgitpuller with its dependencies in this virtual environment
20+
21+ ``` bash
22+ pip install -e .
23+ ```
24+
25+ 4 . Enable the nbgitpuller jupyter serverextension
26+
27+ ``` bash
28+ jupyter serverextension enable --sys-prefix nbgitpuller
29+ ```
30+
31+ 5 . Start the notebook server. This will open the classic notebook in your web
32+ browser, and automatically authenticate you as a side effect.
33+
34+ ``` bash
35+ jupyter notebook
36+ ```
37+
38+ 6 . You can now test nbgitpuller locally, by hitting the ` /git-pull ` url with any
39+ of the [ URL query parameters] ( topic/url-options.rst ) . For example, to pull the
40+ [ data-8/textbook] ( https://github.com/data-8/textbook ) repository's ` gh-pages `
41+ branch, you can use the following URL:
42+
43+ ```
44+ http://localhost:8888/git-sync?repo=https://github.com/data-8/textbook&branch=gh-pages
45+ ```
Original file line number Diff line number Diff line change 1- recommonmark==0.4.0
1+ myst_parser
22sphinx_copybutton
3- traitlets
4- jupyterhub
5- sphinx>=1.3.6,!=1.5.4
63sphinx-book-theme
7- memory_profiler
8- pytest
9- PyGitHub
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ Full Contents
8989 :maxdepth: 2
9090
9191 install
92+ contributing
9293 topic/automatic-merging
9394 topic/url-options
9495 link
You can’t perform that action at this time.
0 commit comments