-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mods for doc build #21
base: master
Are you sure you want to change the base?
Conversation
@@ -17,10 +17,12 @@ | |||
import os | |||
from subprocess import check_output | |||
|
|||
import sphinx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nbsphinx
docs use a more modern version of nbsphinx_prolog
:
https://github.com/spatialaudio/nbsphinx/blob/master/doc/conf.py
|
||
# -- Options for HTML output ---------------------------------------------- | ||
|
||
def setup(app): | ||
"""Include custom theme files to sphinx HTML header""" | ||
app.add_stylesheet('css/title.css') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -221,20 +308,32 @@ | |||
# Output file base name for HTML help builder. | |||
htmlhelp_basename = 'SFA' | |||
|
|||
html_scaled_image_link = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary anymore.
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