forked from deepchem/deepchem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
leswing
authored and
leswing
committed
Nov 8, 2017
1 parent
80428b6
commit bd92e5c
Showing
24 changed files
with
211 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
# Create the docs and push them to S3 | ||
# ----------------------------------- | ||
envname=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1` | ||
sed -i -- 's/tensorflow$/tensorflow-gpu/g' scripts/install_deepchem_conda.sh | ||
bash scripts/install_deepchem_conda.sh $envname | ||
source activate $envname | ||
python setup.py install | ||
|
||
echo "About to install numpydoc, s3cmd" | ||
pip install -I sphinx==1.3.5 sphinx_bootstrap_theme | ||
pip install numpydoc s3cmd msmb_theme sphinx_rtd_theme nbsphinx delegator.py | ||
conda install -y -q jupyter | ||
conda install -y -q matplotlib | ||
|
||
cd examples/notebooks | ||
python ../../devtools/jenkins/convert_to_rst.py | ||
cd ../.. | ||
|
||
mkdir -p docs/_build | ||
echo "About to build docs" | ||
sphinx-apidoc -f -o docs/source deepchem | ||
sphinx-build -b html docs/source docs/_build | ||
# Copy | ||
cp -r docs/_build/ website/docs/ | ||
echo "About to push docs to s3" | ||
python devtools/jenkins/push-docs-to-s3.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import os | ||
import delegator | ||
import shutil | ||
|
||
target_dir = "../../docs/source/notebooks/" | ||
|
||
|
||
def convert_to_rst(fname): | ||
cmd = "jupyter-nbconvert --to rst %s" % fname | ||
c = delegator.run(cmd) | ||
|
||
base_name = os.path.splitext(fname)[0] | ||
image_files = "%s_files" % base_name | ||
new_path = os.path.join(target_dir, image_files) | ||
if os.path.isdir(new_path): | ||
shutil.rmtree(new_path) | ||
if os.path.isdir(image_files): | ||
shutil.move(image_files, target_dir) | ||
|
||
rst_file = '%s.rst' % base_name | ||
new_path = os.path.join(target_dir, rst_file) | ||
if os.path.isfile(new_path): | ||
os.remove(new_path) | ||
shutil.move(rst_file, target_dir) | ||
|
||
|
||
def main(): | ||
fnames = os.listdir('./') | ||
fnames = [x for x in filter(lambda x: x.endswith('ipynb') > 0, fnames)] | ||
for fname in fnames: | ||
convert_to_rst(fname) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
docs/source/notebooks/graph_convolutional_networks_for_tox21.rst
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.