Skip to content
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
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ build:
python:
install:
- requirements: docs/requirements.txt
- method: pip
path: .

sphinx:
configuration: docs/source/conf.py
33 changes: 33 additions & 0 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. py:module:: problem_bank_helpers

=============
API Reference
=============

problem_bank_helpers
--------------------

All the functions and classes available in the `problem_bank_helpers` module
are available by importing the module itself. For example::

import problem_bank_helpers as pbh

You do not need to import this sub-module directly, it re-exported at the module level.

.. automodule:: problem_bank_helpers.problem_bank_helpers
:members:
:undoc-members:
:show-inheritance:

stats
-----

All of the functions available in the `stats` sub-module are available by importing the module itself. For example::

import problem_bank_helpers as pbh
pbh.stats

.. automodule:: problem_bank_helpers.stats
:members:
:undoc-members:
:show-inheritance:
51 changes: 46 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,62 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"autoapi.extension",
"nbsphinx",
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"nbsphinx",
"sphinx.ext.intersphinx",
"matplotlib.sphinxext.plot_directive",
]
autoapi_type = "python"
autoapi_dirs = ["../../src"]
napoleon_numpy_docstring = True

nbsphinx_execute = "always"
autodoc_member_order = "bysource"
autodoc_typehints = "none"

# Napoleon settings
napoleon_use_admonition_for_examples = True
napoleon_use_admonition_for_notes = True
napoleon_use_admonition_for_references = True

plot_pre_code = """
import numpy as np
import matplotlib.pyplot as plt
import problem_bank_helpers as pbh
"""
plot_formats = ["png"]
plot_include_source = True
plot_html_show_source_link = False
plot_html_show_formats = False

# 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 = ["_build", "Thumbs.db", ".DS_Store"]

# Links used for cross-referencing stuff in other documentation
intersphinx_mapping = {
"py": ("https://docs.python.org/3", None),
"mpl": ("https://matplotlib.org/stable", None),
}

show_warning_types = True

nitpick_ignore = [
("py:class", "optional"),
("py:class", "number"),
# ("py:class", "float/str"),
# ("py:class", "color"),
# ("py:class", "x; μ"),
# ("py:class", "\u03C3"),
# ("py:class", "'"),
]

# nitpick_ignore_regex = [
# ("py:class", r".*2 floats"),
# ("py:class", r"\d"),
# ("py:class", r"default:.*"),
# ]

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ To get started, check out the sections below:
installation
usage
contributing
conduct
conduct
api
173 changes: 92 additions & 81 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ python = ">=3.10"
sigfig = "^1.3.3"
numpy = "^1.26.4"
pandas = "^2.2.2"
matplotlib = "^3.9.1"
matplotlib = "^3.9.2"
scipy = "^1.14.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
pytest = "^8.3.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
Loading