|
|
# Installation on CentOS
|
|
|
|
|
|
```
|
|
|
pip install -U sphinx
|
|
|
```
|
|
|
|
|
|
install also all librairies that we need in the yafitss docker
|
|
|
Install also all librairies that we need in the yafitss docker
|
|
|
```
|
|
|
yt
|
|
|
dask
|
... | ... | @@ -12,7 +14,7 @@ matplotlib |
|
|
sphinx_rtd-theme
|
|
|
```
|
|
|
|
|
|
# run sphinx on yafits
|
|
|
# Run sphinx on yafits
|
|
|
```
|
|
|
./yafits sphinx
|
|
|
```
|
... | ... | @@ -21,8 +23,7 @@ will create the directory sourcedoc/yafitss with other sub directories |
|
|
# Configuration on yafits
|
|
|
|
|
|
Edit the file source/config.py
|
|
|
|
|
|
uncomment these 3 lines and replace the directory with the good one
|
|
|
Uncomment these 3 lines and replace the directory with the good one
|
|
|
```
|
|
|
import os
|
|
|
import sys
|
... | ... | @@ -31,16 +32,30 @@ sys.path.insert(0, os.path.abspath('../../../yafitss')) |
|
|
|
|
|
Change the theme
|
|
|
```
|
|
|
html_theme = 'sphinx_rtd_theme'
|
|
|
```
|
|
|
Add the extension sphinx.ext.napoleon. To compile docstring in python code
|
|
|
Add the extension "sphinx.ext.napoleon". To compile docstring in python code
|
|
|
```
|
|
|
|
|
|
extensions = [
|
|
|
'sphinx.ext.autodoc',
|
|
|
'sphinx.ext.viewcode',
|
|
|
'sphinx.ext.coverage',
|
|
|
"sphinx.ext.napoleon"
|
|
|
]
|
|
|
```
|
|
|
|
|
|
Edit the file source/index.rst
|
|
|
|
|
|
Add modules
|
|
|
```
|
|
|
Welcome to Yafitss-doc's documentation!
|
|
|
=======================================
|
|
|
|
|
|
.. toctree::
|
|
|
:maxdepth: 2
|
|
|
:caption: Contents:
|
|
|
|
|
|
modules
|
|
|
```
|
|
|
|
|
|
|
... | ... | |