Skip to content

Commit 853feed

Browse files
authored
Merge pull request #38 from open-resources/add-more-stats-helpers
Add more stats helpers
2 parents c9c0666 + 24d009e commit 853feed

File tree

10 files changed

+529
-218
lines changed

10 files changed

+529
-218
lines changed

.readthedocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ build:
1111
python:
1212
install:
1313
- requirements: docs/requirements.txt
14+
- method: pip
15+
path: .
1416

1517
sphinx:
1618
configuration: docs/source/conf.py

docs/source/api.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
.. py:module:: problem_bank_helpers
2+
3+
=============
4+
API Reference
5+
=============
6+
7+
problem_bank_helpers
8+
--------------------
9+
10+
All the functions and classes available in the `problem_bank_helpers` module
11+
are available by importing the module itself. For example::
12+
13+
import problem_bank_helpers as pbh
14+
15+
You do not need to import this sub-module directly, it re-exported at the module level.
16+
17+
.. automodule:: problem_bank_helpers.problem_bank_helpers
18+
:members:
19+
:undoc-members:
20+
:show-inheritance:
21+
22+
stats
23+
-----
24+
25+
All of the functions available in the `stats` sub-module are available by importing the module itself. For example::
26+
27+
import problem_bank_helpers as pbh
28+
pbh.stats
29+
30+
.. automodule:: problem_bank_helpers.stats
31+
:members:
32+
:undoc-members:
33+
:show-inheritance:

docs/source/conf.py

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,62 @@
1616
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
1717
# ones.
1818
extensions = [
19-
"autoapi.extension",
19+
"nbsphinx",
2020
"sphinx.ext.napoleon",
21+
"sphinx.ext.autodoc",
2122
"sphinx.ext.viewcode",
22-
"nbsphinx",
23+
"sphinx.ext.intersphinx",
24+
"matplotlib.sphinxext.plot_directive",
2325
]
24-
autoapi_type = "python"
25-
autoapi_dirs = ["../../src"]
26-
napoleon_numpy_docstring = True
26+
2727
nbsphinx_execute = "always"
28+
autodoc_member_order = "bysource"
29+
autodoc_typehints = "none"
30+
31+
# Napoleon settings
32+
napoleon_use_admonition_for_examples = True
33+
napoleon_use_admonition_for_notes = True
34+
napoleon_use_admonition_for_references = True
35+
36+
plot_pre_code = """
37+
import numpy as np
38+
import matplotlib.pyplot as plt
39+
import problem_bank_helpers as pbh
40+
"""
41+
plot_formats = ["png"]
42+
plot_include_source = True
43+
plot_html_show_source_link = False
44+
plot_html_show_formats = False
2845

2946
# List of patterns, relative to source directory, that match files and
3047
# directories to ignore when looking for source files.
3148
# This pattern also affects html_static_path and html_extra_path.
3249
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
3350

51+
# Links used for cross-referencing stuff in other documentation
52+
intersphinx_mapping = {
53+
"py": ("https://docs.python.org/3", None),
54+
"mpl": ("https://matplotlib.org/stable", None),
55+
}
56+
57+
show_warning_types = True
58+
59+
nitpick_ignore = [
60+
("py:class", "optional"),
61+
("py:class", "number"),
62+
# ("py:class", "float/str"),
63+
# ("py:class", "color"),
64+
# ("py:class", "x; μ"),
65+
# ("py:class", "\u03C3"),
66+
# ("py:class", "'"),
67+
]
68+
69+
# nitpick_ignore_regex = [
70+
# ("py:class", r".*2 floats"),
71+
# ("py:class", r"\d"),
72+
# ("py:class", r"default:.*"),
73+
# ]
74+
3475
# -- Options for HTML output -------------------------------------------------
3576

3677
# The theme to use for HTML and HTML Help pages. See the documentation for

docs/source/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ To get started, check out the sections below:
1212
installation
1313
usage
1414
contributing
15-
conduct
15+
conduct
16+
api

poetry.lock

Lines changed: 92 additions & 81 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ python = ">=3.10"
1515
sigfig = "^1.3.3"
1616
numpy = "^1.26.4"
1717
pandas = "^2.2.2"
18-
matplotlib = "^3.9.1"
18+
matplotlib = "^3.9.2"
1919
scipy = "^1.14.0"
2020

2121
[tool.poetry.group.dev.dependencies]
22-
pytest = "^8.2.2"
22+
pytest = "^8.3.2"
2323

2424
[build-system]
2525
requires = ["poetry-core>=1.0.0"]

0 commit comments

Comments
 (0)