diff --git a/docs/source/_static/params.css b/docs/source/_static/params.css deleted file mode 100644 index dc5cb96406..0000000000 --- a/docs/source/_static/params.css +++ /dev/null @@ -1,9 +0,0 @@ -/* Mirrors the change in: - * https://github.com/sphinx-doc/sphinx/pull/5976 - * which is not showing up in our theme. - */ -.classifier:before { - font-style: normal; - margin: 0.5em; - content: ":"; -} diff --git a/docs/source/conf.py b/docs/source/conf.py index 9d3764853d..630e1ff71e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,11 +23,11 @@ # directory, add these directories to sys.path here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. -sys.path.insert(0, os.path.abspath('sphinxext')) -sys.path.insert(0, os.path.abspath('../../python/raft')) -sys.path.insert(0, os.path.abspath('../../python/pylibraft')) +sys.path.insert(0, os.path.abspath("sphinxext")) +sys.path.insert(0, os.path.abspath("../../python/raft")) +sys.path.insert(0, os.path.abspath("../../python/pylibraft")) -from github_link import make_linkcode_resolve # noqa +from github_link import make_linkcode_resolve # noqa # -- General configuration ------------------------------------------------ @@ -40,12 +40,12 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'numpydoc', - 'sphinx.ext.autodoc', - 'sphinx.ext.autosummary', - 'sphinx.ext.doctest', - 'sphinx.ext.intersphinx', - 'sphinx.ext.linkcode', + "numpydoc", + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "sphinx.ext.doctest", + "sphinx.ext.intersphinx", + "sphinx.ext.linkcode", "IPython.sphinxext.ipython_console_highlighting", "IPython.sphinxext.ipython_directive", "breathe", @@ -60,7 +60,7 @@ ipython_mplbackend = "str" # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # generate autosummary even if no references # autosummary_generate = True @@ -72,28 +72,28 @@ source_suffix = {".rst": "restructuredtext", ".md": "markdown"} # The master toctree document. -master_doc = 'index' +master_doc = "index" # General information about the project. -project = 'raft' -copyright = '2022, nvidia' -author = 'nvidia' +project = "raft" +copyright = "2022, nvidia" +author = "nvidia" # 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. # # The short X.Y version. -version = '22.08' +version = "22.08" # The full version, including alpha/beta/rc tags. -release = '22.08.00' +release = "22.08.00" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = 'en' +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -101,7 +101,7 @@ exclude_patterns = [] # The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' +pygments_style = "sphinx" # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False @@ -112,17 +112,18 @@ # a list of builtin themes. # -html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx_rtd_theme" # on_rtd is whether we are on readthedocs.org -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +on_rtd = os.environ.get("READTHEDOCS", None) == "True" if not on_rtd: # only import and set the theme if we're building docs locally # otherwise, readthedocs.org uses their theme by default, # so no need to specify it import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' + + html_theme = "sphinx_rtd_theme" html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme @@ -134,14 +135,14 @@ # 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 = ['_static'] +html_static_path = ["_static"] html_js_files = ["example_mod.js"] # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. -htmlhelp_basename = 'raftdoc' +htmlhelp_basename = "raftdoc" # -- Options for LaTeX output --------------------------------------------- @@ -149,15 +150,12 @@ # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # # 'preamble': '', - # Latex figure (float) alignment # # 'figure_align': 'htbp', @@ -167,14 +165,14 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - (master_doc, 'raft.tex', 'RAFT Documentation', 'nvidia', 'manual'), + (master_doc, "raft.tex", "RAFT Documentation", "nvidia", "manual"), ] # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, 'raft', 'RAFT Documentation', [author], 1)] +man_pages = [(master_doc, "raft", "RAFT Documentation", [author], 1)] # -- Options for Texinfo output ------------------------------------------- @@ -182,14 +180,21 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'raft', 'RAFT Documentation', author, 'raft', - 'One line description of project.', 'Miscellaneous'), + ( + master_doc, + "raft", + "RAFT Documentation", + author, + "raft", + "One line description of project.", + "Miscellaneous", + ), ] # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { - "python": ('https://docs.python.org/', None), - "scipy": ('https://docs.scipy.org/doc/scipy/reference', None) + "python": ("https://docs.python.org/", None), + "scipy": ("https://docs.scipy.org/doc/scipy/reference", None), } # Config numpydoc @@ -198,17 +203,22 @@ def setup(app): - app.add_css_file('copybutton.css') - app.add_css_file('infoboxes.css') - app.add_css_file('params.css') - app.add_css_file('references.css') + app.add_css_file("copybutton.css") + app.add_css_file("infoboxes.css") + app.add_css_file("references.css") + app.add_css_file("https://docs.rapids.ai/assets/css/custom.css") + app.add_js_file( + "https://docs.rapids.ai/assets/js/custom.js", loading_method="defer" + ) # The following is used by sphinx.ext.linkcode to provide links to github linkcode_resolve = make_linkcode_resolve( - 'raft', 'https://github.com/rapidsai/raft' - 'raft/blob/{revision}/python/' - '{package}/{path}#L{lineno}') + "raft", + "https://github.com/rapidsai/raft" + "raft/blob/{revision}/python/" + "{package}/{path}#L{lineno}", +) # Set the default role for interpreted code (anything surrounded in `single # backticks`) to be a python object. See