11# -*- coding: utf-8 -*-
2- import sys
32import os
4-
5- import pydata_sphinx_theme # Pydata theme: https://pydata-sphinx-theme.readthedocs.io/en/stable/index.html
6-
3+ import sys
74from importlib .metadata import metadata
8- project = 'visualea'
9- meta = metadata ('openalea.' + project )
5+
6+ project = "visualea"
7+ meta = metadata ("openalea." + project )
108release = meta .get ("version" )
119# for example take major/minor
12- version = "." .join (release .split ('.' )[:3 ])
13- author = meta [' Author' ].split (' <' )[0 ]
14- desc = meta [' Summary' ]
15- urls = {k :v for k ,v in [item .split (',' ) for item in meta .get_all (' Project-URL' )]}
10+ version = "." .join (release .split ("." )[:3 ])
11+ author = meta [" Author" ].split (" <" )[0 ]
12+ desc = meta [" Summary" ]
13+ urls = {k : v for k , v in [item .split ("," ) for item in meta .get_all (" Project-URL" )]}
1614
1715
1816# If extensions (or modules to document with autodoc) are in another directory,
1917# add these directories to sys.path here. If the directory is relative to the
2018# documentation root, use os.path.abspath to make it absolute, like shown here.
2119# sys.path.insert(0, os.path.abspath('.'))
22- sys .path .insert (0 , os .path .abspath ('..' )) # to include the root of the package
20+ sys .path .insert (0 , os .path .abspath (".." )) # to include the root of the package
2321
2422# -- General configuration ------------------------------------------------
2523# Add any Sphinx extension module names here, as strings. They can be
2624# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2725# ones.
2826extensions = [
29- ' sphinx.ext.autodoc' , # support for automatic inclusion of docstring
30- ' sphinx.ext.autosummary' , # generates autodoc summaries
31- ' sphinx.ext.doctest' , # inclusion and testing of doctest code snippets
32- ' sphinx.ext.intersphinx' , # support for linking to other projects
33- ' sphinx.ext.mathjax' , # support for math equations
34- ' sphinx.ext.ifconfig' , # support for conditional content
35- ' sphinx.ext.viewcode' , # support for links to source code
36- ' sphinx.ext.coverage' , # includes doc coverage stats in the documentation
37- ' sphinx.ext.todo' , # support for todo items
38- ' sphinx.ext.napoleon' , # support for numpy and google style docstrings
39- "sphinx_favicon" , # support for favicon
40- "sphinx_copybutton" , # support for copybutton in code blocks
41- "nbsphinx" , # for integrating jupyter notebooks
42- "myst_parser" # for parsing .md files
27+ " sphinx.ext.autodoc" , # support for automatic inclusion of docstring
28+ " sphinx.ext.autosummary" , # generates autodoc summaries
29+ " sphinx.ext.doctest" , # inclusion and testing of doctest code snippets
30+ " sphinx.ext.intersphinx" , # support for linking to other projects
31+ " sphinx.ext.mathjax" , # support for math equations
32+ " sphinx.ext.ifconfig" , # support for conditional content
33+ " sphinx.ext.viewcode" , # support for links to source code
34+ " sphinx.ext.coverage" , # includes doc coverage stats in the documentation
35+ " sphinx.ext.todo" , # support for todo items
36+ " sphinx.ext.napoleon" , # support for numpy and google style docstrings
37+ "sphinx_favicon" , # support for favicon
38+ "sphinx_copybutton" , # support for copybutton in code blocks
39+ "nbsphinx" , # for integrating jupyter notebooks
40+ "myst_parser" , # for parsing .md files
4341]
4442# Add any paths that contain templates here, relative to this directory.
45- templates_path = [' _templates' ]
43+ templates_path = [" _templates" ]
4644autosummary_generate = True
47- exclude_patterns = [' build' , ' _build' , ' _templates' ]
45+ exclude_patterns = [" build" , " _build" , " _templates" ]
4846# The suffix(es) of source filenames.
4947# You can specify multiple suffix as a list of string:
5048source_suffix = {
51- ' .rst' : ' restructuredtext' ,
52- ' .md' : ' markdown' ,
49+ " .rst" : " restructuredtext" ,
50+ " .md" : " markdown" ,
5351}
5452# The master toctree document.
55- master_doc = ' index'
53+ master_doc = " index"
5654# General information about the project.
57- copyright = u' Cecill-C INRAE / INRIA / CIRAD'
55+ copyright = " Cecill-C INRAE / INRIA / CIRAD"
5856# The language for content autogenerated by Sphinx. Refer to documentation
5957# for a list of supported languages.
6058#
6159# This is also used if you do content translation via gettext catalogs.
6260# Usually you set "language" from the command line for these cases.
6361language = "en"
6462# The name of the Pygments (syntax highlighting) style to use.
65- pygments_style = ' sphinx'
63+ pygments_style = " sphinx"
6664# If true, `todo` and `todoList` produce output, else they produce nothing.
6765todo_include_todos = False
6866
6967# -- Options for HTML output ----------------------------------------------
7068# The theme to use for HTML and HTML Help pages. See the documentation for
7169# a list of builtin themes.
72- html_theme = ' pydata_sphinx_theme'
70+ html_theme = " pydata_sphinx_theme"
7371# Theme options are theme-specific and customize the look and feel of a theme
7472# further. For a list of options available for each theme, see the
7573# documentation.
7674html_theme_options = {
77- "header_links_before_dropdown" : 6 ,
78- "sidebarwidth" : 200 ,
79- "sticky_navigation" : "false" ,
80- "collapse_navigation" : "false" ,
81- "display_version" : "true" ,
82- "icon_links" : [
83- {
84- "name" : "GitHub" ,
85- "url" : "https://github.com/openalea/visualea" , # do not want urls['Repository']
86- "icon" : "fa-brands fa-github" ,
87- },
75+ "header_links_before_dropdown" : 6 ,
76+ "sidebarwidth" : 200 ,
77+ "navbar_end" : ["version-switcher" , "navbar-icon-links" ],
78+ "collapse_navigation" : "false" ,
79+ "icon_links" : [
80+ {
81+ "name" : "GitHub" ,
82+ "url" : "https://github.com/openalea/visualea" , # do not want urls['Repository']
83+ "icon" : "fa-brands fa-github" ,
84+ },
8885 ],
8986 "show_version_warning_banner" : True ,
9087 "footer_start" : ["copyright" ],
9491 "examples/no-sidebar" : [],
9592 },
9693 "use_edit_page_button" : True ,
97- }
94+ }
9895# Add any paths that contain custom static files (such as style sheets) here,
9996# relative to this directory. They are copied after the builtin static files,
10097# so a file named "default.css" will overwrite the builtin "default.css".
101- html_static_path = [' _static' ]
98+ html_static_path = [" _static" ]
10299html_logo = "_static/openalea_web.svg"
103100html_favicon = "_static/openalea_web.svg"
104101# If false, no module index is generated.
114111# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
115112html_show_copyright = True
116113# Output file base name for HTML help builder.
117- htmlhelp_basename = project + ' _documentation'
114+ htmlhelp_basename = project + " _documentation"
118115# Add infomation about github repository
119116html_context = {
120117 # "github_url": "https://github.com", # or your GitHub Enterprise site
125122}
126123
127124# -- Options for LaTeX output ---------------------------------------------
128- latex_elements = {
129- }
125+ latex_elements = {}
130126latex_documents = [
131- (master_doc , 'visualea.tex' , u'visualea Documentation' ,
132- u'INRA / INRIA / CIRAD' , 'manual' ),
127+ (
128+ master_doc ,
129+ "visualea.tex" ,
130+ "visualea Documentation" ,
131+ "INRA / INRIA / CIRAD" ,
132+ "manual" ,
133+ ),
133134]
134135
135136# -- Options for manual page output ---------------------------------------
136137# One entry per manual page. List of tuples
137138# (source start file, name, description, authors, manual section).
138- man_pages = [
139- (master_doc , project , project + ' Documentation' ,
140- [author ], 1 )
141- ]
139+ man_pages = [(master_doc , project , project + " Documentation" , [author ], 1 )]
142140
143141# -- Options for Texinfo output -------------------------------------------
144142# Grouping the document tree into Texinfo files. List of tuples
145143# (source start file, target name, title, author,
146144# dir menu entry, description, category)
147145texinfo_documents = [
148- (master_doc , project , project + ' Documentation' ,
149- author , project , desc ,
150- 'Miscellaneous' ),
146+ (
147+ master_doc ,
148+ project ,
149+ project + " Documentation" ,
150+ author ,
151+ project ,
152+ desc ,
153+ "Miscellaneous" ,
154+ ),
151155]
152156# Example configuration for intersphinx: refer to the Python standard library.
153- intersphinx_mapping = {'python' : ('https://docs.python.org/' , None )}
157+ intersphinx_mapping = {"python" : ("https://docs.python.org/" , None )}
158+
0 commit comments