Commit 19e1b140 authored by VoVAllen's avatar VoVAllen Committed by Minjie Wang
Browse files

[Docs] Move file_pattern option from Makefile to conf.py (#352)

* add rtfd

* rrr

* update

* change env

* temp fix

* update

* fix

* fix

* add

* conf

* Move file_pattern from Makefile to conf.py

* remove yml

* fix

* fix

* fix

* fix

* remove yml

* remove yml

* add doc docker

* add dgl install script

* change name

* change dockerfile

* fix

* name

* add

* fix

* fix

* fix

* fix

* add doc-build files

* remove unnecessary import os
parent ddc2faa5
...@@ -19,8 +19,7 @@ mxnet: ...@@ -19,8 +19,7 @@ mxnet:
@echo "# Step 1: Building MXNet tutorials #" @echo "# Step 1: Building MXNet tutorials #"
@echo "# #" @echo "# #"
@echo "##################################################################" @echo "##################################################################"
@DGLBACKEND=mxnet $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ @DGLBACKEND=mxnet $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-D sphinx_gallery_conf.filename_pattern="/*(?<=mx)\.py"
pytorch: pytorch:
@echo "##################################################################" @echo "##################################################################"
...@@ -28,8 +27,7 @@ pytorch: ...@@ -28,8 +27,7 @@ pytorch:
@echo "# Step 2: Building PyTorch tutorials #" @echo "# Step 2: Building PyTorch tutorials #"
@echo "# #" @echo "# #"
@echo "##################################################################" @echo "##################################################################"
@DGLBACKEND=pytorch $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ @DGLBACKEND=pytorch $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-D sphinx_gallery_conf.filename_pattern="/*(?<!mx)\.py"
html-noexec: html-noexec:
$(SPHINXBUILD) -D plot_gallery=0 -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" $(SPHINXBUILD) -D plot_gallery=0 -b html "$(SOURCEDIR)" "$(BUILDDIR)/html"
......
...@@ -213,3 +213,9 @@ sphinx_gallery_conf = { ...@@ -213,3 +213,9 @@ sphinx_gallery_conf = {
'filename_pattern' : '.py', 'filename_pattern' : '.py',
'download_all_examples' : False, 'download_all_examples' : False,
} }
# Compatibility for different backend when builds tutorials
if os.environ['DGLBACKEND'] == 'mxnet':
sphinx_gallery_conf['filename_pattern'] = "/*(?<=mx)\.py"
if os.environ['DGLBACKEND'] == 'pytorch':
sphinx_gallery_conf['filename_pattern'] = "/*(?<!mx)\.py"
build:
image: latest
formats: []
python:
version: 3.6
use_system_site_packages: true
setup_py_install: false
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment