Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Option to generate the documentation without examples #341

Merged
merged 3 commits into from Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)."
14 changes: 13 additions & 1 deletion 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 @@ -25,9 +25,21 @@ $ pip install -U -r requirements/docs.txt
$ 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
```

To generate the documentation without running the examples:

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

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


%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
Expand Down
9 changes: 9 additions & 0 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

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

$ ./make.bat clean
$ ./make.bat 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.