Skip to content

Commit d386d4b

Browse files
committed
add api and nb support to docs
1 parent 734c8a8 commit d386d4b

5 files changed

Lines changed: 58 additions & 13 deletions

File tree

docs/source/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages

docs/source/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
# ones.
5050
extensions = [
5151
"sphinx.ext.autodoc",
52+
"sphinx.ext.autosummary",
5253
"sphinx.ext.napoleon",
5354
"sphinx_autodoc_typehints",
5455
"sphinx.ext.doctest",
@@ -67,6 +68,8 @@
6768
# enable autosummary plugin (table of contents for modules/classes/class
6869
# methods)
6970
autosummary_generate = True
71+
autosummary_generate_overwrite = False
72+
napoleon_include_init_with_doc = True
7073

7174
# Add any paths that contain templates here, relative to this directory.
7275
templates_path = ["_templates"]

docs/source/index.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,30 @@
22
You can adapt this file completely to your liking, but it should at least
33
contain the root `toctree` directive.
44
5-
Welcome to Pasteur's API docs!
5+
Welcome to Pasteur's documentation!
66
=============================================
77

88
.. toctree::
9-
:maxdepth: 4
9+
:maxdepth: 2
10+
:caption: Introduction
1011

12+
intro/preliminaries
1113

14+
.. toctree::
15+
:maxdepth: 2
16+
:caption: Modules
17+
18+
19+
API documentation
20+
=================
21+
22+
.. autosummary::
23+
:toctree: packages
24+
:caption: API documentation
25+
:template: autosummary/module.rst
26+
:recursive:
27+
28+
pasteur
1229

1330
Indices and tables
1431
==================
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"cells": [
3+
{
4+
"attachments": {},
5+
"cell_type": "markdown",
6+
"metadata": {},
7+
"source": [
8+
"# Preliminaries "
9+
]
10+
},
11+
{
12+
"cell_type": "markdown",
13+
"metadata": {},
14+
"source": []
15+
}
16+
],
17+
"metadata": {
18+
"language_info": {
19+
"name": "python"
20+
}
21+
},
22+
"nbformat": 4,
23+
"nbformat_minor": 2
24+
}

src/pasteur/cli.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
from .kedro.utils import get_pasteur_modules
22

3-
if get_pasteur_modules():
4-
from .kedro.cli import cli
5-
else:
6-
cli = None
3+
# if get_pasteur_modules():
4+
from .kedro.cli import cli
5+
# else:
6+
# cli = None
77

8-
import logging
8+
# import logging
99

10-
logger = logging.getLogger(__name__)
11-
logger.warning(
12-
"Pasteur project not found in the current directory "
13-
+ "(settings.py file doesn't contain `PASTEUR_MODULES = ...`). "
14-
+ "Disabling Pasteur commands."
15-
)
10+
# logger = logging.getLogger(__name__)
11+
# logger.warning(
12+
# "Pasteur project not found in the current directory "
13+
# + "(settings.py file doesn't contain `PASTEUR_MODULES = ...`). "
14+
# + "Disabling Pasteur commands."
15+
# )
1616

1717
__all__ = ["cli"]

0 commit comments

Comments
 (0)