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

Replace Sphinx napoleon for numpydoc #84

Merged
merged 2 commits into from
May 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
13 changes: 7 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"numpydoc",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.doctest",
"sphinx.ext.viewcode",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx_design",
"sphinx_copybutton",
"jupyter_sphinx",
Expand All @@ -45,11 +45,12 @@
# Autosummary pages will be generated by sphinx-autogen instead of sphinx-build
autosummary_generate = []

# Otherwise, the Return parameter list looks different from the Parameters list
napoleon_use_rtype = False
# Otherwise, the Attributes parameter list looks different from the Parameters
# list
napoleon_use_ivar = True
# Create cross-references for the parameter types in the Parameters, Other
# Returns and Yields sections of the docstring
numpydoc_xref_param_type = True

# Format the Attributes section like the Parameters section.
numpydoc_attributes_as_param_list = True

# Sphinx project configuration
templates_path = ["_templates"]
Expand Down
1 change: 1 addition & 0 deletions env/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Requirements for building the documentation
sphinx==7.2.*
numpydoc==1.7.*
sphinx-book-theme==1.1.*
sphinx-copybutton==0.5.*
sphinx-design==0.5.*
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies:
- coverage
# Documentation
- sphinx==7.2.*
- numpydoc==1.7.*
- sphinx-book-theme==1.1.*
- sphinx-copybutton==0.5.*
- sphinx-design==0.5.*
Expand Down
Loading