Skip to content

Commit d6da6a3

Browse files
Merge pull request #197 from CITCOM-project/dev_docs
Dev docs
2 parents cabc194 + 220b225 commit d6da6a3

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Github Actions and Webhooks
2+
===========================
3+
4+
Github Actions
5+
--------------
6+
7+
Currently this project makes use of 3 `Github Actions <https://github.com/features/actions>`_, which can be found in the `.github/workflows <https://github.com/CITCOM-project/CausalTestingFramework/tree/main/.github/workflows>`_ directory
8+
9+
They are:
10+
11+
#. ci-tests.yaml, which runs CI tests on each PR
12+
13+
#. lint-format.yaml, runs linting on each PR
14+
15+
#. publish-to-pypi.yaml, runs when a new version tag is pushed and publishes that tag version to pypi
16+
17+
Github Webhooks
18+
---------------
19+
20+
The project also uses 3 `Webhooks <https://docs.github.com/en/webhooks-and-events/webhooks/about-webhooks>`_, which can be found in the `project settings <https://github.com/CITCOM-project/CausalTestingFramework/settings>`_ on Github
21+
22+
#. To codacy
23+
24+
#. To codecov
25+
26+
#. To readthedocs

docs/source/dev/documentation.rst

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Project Documentation
2+
=====================
3+
4+
This page aims to describe:
5+
6+
#. 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, versions and builds documentation for free for open source projects.
59+
60+
This project makes use of a Github Webook to trigger the build in ReadTheDocs, further reading on this can be found :doc:`here <../dev/actions_and_webhooks>`\
61+

docs/source/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ system-under-test that is expected to cause a change to some output(s).
5454
:caption: Development Documentation
5555

5656
/dev/version_release
57+
/dev/documentation
58+
/dev/actions_and_webhooks
5759

5860
Indices and tables
5961
==================

0 commit comments

Comments
 (0)