Skip to content

Commit fd0d277

Browse files
committed
Setup pdoc
1 parent 96abe77 commit fd0d277

File tree

5 files changed

+13
-3
lines changed

5 files changed

+13
-3
lines changed

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This repository serves as a personal template for data science projects.
1717
Moreover, I use the following the directories that are (usually) ignored by Git:
1818

1919
- [`data/`](data/) to store data files.
20+
- [`docs/`](docs/) to store API documentation generated with [pdoc](https://pdoc.dev/docs/pdoc.html) by running `scripts/build_docs.sh`.
2021
- [`results/`](results/) to store results/output files such as figures, output data, etc.
2122

2223
## Development environment
@@ -142,12 +143,11 @@ The `src/` package could contain the following modules or sub-packages depending
142143

143144
The repository structure could be extended with:
144145

145-
- `docs/` to store documentation, for example
146-
- A simple API documentation of the `src` package could be generated using [pdoc](https://pdoc.dev/docs/pdoc.html), for example.
147-
- A full project documentation could be generated using [mkdocs](https://www.mkdocs.org/) or [quartodoc](https://machow.github.io/quartodoc/get-started/overview.html).
148146
- subfolders in `data/` such as `data/raw/` for storing raw data.
149147
- `models/` to store model files.
150148

149+
Finally, a full project documentation (beyond the API) could be generated using [mkdocs](https://www.mkdocs.org/) or [quartodoc](https://machow.github.io/quartodoc/get-started/overview.html).
150+
151151
### Related
152152

153153
This template is inspired by the concept of a [research compendium](https://doi.org/10.1080/00031305.2017.1375986) and similar projects I created for R projects (e.g. [reproducible-workflow](https://github.com/ghurault/reproducible-workflow)).

Diff for: docs/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore everything except this file
2+
*
3+
!.gitignore

Diff for: requirements.in

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ ipywidgets
77
matplotlib
88
numpy
99
pandas
10+
pdoc
1011
pip-tools
1112
pre-commit

Diff for: scripts/build_docs.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#! /bin/bash
2+
3+
pdoc -d google -t rust -o docs/ src

Diff for: src/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""
2+
.. include:: ../README.md
3+
"""

0 commit comments

Comments
 (0)