Skip to content

Commit

Permalink
created documentation/sphinx readme
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Aug 28, 2024
1 parent 3aa7a88 commit 6c7688d
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions documentation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## Configuration for BioCompose Documentation.

### This documentation is created using ``sphinx``. To get started with sphinx, run the following commands:

1. Install sphinx into your environment with ``pip``:
```bash
pip install sphinx sphinx-autodoc-typehints
```
2. Create a ``docs`` or ``documentation`` directory at the root of the ``bio-compose`` repo:
```bash
mkdir documentation && cd documentation
```
3. Run sphinx quickstart in documentation directory:
```bash
sphinx-quickstart
```
4. Ensure auto-complete of documentation is possible from the package's docstrings in the autogenerated ``conf.py`` from #3:
```python
extensions = [
'sphinx.ext.autodoc',
'sphinx_autodoc_typehints',
# other extensions that are preferred as per the sphinx documentation
]
```
5. Auto-generate documentation from the docstrings:
```bash
sphinx-apidoc -o /path/to/the/directory/with/index.rst /path/to/the/python/package/or/code/for/which/you/are/creating/the/documenation
```
6. Ensure you are in the directory in which the ``Makefile`` is stored and create the HTML. Be sure to read the returning message from this step:
```bash
make html
```

0 comments on commit 6c7688d

Please sign in to comment.