Skip to content

Commit aaf812c

Browse files
add first draft of dev doc page
1 parent 763fb12 commit aaf812c

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

docs/source/dev/documentation.rst

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
Project Documentation
2+
=====================
3+
4+
This page aims to describe:
5+
6+
#. How to comply with the projects documentation style
7+
8+
#. The tools used for documentation
9+
10+
#. ReadTheDocs where the documentation for this project is hosted
11+
12+
13+
Documentation Style
14+
-------------------
15+
16+
The `Sphinx docstring format <https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format>`_ is used throughout the projects codebase to allow for the easy understanding of classes, methods, functions, etc.
17+
This format allows for the easy generation of html documentation pages.
18+
19+
Checks for docstrings have been added to the projects Pylint configuration.
20+
21+
Documentation Tools
22+
-------------------
23+
24+
To install the packages required to work with the documentation please ensure the projects **dev** dependencies are installed::
25+
26+
pip install causal-testing-framework[dev]
27+
28+
Sphinx
29+
******
30+
31+
This project makes use of `Sphinx <https://www.sphinx-doc.org/en/master/>`_, to generate documentation.
32+
33+
The documentation for the project sits within the `docs/` directory inside the project root.
34+
35+
To manually build the docs, first navigate to the `docs/` directory and run::
36+
37+
make html
38+
39+
This will populate `docs/build/` with static html pages containing the docs.
40+
To cleanup the compiled docs you can run::
41+
42+
make clean
43+
44+
45+
Situation within `docs/source` are the reStructuredText files (.rst) which contain the handwritten doc pages, which get compiled by the make commands.
46+
47+
Autodoc & Autoapi
48+
*****************
49+
50+
`Autodoc <https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html>`_ is an extension to sphinx that can import code modules and compile documentation from their docstrings.
51+
52+
`AutoAPI <https://sphinx-autoapi.readthedocs.io/en/latest/>`_ is a third party sphinx tool for recursively discovering code modules and compiling them into a logical doctree structure
53+
54+
The configuration for Sphinx, Autodoc and AutoAPI are all found in `/docs/source/conf.py <https://github.com/CITCOM-project/CausalTestingFramework/blob/main/docs/source/conf.py>`_.
55+
56+
ReadTheDocs
57+
-----------
58+
`Read the Docs <https://readthedocs.org/>`_ is a documentation hosting site that hosts open source projects for free.
59+

0 commit comments

Comments
 (0)