Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.tensorflow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.learn.tensorflow
Commits
6937dce9
There was a problem fetching the pipeline summary.
Commit
6937dce9
authored
6 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Added mathjax
Added mathjax
parent
758bd895
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!63
Moved style transfer to a function
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/conf.py
+41
-38
41 additions, 38 deletions
doc/conf.py
with
41 additions
and
38 deletions
doc/conf.py
+
41
−
38
View file @
6937dce9
...
...
@@ -6,6 +6,7 @@ import sys
import
glob
import
pkg_resources
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
...
...
@@ -14,23 +15,22 @@ needs_sphinx = '1.3'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions
=
[
'
sphinx.ext.todo
'
,
'
sphinx.ext.coverage
'
,
'
sphinx.ext.ifconfig
'
,
'
sphinx.ext.
autodoc
'
,
'
sphinx.ext.autosummary
'
,
'
sphinx.ext.doctest
'
,
'
sphinx.ext.
graphviz
'
,
'
sphinx.ext.intersphinx
'
,
'
sphinx.ext.napoleon
'
,
'
sphinx.ext.
viewcode
'
,
'
matplotlib.sphinxext.plot_directive
'
,
'
sphinx.ext.
mathjax
'
]
import
sphinx
if
sphinx
.
__version__
>=
"
1.4.1
"
:
extensions
.
append
(
'
sphinx.ext.
imgmath
'
)
imgmath_image_format
=
'
svg
'
else
:
extensions
.
append
(
'
sphinx.ext.pngmath
'
)
'
sphinx.ext.todo
'
,
'
sphinx.ext.
coverage
'
,
'
sphinx.ext.
ifconfig
'
,
'
sphinx.ext.
autodoc
'
,
'
sphinx.ext.
autosummary
'
,
'
sphinx.ext.doctest
'
,
'
sphinx.ext.graphviz
'
,
'
sphinx.ext.inter
sphinx
'
,
'
sphinx.
ext.napoleon
'
,
'
sphinx.ext.
viewcode
'
,
'
sphinx.ext.mathjax
'
,
'
matplotlib.sphinxext.plot_directive
'
]
# Be picky about warnings
nitpicky
=
True
keep_warnings
=
True
# Ignores stuff we can't easily resolve on other project's sphinx manuals
nitpick_ignore
=
[]
...
...
@@ -42,7 +42,7 @@ if os.path.exists('nitpick-exceptions.txt'):
continue
dtype
,
target
=
line
.
split
(
None
,
1
)
target
=
target
.
strip
()
try
:
# python 2.x
try
:
# python 2.x
target
=
unicode
(
target
)
except
NameError
:
pass
...
...
@@ -129,6 +129,7 @@ project_variable = project.replace('.', '_')
short_description
=
u
'
bob.learn.tensorflow API
'
owner
=
[
u
'
Idiap Research Institute
'
]
# -- Options for HTML output ---------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
...
...
@@ -209,6 +210,7 @@ html_favicon = 'img/favicon.ico'
# Output file base name for HTML help builder.
htmlhelp_basename
=
project_variable
+
u
'
_doc
'
# -- Post configuration --------------------------------------------------------
# Included after all input documents
...
...
@@ -216,45 +218,46 @@ rst_epilog = """
.. |project| replace:: Bob
.. |version| replace:: %s
.. |current-year| date:: %%Y
"""
%
(
version
,
)
"""
%
(
version
,)
# Default processing flags for sphinx
autoclass_content
=
'
class
'
autodoc_member_order
=
'
bysource
'
autodoc_default_flags
=
[
'
members
'
,
'
undoc-members
'
,
'
show-inheritance
'
,
]
'
members
'
,
'
undoc-members
'
,
'
show-inheritance
'
,
]
# 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
))
intersphinx_mapping
=
link_documentation
(
additional_packages
=
[
'
python
'
,
'
numpy
'
]
+
\
load_requirements
(
sphinx_requirements
)
)
else
:
intersphinx_mapping
=
link_documentation
()
intersphinx_mapping
=
link_documentation
()
# We want to remove all private (i.e. _. or __.__) members
# that are not in the list of accepted functions
accepted_private_functions
=
[
'
__array__
'
]
def
member_function_test
(
app
,
what
,
name
,
obj
,
skip
,
options
):
# test if we have a private function
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
return
skip
else
:
# test if the method is documented
if
not
hasattr
(
obj
,
'
__doc__
'
)
or
not
obj
.
__doc__
:
return
skip
return
False
# test if we have a private function
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
return
skip
else
:
# test if the method is documented
if
not
hasattr
(
obj
,
'
__doc__
'
)
or
not
obj
.
__doc__
:
return
skip
return
False
def
setup
(
app
):
app
.
connect
(
'
autodoc-skip-member
'
,
member_function_test
)
app
.
connect
(
'
autodoc-skip-member
'
,
member_function_test
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment