|
90 | 90 | "cell_type": "markdown",
|
91 | 91 | "metadata": {},
|
92 | 92 | "source": [
|
93 |
| - "We're going to document our \"greeter\" example using docstrings with Sphinx.\n", |
| 93 | + "We're going to document our \"greeter\" example from the previous section using docstrings with Sphinx.\n", |
94 | 94 | "\n",
|
95 |
| - "There are various conventions for how to write docstrings, but the native sphinx one doesn't look nice when used with\n", |
| 95 | + "There are various conventions for how to write docstrings, but the native Sphinx one doesn't look nice when used with\n", |
96 | 96 | "the built in `help` system.\n",
|
97 | 97 | "\n",
|
98 | 98 | "In writing Greeter, we used the docstring conventions from NumPy.\n",
|
99 | 99 | "So we use the [numpydoc](https://numpydoc.readthedocs.io/en/latest/) sphinx extension to \n",
|
100 |
| - "support these." |
| 100 | + "support these (Note: you will need to install this extension for the later examples to work)." |
101 | 101 | ]
|
102 | 102 | },
|
103 | 103 | {
|
|
134 | 134 | "cell_type": "markdown",
|
135 | 135 | "metadata": {},
|
136 | 136 | "source": [
|
137 |
| - "### Set up sphinx" |
| 137 | + "### Set up Sphinx" |
| 138 | + ] |
| 139 | + }, |
| 140 | + { |
| 141 | + "cell_type": "markdown", |
| 142 | + "metadata": {}, |
| 143 | + "source": [ |
| 144 | + "Install Sphinx using the [appropiate instructions](https://www.sphinx-doc.org/en/master/usage/installation.html) for your system following the documentation online.\n", |
| 145 | + "(Note that your output and the linked documentation may differ slightly depending on when you installed Sphinx and what version you're using.)" |
138 | 146 | ]
|
139 | 147 | },
|
140 | 148 | {
|
141 | 149 | "cell_type": "markdown",
|
142 | 150 | "metadata": {},
|
143 | 151 | "source": [
|
144 | 152 | "\n",
|
145 |
| - "Invoke the [sphinx-quickstart](https://www.sphinx-doc.org/en/latest/usage/quickstart.html) command to build Sphinx's\n", |
| 153 | + "Invoke the [sphinx-quickstart](https://www.sphinx-doc.org/en/master/usage/quickstart.html) command to build Sphinx's\n", |
146 | 154 | "configuration file automatically based on questions\n",
|
147 |
| - "at the command line:\n" |
| 155 | + "at the command line:" |
148 | 156 | ]
|
149 | 157 | },
|
150 | 158 | {
|
|
168 | 176 | "metadata": {},
|
169 | 177 | "source": [
|
170 | 178 | "```\n",
|
171 |
| - "Welcome to the Sphinx 1.8.0 quickstart utility.\n", |
| 179 | + "Welcome to the Sphinx 3.3.0 quickstart utility.\n", |
172 | 180 | "\n",
|
173 |
| - "Please enter avalues for the following settings (just press Enter to\n", |
| 181 | + "Please enter values for the following settings (just press Enter to\n", |
174 | 182 | "accept a default value, if one is given in brackets).\n",
|
175 | 183 | "\n",
|
176 |
| - "Enter the root path for documentation.\n", |
177 |
| - "> Root path for the documentation [.]:\n", |
| 184 | + "Selected root path: .\n", |
| 185 | + "\n", |
| 186 | + "You have two options for placing the build directory for Sphinx output.\n", |
| 187 | + "Either, you use a directory \"_build\" within the root path, or you separate\n", |
| 188 | + "\"source\" and \"build\" directories within the root path.\n", |
| 189 | + "> Separate source and build directories (y/n) [n]:\n", |
178 | 190 | "```"
|
179 | 191 | ]
|
180 | 192 | },
|
|
215 | 227 | "cell_type": "code",
|
216 | 228 | "execution_count": 1,
|
217 | 229 | "metadata": {
|
218 |
| - "collapsed": false |
| 230 | + "collapsed": false, |
| 231 | + "jupyter": { |
| 232 | + "outputs_hidden": false |
| 233 | + } |
219 | 234 | },
|
220 | 235 | "outputs": [
|
221 | 236 | {
|
|
295 | 310 | "cell_type": "code",
|
296 | 311 | "execution_count": 2,
|
297 | 312 | "metadata": {
|
298 |
| - "collapsed": false |
| 313 | + "collapsed": false, |
| 314 | + "jupyter": { |
| 315 | + "outputs_hidden": false |
| 316 | + } |
299 | 317 | },
|
300 | 318 | "outputs": [
|
301 | 319 | {
|
|
335 | 353 | "cell_type": "code",
|
336 | 354 | "execution_count": 3,
|
337 | 355 | "metadata": {
|
338 |
| - "collapsed": false |
| 356 | + "collapsed": false, |
| 357 | + "jupyter": { |
| 358 | + "outputs_hidden": false |
| 359 | + } |
339 | 360 | },
|
340 | 361 | "outputs": [
|
341 | 362 | {
|
|
348 | 369 | {
|
349 | 370 | "name": "stderr",
|
350 | 371 | "output_type": "stream",
|
351 |
| - "text": [ |
352 |
| - ] |
| 372 | + "text": [] |
353 | 373 | }
|
354 | 374 | ],
|
355 | 375 | "source": [
|
|
513 | 533 | "name": "python",
|
514 | 534 | "nbconvert_exporter": "python",
|
515 | 535 | "pygments_lexer": "ipython3",
|
516 |
| - "version": "3.7.3" |
| 536 | + "version": "3.8.5" |
517 | 537 | }
|
518 | 538 | },
|
519 | 539 | "nbformat": 4,
|
520 |
| - "nbformat_minor": 0 |
| 540 | + "nbformat_minor": 4 |
521 | 541 | }
|
0 commit comments