Skip to content

Commit

Permalink
Merge pull request #704 from Universite-Gustave-Eiffel/fix_readthedocs
Browse files Browse the repository at this point in the history
Fix readthedocs
  • Loading branch information
nicolas-f authored Nov 20, 2024
2 parents 429923e + 8e2ad6c commit 9e31ac9
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 38 deletions.
8 changes: 8 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ sphinx:
formats:
- pdf
- htmlzip

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: Docs/requirements.txt
- method: pip
path: .

54 changes: 16 additions & 38 deletions Docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.duration",
'sphinx.ext.autodoc',
"sphinx.ext.doctest",
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
Expand All @@ -50,8 +52,15 @@
'sphinx_rtd_theme',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = []

intersphinx_mapping = {
"rtd": ("https://docs.readthedocs.io/en/stable/", None),
"python": ("https://docs.python.org/3/", None),
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
}
intersphinx_disabled_domains = ["std"]

templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
Expand All @@ -71,8 +80,8 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path .
exclude_patterns = []
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
Expand All @@ -87,33 +96,13 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
import os
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd: # only import and set the theme if we're building docs locally
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
html_theme = "sphinx_rtd_theme"


# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}

html_static_path = ["_static"]

# -- Options for HTMLHelp output ---------------------------------------------

Expand Down Expand Up @@ -171,16 +160,5 @@
'Miscellaneous'),
]


# -- Extension configuration -------------------------------------------------

# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'python': ('https://docs.python.org/3',
'python-inv.txt')}

# -- Options for todo extension ----------------------------------------------

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
58 changes: 58 additions & 0 deletions Docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile docs/requirements.in
#
alabaster==0.7.12
# via sphinx
babel==2.10.3
# via sphinx
certifi==2022.6.15
# via requests
charset-normalizer==2.1.0
# via requests
docutils==0.17.1
# via
# sphinx
# sphinx-rtd-theme
idna==3.3
# via requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.2
# via sphinx
markupsafe==2.1.1
# via jinja2
packaging==21.3
# via sphinx
pygments==2.12.0
# via sphinx
pyparsing==3.0.9
# via packaging
pytz==2022.1
# via babel
requests==2.28.1
# via sphinx
snowballstemmer==2.2.0
# via sphinx
sphinx==5.0.2
# via
# -r docs/requirements.in
# sphinx-rtd-theme
sphinx-rtd-theme==1.0.0
# via -r docs/requirements.in
sphinxcontrib-applehelp==1.0.2
# via sphinx
sphinxcontrib-devhelp==1.0.2
# via sphinx
sphinxcontrib-htmlhelp==2.0.0
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
urllib3==1.26.9
# via requests

0 comments on commit 9e31ac9

Please sign in to comment.