pierrepo / PBxplore

A suite of tools to explore protein structures with Protein Blocks :snake:
https://pbxplore.readthedocs.org/en/latest/
MIT License
28 stars 17 forks source link

Yet another update on the documentation #159

Closed HubLot closed 7 years ago

HubLot commented 7 years ago

Hi,

Here a big update on the documentation and how it's built.

First, I started to remove the folder pbxplore/demo which contained demo files we don't use anymore in the documentation. Now, the files are directly taken from the PDB or from the demo_doc folder.

The conversion of notebooks into rst and html files are now done with the nbsphinx tool. It's a sphinx extension, meaning the conversion is now integrated in the sphinx-build command. We don't need anymore to first convert the notebooks in markdown then in rst. Hence, doc/source/build.sh and doc/source/pandoc_fix_img.py were removed and doc/source/conf.pyhas been updated.

The notebooks have been updated to use a python 3 kernel. A special cell has been added in the top of each notebook :

.. contents:: Table of Contents
   :local:
   :backlinks: none

It's a Raw NBconvert type cell which format is reST. This allows the nbsphinx extension to parse it as reST code in order to add a table of content for the notebook (which was done manually before).

Plus, the notebooks are still executed before converted to ensure the content is still valid. It's useful when testing the doc in Travis (it's a nbsphinx option in doc/source/conf.py).

Finally, the docs is only tested in python 3.5 in Travis.

pierrepo commented 7 years ago

Thanks @HubLot. You're on fire!