Conversation
| import os | ||
| from subprocess import check_output | ||
|
|
||
| import sphinx |
There was a problem hiding this comment.
This is not necessary if SFA_DOCS_ARE_BEING_BUILT is not used, see below.
| ] | ||
|
|
||
| # Tell autodoc that the documentation is being generated | ||
| sphinx.SFA_DOCS_ARE_BEING_BUILT = True |
There was a problem hiding this comment.
This makes only sense if you are actually using it, see
| # List of patterns, relative to source directory, that match files and | ||
| # directories to ignore when looking for source files. | ||
| exclude_patterns = ['_build'] | ||
| exclude_patterns = ['_build', '**/.ipynb_checkpoints'] |
There was a problem hiding this comment.
This change is not needed anymore.
| \nbsphinxstartnotebook{\scriptsize\noindent\strut | ||
| \textcolor{gray}{The following section was generated from {{ latex_href }} | ||
| \dotfill}} | ||
| """ |
There was a problem hiding this comment.
The nbsphinx docs use a more modern version of nbsphinx_prolog:
https://github.com/spatialaudio/nbsphinx/blob/master/doc/conf.py
|
|
||
| def setup(app): | ||
| """Include custom theme files to sphinx HTML header""" | ||
| app.add_stylesheet('css/title.css') |
There was a problem hiding this comment.
This is a complicated way of doing a simpler thing, see https://insipid-sphinx-theme.readthedocs.io/en/0.2.2/customization.html#custom-css-files
| # Output file base name for HTML help builder. | ||
| htmlhelp_basename = 'SFA' | ||
|
|
||
| html_scaled_image_link = False |
The SFS configuration is quite outdated and could need a facelift itself ... |
I updated the sphinx doc build handling since the old handling did not work with recent package versions, at least not on my computer. I also added bib-file handling.
The conf.py file mods originate from taking and adapting the conf.py file from the sfs toolbox project, I am not an expert in this, so please check carefully.
I used a python environment that was created by conda 4.9.2 and
conda create -n mysfa python=3.7.9 numpy=1.19.5 matplotlib=3.3.3 scipy=1.6.0 nbsphinx=0.8.1 sphinxcontrib-bibtex=2.1.4