Skip to content

Commit

Permalink
docs: add docstrings in Portfolio
Browse files Browse the repository at this point in the history
  • Loading branch information
chilango74 committed Sep 8, 2021
1 parent fa8bb21 commit 22d2eaa
Show file tree
Hide file tree
Showing 6 changed files with 1,288 additions and 26 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/docs/_build/
/docs/source/
/docs/stubs/
29 changes: 23 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import os
import sys
from os import path

import matplotlib

import okama # isort:skip

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another 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.
#
import os
import sys
from os import path

import okama # isort:skip

root = path.realpath(path.join(path.dirname(__file__), "..", ".."))
sys.path.insert(1, root)
sys.path.append(os.path.abspath('matplotlib_ext'))
# sys.path.insert(0, os.path.abspath("."))


Expand Down Expand Up @@ -54,6 +58,7 @@
# ones.
extensions = [
# "sphinx.ext.napoleon",
'matplotlib.sphinxext.plot_directive',
"numpydoc", # handle NumPy documentation formatted docstrings instead of napoleon
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
Expand Down Expand Up @@ -103,7 +108,7 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

# -- Options for typehints ------------------------------------------------
# -- Options for autodoc ------------------------------------------------

# This value controls how to represents typehints.
autodoc_typehints = "none"
Expand All @@ -114,12 +119,24 @@
# -- Options for numpydoc ------------------------------------------------
numpydoc_attributes_as_param_list = False
numpydoc_show_class_members = False
numpydoc_use_plots = True
numpydoc_class_members_toctree = True

# -- Options for nbsphinx ------------------------------------------------

# nbsphinx do not use requirejs (breaks bootstrap)
nbsphinx_requirejs_path = ""

# matplotlib plot directive settings
plot_html_show_formats = False
plot_include_source = True
plot_html_show_source_link = False
plot_pre_code = """
import numpy as np
from matplotlib import pyplot as plt
import okama as ok
"""

# # Napoleon settings
# napoleon_google_docstring = False
# napoleon_numpy_docstring = True
Expand Down
Binary file added docs/images/ef.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 22d2eaa

Please sign in to comment.