Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

mods for doc build #21

wants to merge 1 commit into from

Conversation

fs446
Copy link
Member

@fs446 fs446 commented Jan 25, 2021

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

@@ -17,10 +17,12 @@
import os
from subprocess import check_output

import sphinx
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# 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']
Copy link
Member

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}}
"""
Copy link
Member

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')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -221,20 +308,32 @@
# Output file base name for HTML help builder.
htmlhelp_basename = 'SFA'

html_scaled_image_link = False
Copy link
Member

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.

@mgeier
Copy link
Member

mgeier commented Jan 25, 2021

The conf.py file mods originate from taking and adapting the conf.py file from the sfs toolbox project

The SFS configuration is quite outdated and could need a facelift itself ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants