Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
84fccf57
Unverified
Commit
84fccf57
authored
Jan 18, 2023
by
Rhett Ying
Committed by
GitHub
Jan 18, 2023
Browse files
[Doc] add include/exclude_patterns when build sphinx (#5195)
parent
56682040
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
docs/source/conf.py
docs/source/conf.py
+8
-4
No files found.
docs/source/conf.py
View file @
84fccf57
...
...
@@ -26,6 +26,7 @@ author = 'DGL Team'
import
dgl
version
=
dgl
.
__version__
release
=
dgl
.
__version__
dglbackend
=
os
.
environ
.
get
(
"DGLBACKEND"
,
"pytorch"
)
# -- General configuration ---------------------------------------------------
...
...
@@ -74,6 +75,13 @@ language = None
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns
=
[]
if
dglbackend
==
"mxnet"
:
include_patterns
=
[
'api/python/nn-mxnet'
]
elif
dglbackend
==
"tensorflow"
:
include_patterns
=
[
'api/python/nn-tensorflow'
]
else
:
# pytorch
exclude_patterns
=
[
'api/python/nn-tensorflow'
,
'api/python/nn-mxnet'
]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style
=
None
...
...
@@ -230,14 +238,10 @@ sphinx_gallery_conf = {
}
# Compatibility for different backend when builds tutorials
dglbackend
=
os
.
environ
.
get
(
"DGLBACKEND"
,
""
)
if
dglbackend
==
'mxnet'
:
sphinx_gallery_conf
[
'filename_pattern'
]
=
"/*(?<=mx)\.py"
if
dglbackend
==
'pytorch'
:
sphinx_gallery_conf
[
'filename_pattern'
]
=
"/*(?<!mx)\.py"
else
:
sphinx_gallery_conf
[
'ignore_pattern'
]
=
".*tutorials/.*"
sphinx_gallery_conf
[
'plot_gallery'
]
=
False
# sphinx-copybutton tool
copybutton_prompt_text
=
r
'>>> |\.\.\. '
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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