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

Better integration of sphinx gallery #5

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ jobs:
conda-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
- name: Build
shell: bash -l {0}
run: |
conda install -y openturns numpy pytest numpydoc sphinx sphinx-gallery sphinx_rtd_theme pandoc flake8 "matplotlib<3.7"
conda install -y openturns numpy pytest numpydoc sphinx sphinx-gallery sphinx_rtd_theme pandoc flake8 matplotlib
flake8 --max-line-length=120
python setup.py install
pytest
Expand Down
20 changes: 5 additions & 15 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,9 @@
]

sphinx_gallery_conf = {
"examples_dirs": ["examples"], # path to
# example scripts
"gallery_dirs": ["auto_example"],
"filename_pattern": "/plot_",
"run_stale_examples": True,
"show_signature": False,
# directory where function/class granular galleries are stored
"backreferences_dir": "gen_modules/backreferences",
# Modules for which function/class level galleries are created.
"doc_module": ("openturns"),
# objects to exclude from implicit backreferences. The default option
# is an empty set, i.e. exclude nothing.
"exclude_implicit_doc": {},
'examples_dirs': ['examples'],
'gallery_dirs': ['auto_examples'],
'show_signature': False,
}

autodoc_default_options = {
Expand All @@ -72,7 +62,7 @@
extensions.append("matplotlib.sphinxext.plot_directive")

intersphinx_mapping = {
"python": ("http://openturns.github.io/openturns/1.18", "openturns-objects.inv")
"python": ("http://openturns.github.io/openturns/1.22", "openturns-objects.inv")
}
autosummary_generate = True

Expand All @@ -91,7 +81,7 @@

# General information about the project.
project = u"ottemplate"
copyright = u"2005-2023 Airbus-EDF-IMACS-ONERA-Phimeca"
copyright = u"2005-2024 Airbus-EDF-IMACS-ONERA-Phimeca"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
Expand Down
2 changes: 2 additions & 0 deletions doc/examples/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Examples
========
10 changes: 0 additions & 10 deletions doc/examples/examples.rst

This file was deleted.

1 change: 1 addition & 0 deletions doc/examples/plot_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Example : Using ottemplatepython module
---------------------------------------
"""

# %%
# This example aims to illustrate how to use the module.

Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ User documentation
:maxdepth: 2

user_manual/user_manual
examples/examples
../auto_examples/index.rst

Developer guide
---------------
Expand Down
Binary file modified doc/openturns-objects.inv
Binary file not shown.
Loading