Skip to content

Commit 81fbb0a

Browse files
committed
fix: replace makefile with sphinx-build
1 parent b7a20d6 commit 81fbb0a

File tree

7 files changed

+9
-69
lines changed

7 files changed

+9
-69
lines changed

.github/workflows/doc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ jobs:
2828
TOKEN: ${{ secrets.TOKEN }}
2929
run: |
3030
sed -i '/nb_execution_mode = "off"/d' doc/source/conf.py # enable executing jupyter notebook
31-
cd doc
32-
make html
31+
sphinx-build -W doc/source doc/build/html
3332
3433
- name: Remove ampersand encoding and token in the generated html
3534
run: |

CONTRIBUTING.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,24 +180,18 @@ $ pip install -e .[doc]
180180
### Building doc
181181

182182
```shell
183-
$ cd doc
184-
$ make html
185-
# For Windows, use ".\make html" or "doc\make html" without cd
183+
$ sphinx-build -W doc/source doc/build/html
186184
```
187185

188-
Sometimes you need to clean the build folder to force a rebuild.
189-
190-
```shell
191-
$ make clean
192-
# For Windows, use ".\make clean" or "doc\make html" without cd
193-
```
186+
`-W` makes the build stop at the first warning.
187+
Another useful flag is `-E`, which forces rebuilding the structure caching all references completely.
194188

195189
There is a Sphinx extension called [sphinx-autobuild](https://github.com/executablebooks/sphinx-autobuild)
196190
to watch a Sphinx directory and rebuild the documentation when a change is detected.
197191
It also includes a live-reload web server.
198192

199193
```shell
200-
$ sphinx-autobuild doc/source doc/build/html --watch "*.md" --watch src
194+
$ sphinx-autobuild -W doc/source doc/build/html --watch "*.md" --watch src
201195
```
202196

203197
Or use tox

doc/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

doc/make.bat

Lines changed: 0 additions & 35 deletions
This file was deleted.

doc/source/Tutorial/onc_Library_Tutorial.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
"cell_type": "markdown",
1212
"metadata": {},
1313
"source": [
14-
"The _onc_ library is developed based on the _requests_ library, which is a popular library for making HTTP requests in Python. In fact, you can use _requests_ alone to interact with the Oceans 3.0 API. But there are cases when you will find the _onc_ library very handy to use (boolean parse, one-click data product download, ability to automatically download all pages, etc.). The tutorial will demonstrate both versions.\n"
14+
"The _onc_ library is developed based on the _requests_ library, which is a popular library for making HTTP requests in Python. In fact, you can use _requests_ alone to interact with the Oceans 3.0 API. But there are cases when you will find the _onc_ library very handy to use (boolean parse, one-click data product download, ability to automatically download all pages, etc.). The tutorial will demonstrate both versions.\n",
15+
"\n",
16+
"This is a Jupyter notebook. You can download the file [here](https://github.com/OceanNetworksCanada/api-python-client/blob/main/doc/source/Tutorial/onc_Library_Tutorial.ipynb).\n"
1517
]
1618
},
1719
{

doc/source/favicon.ico

-318 Bytes
Binary file not shown.

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ deps =
5050
sphinx-autoapi
5151
sphinx_copybutton
5252
sphinx_rtd_theme
53-
commands = sphinx-autobuild doc/source doc/build/html --watch "*.md" --watch src
53+
commands = sphinx-autobuild -W doc/source doc/build/html --watch "*.md" --watch src
5454

5555
[gh]
5656
python =

0 commit comments

Comments
 (0)