Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
beat
beat.editor
Commits
01890493
Commit
01890493
authored
Feb 20, 2019
by
André Anjos
💬
Browse files
[doc] Update sphinx configuration to remove hardcoded urls
parent
127b27d6
Pipeline
#27332
failed with stages
in 33 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/conf.py
View file @
01890493
#!/usr/bin/env python
#
vim: set fileen
coding
=
utf-8
:
#
-*-
coding
:
utf-8
-*-
import
os
import
sys
import
glob
import
pkg_resources
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
...
...
@@ -58,7 +55,7 @@ autosummary_generate = True
numfig
=
True
# If we are on OSX, the 'dvipng' path maybe different
dvipng_osx
=
'/
opt/local/libexec/texlive/binaries
/dvipng'
dvipng_osx
=
'/
Library/TeX/texbin
/dvipng'
if
os
.
path
.
exists
(
dvipng_osx
):
pngmath_dvipng
=
dvipng_osx
# Add any paths that contain templates here, relative to this directory.
...
...
@@ -229,20 +226,25 @@ autodoc_default_flags = [
'show-inheritance'
,
]
if
not
'BOB_DOCUMENTATION_SERVER'
in
os
.
environ
:
# notice we need to overwrite this for BEAT projects - defaults from Bob are
# not OK
os
.
environ
[
'BOB_DOCUMENTATION_SERVER'
]
=
"https://www.idiap.ch/software/beat/docs/beat/%(name)s/%(version)s/|https://www.idiap.ch/software/beat/docs/beat/%(name)s/master/"
# For inter-documentation mapping:
from
bob.extension.utils
import
link_documentation
,
load_requirements
sphinx_requirements
=
"extra-intersphinx.txt"
if
os
.
path
.
exists
(
sphinx_requirements
):
intersphinx_mapping
=
link_documentation
(
additional_packages
=
[
'python'
,
'numpy'
]
+
\
load_requirements
(
sphinx_requirements
)
)
load_requirements
(
sphinx_requirements
))
else
:
intersphinx_mapping
=
link_documentation
()
# Adds simplejson,
pyzmq
links
# Adds simplejson,
flask
links
intersphinx_mapping
[
'http://simplejson.readthedocs.io/en/stable/'
]
=
None
intersphinx_mapping
[
'http://pyzmq.readthedocs.io/en/stable/'
]
=
None
intersphinx_mapping
[
'http://flask.pocoo.org/docs/'
]
=
None
intersphinx_mapping
[
'http://jinja.pocoo.org/docs/'
]
=
None
# We want to remove all private (i.e. _. or __.__) members
# that are not in the list of accepted functions
...
...
@@ -253,7 +255,8 @@ def member_function_test(app, what, name, obj, skip, options):
if
len
(
name
)
>
1
and
name
[
0
]
==
'_'
:
# test if this private function should be allowed
if
name
not
in
accepted_private_functions
:
# omit privat functions that are not in the list of accepted private functions
# omit private functions that are not in the list of accepted private
# functions
return
skip
else
:
# test if the method is documented
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment