Skip to content

Commit

Permalink
Merge pull request #341 from skoudoro/doc-without-examples
Browse files Browse the repository at this point in the history
Add Option to generate the documentation without examples
  • Loading branch information
Garyfallidis committed Dec 3, 2020
2 parents ffb5da8 + 480e529 commit ce9608a
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 5 deletions.
8 changes: 8 additions & 0 deletions docs/Makefile
Expand Up @@ -21,10 +21,18 @@ clean:
rm -rf "$(SOURCEDIR)/reference"
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) clean

html-no-examples:
$(SPHINXBUILD) -D plot_gallery=0 -b html $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html"
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

upload:
python upload_to_gh-pages.py

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@echo $@
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)."
20 changes: 17 additions & 3 deletions docs/README.md
Expand Up @@ -4,7 +4,7 @@

- ``source``: Contains main *.rst files
- ``tutorials``: python script describe how to use the api
- ``examples``: Fury app showcases
- ``examples``: Fury app showcases
- ``build``: Contains the generated documentation

## Doc generation steps:
Expand All @@ -19,15 +19,29 @@ $ pip install -U -r requirements/docs.txt

### Generate all the Documentation

Go to the `docs` folder and run the following commands to generate it.

#### Under Linux and OSX

```bash
$ make -C . clean && make -C . html
```

To generate the documentation without running the examples:

```bash
$ make -C . clean && make -C . html-no-examples
```
#### Under Windows

```bash
$ ./make.bat clean
$ ./make.bat html
$ make clean
$ make html
```

To generate the documentation without running the examples:

```bash
$ make clean
$ make html-no-examples
```
6 changes: 6 additions & 0 deletions docs/make.bat
Expand Up @@ -46,6 +46,12 @@ if "%1" == "upload" (
exit /B
)

if "%1" == "html-no-examples" (
%SPHINXBUILD% -D plot_gallery=0 -b html %SPHINXOPTS% "%SOURCEDIR%" "%BUILDDIR%/html"
echo "Build finished. The HTML pages are in %BUILDDIR%"
exit /B
)


%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
Expand Down
13 changes: 11 additions & 2 deletions docs/source/installation.rst
Expand Up @@ -155,10 +155,19 @@ Building the documentation

$ make -C . clean && make -C . html

To generate the documentation without running the examples::

$ make -C . clean && make -C . html-no-examples

or under Windows::

$ ./make.bat clean
$ ./make.bat html
$ make clean
$ make html

To generate the documentation without running the examples under Windows::

$ make clean
$ make html-no-examples


**Step 3.** Congratulations! the ``build`` folder has been generated! Go to ``build/html`` and open with browser ``index.html`` to see your generated documentation.

0 comments on commit ce9608a

Please sign in to comment.