##// END OF EJS Templates
Finish implementing JSDoc support
Jonathan Frederic -
Show More
@@ -1,162 +1,165 b''
1 # Makefile for Sphinx documentation
1 # Makefile for Sphinx documentation
2 #
2 #
3
3
4 # You can set these variables from the command line.
4 # You can set these variables from the command line.
5 SPHINXOPTS =
5 SPHINXOPTS =
6 SPHINXBUILD = sphinx-build
6 SPHINXBUILD = sphinx-build
7 PAPER =
7 PAPER =
8 SRCDIR = source
8 SRCDIR = source
9 BUILDDIR = build
9 BUILDDIR = build
10
10
11 # Internal variables.
11 # Internal variables.
12 PAPEROPT_a4 = -D latex_paper_size=a4
12 PAPEROPT_a4 = -D latex_paper_size=a4
13 PAPEROPT_letter = -D latex_paper_size=letter
13 PAPEROPT_letter = -D latex_paper_size=letter
14 ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
14 ALLSPHINXOPTS = -d build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SRCDIR)
15
15
16 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck api
16 .PHONY: help clean html web pickle htmlhelp latex changes linkcheck api
17
17
18 default: html
18 default: html
19
19
20 help:
20 help:
21 @echo "Please use \`make <target>' where <target> is one of"
21 @echo "Please use \`make <target>' where <target> is one of"
22 @echo " html standalone HTML files"
22 @echo " html standalone HTML files"
23 @echo " html_noapi same as above, without the time consuming API docs"
23 @echo " html_noapi same as above, without the time consuming API docs"
24 @echo " pickle pickle files (usable by e.g. sphinx-web)"
24 @echo " pickle pickle files (usable by e.g. sphinx-web)"
25 @echo " htmlhelp HTML files and a HTML help project"
25 @echo " htmlhelp HTML files and a HTML help project"
26 @echo " latex LaTeX files, you can set PAPER=a4 or PAPER=letter"
26 @echo " latex LaTeX files, you can set PAPER=a4 or PAPER=letter"
27 @echo " texinfo Texinfo files"
27 @echo " texinfo Texinfo files"
28 @echo " info Texinfo files and run them through makeinfo"
28 @echo " info Texinfo files and run them through makeinfo"
29 @echo " changes an overview over all changed/added/deprecated items"
29 @echo " changes an overview over all changed/added/deprecated items"
30 @echo " linkcheck check all external links for integrity (takes a long time)"
30 @echo " linkcheck check all external links for integrity (takes a long time)"
31 @echo
31 @echo
32 @echo "Compound utility targets:"
32 @echo "Compound utility targets:"
33 @echo "pdf latex and then runs the PDF generation"
33 @echo "pdf latex and then runs the PDF generation"
34 @echo "all html and pdf"
34 @echo "all html and pdf"
35 @echo "dist all, and then puts the results in dist/"
35 @echo "dist all, and then puts the results in dist/"
36 @echo "gitwash-update update git workflow from source repo"
36 @echo "gitwash-update update git workflow from source repo"
37
37
38 clean_api:
38 clean_api:
39 -rm -rf $(SRCDIR)/api/generated
39 -rm -rf $(SRCDIR)/api/generated
40
40
41 clean: clean_api
41 clean: clean_api
42 -rm -rf build/* dist/*
42 -rm -rf build/* dist/*
43 -cd $(SRCDIR)/config/options; cat generated | xargs -r rm -f
43 -cd $(SRCDIR)/config/options; cat generated | xargs -r rm -f
44 -rm -rf $(SRCDIR)/config/options/generated
44 -rm -rf $(SRCDIR)/config/options/generated
45 -rm -f $(SRCDIR)/interactive/magics-generated.txt
45 -rm -f $(SRCDIR)/interactive/magics-generated.txt
46
46
47 pdf: latex
47 pdf: latex
48 cd build/latex && make all-pdf
48 cd build/latex && make all-pdf
49
49
50 all: html pdf
50 all: html pdf
51
51
52 # For final distribution, only build HTML (our pdf is now so large as to be
52 # For final distribution, only build HTML (our pdf is now so large as to be
53 # unusable, takes forever to build and just bloats the downloads). We leave
53 # unusable, takes forever to build and just bloats the downloads). We leave
54 # them hardlinked at the top-level so users find them easily, though the
54 # them hardlinked at the top-level so users find them easily, though the
55 # original build/html dir is left in-place (useful to reload builds while
55 # original build/html dir is left in-place (useful to reload builds while
56 # testing).
56 # testing).
57 dist: html
57 dist: html
58 rm -rf html
58 rm -rf html
59 cp -al build/html .
59 cp -al build/html .
60 @echo "Build finished. Final docs are in html/"
60 @echo "Build finished. Final docs are in html/"
61
61
62 html: api autoconfig automagic
62 html: jsapi api autoconfig automagic
63 html_noapi: clean_api autoconfig automagic
63 html_noapi: clean_api autoconfig automagic
64
64
65 html html_noapi:
65 html html_noapi:
66 mkdir -p build/html build/doctrees
66 mkdir -p build/html build/doctrees
67 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
67 $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) build/html
68 @echo
68 @echo
69 @echo "Build finished. The HTML pages are in build/html."
69 @echo "Build finished. The HTML pages are in build/html."
70
70
71 automagic: source/interactive/magics-generated.txt
71 automagic: source/interactive/magics-generated.txt
72
72
73 source/interactive/magics-generated.txt: autogen_magics.py
73 source/interactive/magics-generated.txt: autogen_magics.py
74 python autogen_magics.py
74 python autogen_magics.py
75 @echo "Created docs for line & cell magics"
75 @echo "Created docs for line & cell magics"
76
76
77 autoconfig: source/config/options/generated
77 autoconfig: source/config/options/generated
78
78
79 source/config/options/generated:
79 source/config/options/generated:
80 python autogen_config.py
80 python autogen_config.py
81 @echo "Created docs for config options"
81 @echo "Created docs for config options"
82
82
83 jsapi:
84 jsdoc -c jsdoc_config.json -d ./build/jsapi_html/
85
83 api: source/api/generated/gen.txt
86 api: source/api/generated/gen.txt
84
87
85 source/api/generated/gen.txt:
88 source/api/generated/gen.txt:
86 python autogen_api.py
89 python autogen_api.py
87 @echo "Build API docs finished."
90 @echo "Build API docs finished."
88
91
89 pickle:
92 pickle:
90 mkdir -p build/pickle build/doctrees
93 mkdir -p build/pickle build/doctrees
91 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
94 $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) build/pickle
92 @echo
95 @echo
93 @echo "Build finished; now you can process the pickle files or run"
96 @echo "Build finished; now you can process the pickle files or run"
94 @echo " sphinx-web build/pickle"
97 @echo " sphinx-web build/pickle"
95 @echo "to start the sphinx-web server."
98 @echo "to start the sphinx-web server."
96
99
97 web: pickle
100 web: pickle
98
101
99 htmlhelp:
102 htmlhelp:
100 mkdir -p build/htmlhelp build/doctrees
103 mkdir -p build/htmlhelp build/doctrees
101 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
104 $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) build/htmlhelp
102 @echo
105 @echo
103 @echo "Build finished; now you can run HTML Help Workshop with the" \
106 @echo "Build finished; now you can run HTML Help Workshop with the" \
104 ".hhp project file in build/htmlhelp."
107 ".hhp project file in build/htmlhelp."
105
108
106 qthelp:
109 qthelp:
107 mkdir -p build/qthelp
110 mkdir -p build/qthelp
108 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
111 $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) build/qthelp
109 @echo
112 @echo
110 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
113 @echo "Build finished; now you can run "qcollectiongenerator" with the" \
111 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
114 ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
112 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/IPython.qhcp"
115 @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/IPython.qhcp"
113 @echo "To view the help file:"
116 @echo "To view the help file:"
114 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/IPython.qhc"
117 @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/IPython.qhc"
115
118
116 latex: api autoconfig
119 latex: api autoconfig
117 mkdir -p build/latex build/doctrees
120 mkdir -p build/latex build/doctrees
118 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
121 $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) build/latex
119 @echo
122 @echo
120 @echo "Build finished; the LaTeX files are in build/latex."
123 @echo "Build finished; the LaTeX files are in build/latex."
121 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
124 @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
122 "run these through (pdf)latex."
125 "run these through (pdf)latex."
123
126
124 changes:
127 changes:
125 mkdir -p build/changes build/doctrees
128 mkdir -p build/changes build/doctrees
126 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
129 $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
127 @echo
130 @echo
128 @echo "The overview file is in build/changes."
131 @echo "The overview file is in build/changes."
129
132
130 linkcheck:
133 linkcheck:
131 mkdir -p build/linkcheck build/doctrees
134 mkdir -p build/linkcheck build/doctrees
132 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
135 $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/linkcheck
133 @echo
136 @echo
134 @echo "Link check complete; look for any errors in the above output " \
137 @echo "Link check complete; look for any errors in the above output " \
135 "or in build/linkcheck/output.rst."
138 "or in build/linkcheck/output.rst."
136
139
137 gitwash-update:
140 gitwash-update:
138 python ../tools/gitwash_dumper.py source/development ipython
141 python ../tools/gitwash_dumper.py source/development ipython
139
142
140 nightly: dist
143 nightly: dist
141 rsync -avH --delete dist/ ipython:www/doc/nightly
144 rsync -avH --delete dist/ ipython:www/doc/nightly
142
145
143 gh-pages: clean html
146 gh-pages: clean html
144 # if VERSION is unspecified, it will be dev
147 # if VERSION is unspecified, it will be dev
145 # For releases, VERSION should be just the major version,
148 # For releases, VERSION should be just the major version,
146 # e.g. VERSION=2 make gh-pages
149 # e.g. VERSION=2 make gh-pages
147 python gh-pages.py $(VERSION)
150 python gh-pages.py $(VERSION)
148
151
149 texinfo:
152 texinfo:
150 mkdir -p $(BUILDDIR)/texinfo
153 mkdir -p $(BUILDDIR)/texinfo
151 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
154 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
152 @echo
155 @echo
153 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
156 @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
154 @echo "Run \`make' in that directory to run these through makeinfo" \
157 @echo "Run \`make' in that directory to run these through makeinfo" \
155 "(use \`make info' here to do that automatically)."
158 "(use \`make info' here to do that automatically)."
156
159
157 info:
160 info:
158 mkdir -p $(BUILDDIR)/texinfo
161 mkdir -p $(BUILDDIR)/texinfo
159 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
162 $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
160 @echo "Running Texinfo files through makeinfo..."
163 @echo "Running Texinfo files through makeinfo..."
161 make -C $(BUILDDIR)/texinfo info
164 make -C $(BUILDDIR)/texinfo info
162 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
165 @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
@@ -1,33 +1,35 b''
1 IPython Documentation
1 IPython Documentation
2 ---------------------
2 ---------------------
3
3
4 This directory contains the majority of the documentation for IPython.
4 This directory contains the majority of the documentation for IPython.
5
5
6 Requirements
6 Requirements
7 ------------
7 ------------
8 The following tools are needed to build the documentation:
8 The following tools are needed to build the documentation:
9
9
10 sphinx jsdoc
10 sphinx jsdoc
11
11
12 On Debian-based systems, you should be able to run::
12 On Debian-based systems, you should be able to run::
13
13
14 sudo apt-get install sphinx npm
14 sudo apt-get install python-sphinx npm
15 sudo npm install -g jsdoc@"<=3.3.0"
15 sudo npm install -g jsdoc@"<=3.3.0"
16
16
17 The documentation gets built using ``make``, and comes in several flavors.
17 The documentation gets built using ``make``, and comes in several flavors.
18
18
19 ``make html`` - build the API and narrative documentation web pages, this
19 ``make html`` - build the API (both Javascript and Python) and narrative
20 is the the default ``make`` target, so running just ``make`` is equivalent to
20 documentation web pages, this is the the default ``make`` target, so
21 ``make html``.
21 running just ``make`` is equivalent to ``make html``.
22
22
23 ``make html_noapi`` - same as above, but without running the auto-generated
23 ``make html_noapi`` - same as above, but without running the auto-generated
24 API docs. When you are working on the narrative documentation, the most time
24 API docs. When you are working on the narrative documentation, the most time
25 consuming portion of the build process is the processing and rending of the
25 consuming portion of the build process is the processing and rending of the
26 API documentation. This build target skips that.
26 API documentation. This build target skips that.
27
27
28 ``make jsapi`` - build Javascript auto-generated API documents.
29
28 ``make pdf`` will compile a pdf from the documentation.
30 ``make pdf`` will compile a pdf from the documentation.
29
31
30 You can run ``make help`` to see information on all possible make targets.
32 You can run ``make help`` to see information on all possible make targets.
31
33
32
34
33
35
@@ -1,16 +1,15 b''
1 {
1 {
2 "tags": {
2 "tags": {
3 "allowUnknownTags": true
3 "allowUnknownTags": true
4 },
4 },
5 "source": {
5 "source": {
6 "include": [
6 "include": [
7 "../IPython/html/static/notebook/js/notebook.js"
7 "../IPython/html/static/notebook/js/notebook.js"
8 ]
8 ]
9 },
9 },
10 "plugins": [],
10 "plugins": [],
11 "templates": {
11 "templates": {
12 "cleverLinks": false,
12 "cleverLinks": false,
13 "monospaceLinks": false
13 "monospaceLinks": false
14 },
14 }
15 "destination": "./out/"
16 } No newline at end of file
15 }
@@ -1,71 +1,77 b''
1 @ECHO OFF
1 @ECHO OFF
2 REM ~ Windows command line make file for Sphinx documentation
2 REM ~ Windows command line make file for Sphinx documentation
3
3
4 SETLOCAL
4 SETLOCAL
5
5
6 SET SPHINXOPTS=
6 SET SPHINXOPTS=
7 SET SPHINXBUILD=sphinx-build
7 SET SPHINXBUILD=sphinx-build
8 SET JSDOC=jsdoc
8 SET PAPER=
9 SET PAPER=
9 SET SRCDIR=source
10 SET SRCDIR=source
10
11
11 IF "%PAPER%" == "" SET PAPER=a4
12 IF "%PAPER%" == "" SET PAPER=a4
12 SET ALLSPHINXOPTS=-d build\doctrees -D latex_paper_size=%PAPER% %SPHINXOPTS% %SRCDIR%
13 SET ALLSPHINXOPTS=-d build\doctrees -D latex_paper_size=%PAPER% %SPHINXOPTS% %SRCDIR%
13
14
14 FOR %%X IN (%SPHINXBUILD%.exe) DO SET P=%%~$PATH:X
15 FOR %%X IN (%SPHINXBUILD%.exe) DO SET P=%%~$PATH:X
15
16
16 FOR %%L IN (html pickle htmlhelp latex changes linkcheck) DO (
17 FOR %%L IN (html pickle htmlhelp latex changes linkcheck) DO (
17 IF "%1" == "%%L" (
18 IF "%1" == "%%L" (
18 IF "%P%" == "" (
19 IF "%P%" == "" (
19 ECHO.
20 ECHO.
20 ECHO Error: Sphinx is not available. Please make sure it is correctly installed.
21 ECHO Error: Sphinx is not available. Please make sure it is correctly installed.
21 GOTO END
22 GOTO END
22 )
23 )
23 MD build\doctrees 2>NUL
24 MD build\doctrees 2>NUL
24 MD build\%1 || GOTO DIR_EXIST
25 MD build\%1 || GOTO DIR_EXIST
25 %SPHINXBUILD% -b %1 %ALLSPHINXOPTS% build\%1
26 %SPHINXBUILD% -b %1 %ALLSPHINXOPTS% build\%1
26 IF NOT ERRORLEVEL 0 GOTO ERROR
27 IF NOT ERRORLEVEL 0 GOTO ERROR
27 ECHO.
28 ECHO.
28 ECHO Build finished. Results are in build\%1.
29 ECHO Build finished. Results are in build\%1.
29 IF "%1" == "pickle" (
30 IF "%1" == "pickle" (
30 ECHO Now you can process the pickle files or run
31 ECHO Now you can process the pickle files or run
31 ECHO sphinx-web build\pickle to start the sphinx-web server.
32 ECHO sphinx-web build\pickle to start the sphinx-web server.
32 )
33 )
33 IF "%1" == "htmlhelp" (
34 IF "%1" == "htmlhelp" (
34 ECHO Now you can run HTML Help Workshop with the
35 ECHO Now you can run HTML Help Workshop with the
35 ECHO .hhp project file in build/htmlhelp.
36 ECHO .hhp project file in build/htmlhelp.
36 )
37 )
37 IF "%1" == "linkcheck" (
38 IF "%1" == "linkcheck" (
38 ECHO Look for any errors in the above output
39 ECHO Look for any errors in the above output
39 ECHO or in build\linkcheck\output.rst.
40 ECHO or in build\linkcheck\output.rst.
40 )
41 )
41 GOTO END
42 GOTO END
42 )
43 )
43 )
44 )
44
45
45 IF "%1" == "clean" (
46 IF "%1" == "clean" (
47 %JSDOC% -c jsdoc_config.json -d ./build/jsapi_html/
48 )
49
50 IF "%1" == "jsapi" (
46 RD /s /q build dist %SRCDIR%\api\generated 2>NUL
51 RD /s /q build dist %SRCDIR%\api\generated 2>NUL
47 IF ERRORLEVEL 0 ECHO Build environment cleaned!
52 IF ERRORLEVEL 0 ECHO Build environment cleaned!
48 GOTO END
53 GOTO END
49 )
54 )
50
55
51 ECHO.
56 ECHO.
52 ECHO Please use "make [target]" where [target] is one of:
57 ECHO Please use "make [target]" where [target] is one of:
53 ECHO.
58 ECHO.
54 ECHO html to make standalone HTML files
59 ECHO html to make standalone HTML files
60 ECHO jsapi to make standalone HTML files for the Javascript API
55 ECHO pickle to make pickle files (usable by e.g. sphinx-web)
61 ECHO pickle to make pickle files (usable by e.g. sphinx-web)
56 ECHO htmlhelp to make HTML files and a HTML help project
62 ECHO htmlhelp to make HTML files and a HTML help project
57 ECHO latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
63 ECHO latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
58 ECHO changes to make an overview over all changed/added/deprecated items
64 ECHO changes to make an overview over all changed/added/deprecated items
59 ECHO linkcheck to check all external links for integrity
65 ECHO linkcheck to check all external links for integrity
60 GOTO END
66 GOTO END
61
67
62 :DIR_EXIST
68 :DIR_EXIST
63 ECHO.
69 ECHO.
64 ECHO Info: Run "make clean" to clean build environment
70 ECHO Info: Run "make clean" to clean build environment
65
71
66 :ERROR
72 :ERROR
67 ECHO.
73 ECHO.
68 ECHO Error: Build process failed!
74 ECHO Error: Build process failed!
69
75
70 :END
76 :END
71 ENDLOCAL No newline at end of file
77 ENDLOCAL
General Comments 0
You need to be logged in to leave comments. Login now