Skip to content

Commit d197409

Browse files
Initial sphinx docs
1 parent 72df273 commit d197409

5 files changed

Lines changed: 160 additions & 0 deletions

File tree

docs/api.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
API Reference
2+
=============
3+
4+
.. automodule:: RISE
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
9+
.. automodule:: RISE.factorization
10+
:members:
11+
:undoc-members:
12+
:show-inheritance:
13+
14+
.. automodule:: RISE.imports
15+
:members:
16+
:undoc-members:
17+
:show-inheritance:
18+
19+
.. automodule:: RISE.logisticReg
20+
:members:
21+
:undoc-members:
22+
:show-inheritance:
23+
24+
.. automodule:: RISE.gating
25+
:members:
26+
:undoc-members:
27+
:show-inheritance:
28+

docs/conf.py

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
"""Configuration file for the Sphinx documentation builder."""
2+
3+
import sys
4+
from pathlib import Path
5+
6+
# Add the parent directory to the path so we can import RISE
7+
# This allows Sphinx to find the RISE package
8+
project_root = Path(__file__).parent.parent.resolve()
9+
sys.path.insert(0, str(project_root))
10+
11+
# Project information
12+
project = "RISE"
13+
copyright = "2024, Andrew Ramirez, Aaron Meyer"
14+
author = "Andrew Ramirez, Aaron Meyer"
15+
16+
# General configuration
17+
extensions = [
18+
"sphinx.ext.autodoc",
19+
"sphinx.ext.viewcode",
20+
"sphinx.ext.napoleon",
21+
"sphinx.ext.intersphinx",
22+
]
23+
24+
templates_path = ["_templates"]
25+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
26+
27+
# Napoleon settings for NumPy-style docstrings
28+
napoleon_google_docstring = False
29+
napoleon_numpy_docstring = True
30+
napoleon_include_init_with_doc = True
31+
napoleon_include_private_with_doc = False
32+
napoleon_include_special_with_doc = True
33+
napoleon_use_admonition_for_examples = True
34+
napoleon_use_admonition_for_notes = True
35+
napoleon_use_admonition_for_references = True
36+
napoleon_use_ivar = False
37+
napoleon_use_param = True
38+
napoleon_use_rtype = True
39+
napoleon_preprocess_types = False
40+
napoleon_attr_annotations = True
41+
42+
# Autodoc configuration
43+
autodoc_default_options = {
44+
"members": True,
45+
"member-order": "bysource",
46+
"undoc-members": True,
47+
"show-inheritance": True,
48+
"inherited-members": False,
49+
}
50+
51+
# Intersphinx mapping for external documentation
52+
intersphinx_mapping = {
53+
"python": ("https://docs.python.org/3", None),
54+
"numpy": ("https://numpy.org/doc/stable/", None),
55+
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
56+
"pandas": ("https://pandas.pydata.org/docs/", None),
57+
"anndata": ("https://anndata.readthedocs.io/en/stable/", None),
58+
"sklearn": ("https://scikit-learn.org/stable/", None),
59+
"tensorly": ("http://tensorly.org/stable/", None),
60+
"scanpy": ("https://scanpy.readthedocs.io/en/stable/", None),
61+
}
62+
63+
# Options for HTML output
64+
html_theme = "sphinx_rtd_theme"
65+
html_static_path = ["_static"]
66+
html_theme_options = {
67+
"navigation_depth": 4,
68+
"collapse_navigation": False,
69+
"sticky_navigation": True,
70+
"includehidden": True,
71+
"titles_only": False,
72+
}
73+

docs/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. RISE documentation master file
2+
3+
Welcome to RISE's documentation!
4+
=================================
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
:caption: Contents:
9+
10+
api
11+
12+
Indices and tables
13+
==================
14+
15+
* :ref:`genindex`
16+
* :ref:`modindex`
17+
* :ref:`search`
18+

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ dev-dependencies = [
4848
"scanorama>=1.7.4",
4949
"harmonypy>=0.0.10",
5050
"scib>=1.1.5",
51+
"sphinx>=7.0,<9.0",
52+
"sphinx-rtd-theme>=3.0.0",
5153
]
5254

5355

requirements-dev.lock

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
-e file:.
1313
absl-py==2.1.0
1414
# via ortools
15+
alabaster==1.0.0
16+
# via sphinx
1517
anndata==0.11.1
1618
# via doubletdetection
1719
# via parafac2
@@ -23,6 +25,8 @@ annoy==1.17.3
2325
# via scanorama
2426
array-api-compat==1.8
2527
# via anndata
28+
babel==2.17.0
29+
# via sphinx
2630
certifi==2024.8.30
2731
# via requests
2832
charset-normalizer==3.3.2
@@ -51,6 +55,9 @@ datashader==0.16.3
5155
# via rise
5256
deprecated==1.2.14
5357
# via scib
58+
docutils==0.21.2
59+
# via sphinx
60+
# via sphinx-rtd-theme
5461
doubletdetection==4.3.0.post1
5562
# via rise
5663
fastrlock==0.8.2
@@ -79,12 +86,16 @@ idna==3.8
7986
igraph==0.11.6
8087
# via leidenalg
8188
# via scib
89+
imagesize==1.4.1
90+
# via sphinx
8291
immutabledict==4.2.1
8392
# via ortools
8493
iniconfig==2.0.0
8594
# via pytest
8695
intervaltree==3.1.0
8796
# via scanorama
97+
jinja2==3.1.6
98+
# via sphinx
8899
joblib==1.4.2
89100
# via pynndescent
90101
# via scanpy
@@ -102,6 +113,8 @@ llvmlite==0.44.0
102113
# via scib
103114
locket==1.0.0
104115
# via partd
116+
markupsafe==3.0.3
117+
# via jinja2
105118
matplotlib==3.9.2
106119
# via doubletdetection
107120
# via gseapy
@@ -169,6 +182,7 @@ packaging==24.1
169182
# via matplotlib
170183
# via pytest
171184
# via scanpy
185+
# via sphinx
172186
# via statsmodels
173187
# via xarray
174188
pacmap==0.7.3
@@ -215,6 +229,8 @@ pyct==0.5.0
215229
# via datashader
216230
pydot==3.0.1
217231
# via scib
232+
pygments==2.19.2
233+
# via sphinx
218234
pynndescent==0.5.13
219235
# via scanpy
220236
# via umap-learn
@@ -235,7 +251,10 @@ pyyaml==6.0.2
235251
requests==2.32.3
236252
# via datashader
237253
# via gseapy
254+
# via sphinx
238255
# via tlviz
256+
roman-numerals-py==3.1.0
257+
# via sphinx
239258
scanorama==1.7.4
240259
scanpy==1.10.4
241260
# via doubletdetection
@@ -284,8 +303,28 @@ setuptools==74.1.2
284303
six==1.16.0
285304
# via patsy
286305
# via python-dateutil
306+
snowballstemmer==3.0.1
307+
# via sphinx
287308
sortedcontainers==2.4.0
288309
# via intervaltree
310+
sphinx==8.2.3
311+
# via sphinx-rtd-theme
312+
# via sphinxcontrib-jquery
313+
sphinx-rtd-theme==3.0.2
314+
sphinxcontrib-applehelp==2.0.0
315+
# via sphinx
316+
sphinxcontrib-devhelp==2.0.0
317+
# via sphinx
318+
sphinxcontrib-htmlhelp==2.1.0
319+
# via sphinx
320+
sphinxcontrib-jquery==4.1
321+
# via sphinx-rtd-theme
322+
sphinxcontrib-jsmath==1.0.1
323+
# via sphinx
324+
sphinxcontrib-qthelp==2.0.0
325+
# via sphinx
326+
sphinxcontrib-serializinghtml==2.0.0
327+
# via sphinx
289328
statsmodels==0.14.2
290329
# via rise
291330
# via scanpy

0 commit comments

Comments
 (0)