|
|
|
# Installation on CentOS
|
|
|
|
|
|
|
|
pip install -U sphinx
|
|
|
|
|
|
|
|
install also all librairies that we need in the yafitss docker
|
|
|
|
```
|
|
|
|
yt
|
|
|
|
dask
|
|
|
|
pypng
|
|
|
|
dask
|
|
|
|
matplotlib
|
|
|
|
sphinx_rtd-theme
|
|
|
|
```
|
|
|
|
|
|
|
|
# run sphinx on yafits
|
|
|
|
```
|
|
|
|
./yafits sphinx
|
|
|
|
```
|
|
|
|
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
|
|
|
|
```
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.abspath('../../../yafitss'))
|
|
|
|
```
|
|
|
|
|
|
|
|
Change the theme
|
|
|
|
```
|
|
|
|
```
|
|
|
|
Add the extension sphinx.ext.napoleon. To compile docstring in python code
|
|
|
|
```
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
Edit the file source/index.rst
|
|
|
|
|
|
|
|
Add modules
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
---
|
|
---
|
|
title: "Sphinx setup"
|
|
title: "Sphinx setup"
|
|
author: [Philippe Salome]
|
|
author: [Philippe Salome]
|
... | | ... | |