Skip to content

Commit

Permalink
[docs] Add a download link for a .tar.gz with tutorials (#6986)
Browse files Browse the repository at this point in the history
* [docs] Add a download link for a .tar.gz with tutorials

Also fix make targets.

Fixes #6520

* bump!
  • Loading branch information
tpoterba authored and danking committed Sep 3, 2019
1 parent a024138 commit 836baa3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions hail/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ clean-docs:
.PHONY: docs
docs: install $(PYTHON_VERSION_INFO)
mkdir -p build
rm -rf build/www
cp -R www build/www
mkdir -p build/docs
cp -R python/hail/docs build/
Expand All @@ -302,14 +303,17 @@ docs: install $(PYTHON_VERSION_INFO)
$(MAKE) -C build/www
$(MAKE) SPHINXOPTS='-tchecktutorial' -C build/docs BUILDDIR=_build clean html
mkdir -p build/www/docs
rm -rf build/www/docs/$(HAIL_MAJOR_MINOR_VERSION)
mv build/docs/_build/html build/www/docs/$(HAIL_MAJOR_MINOR_VERSION)
@echo Built docs: build/www/docs/$(HAIL_MAJOR_MINOR_VERSION)/index.html

.PHONY: test
test: pytest jvm-test doctest tutorial-test

.PHONY: tutorial-test
docs-no-test: $(PYTHON_VERSION_INFO)
mkdir -p build
rm -rf build/www
cp -R www build/www
mkdir -p build/docs
cp -R python/hail/docs build/
Expand All @@ -320,7 +324,9 @@ docs-no-test: $(PYTHON_VERSION_INFO)
$(MAKE) -C build/www
$(MAKE) -C build/docs BUILDDIR=_build clean html
mkdir -p build/www/docs
rm -rf build/www/docs/$(HAIL_MAJOR_MINOR_VERSION)
mv build/docs/_build/html build/www/docs/$(HAIL_MAJOR_MINOR_VERSION)
@echo Built docs: build/www/docs/$(HAIL_MAJOR_MINOR_VERSION)/index.html

.PHONY: native-lib native-lib-test native-lib-clean native-lib-prebuilt native-lib-reset-prebuilt
native-lib:
Expand Down
7 changes: 6 additions & 1 deletion hail/python/hail/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ check-python:
@echo "Ensuring that Hail can be imported..."
python3 -c "import hail"

.PHONY: tutorials-tar
tutorials-tar:
mkdir -p $(BUILDDIR)/html
tar cvf $(BUILDDIR)/html/tutorials.tar.gz tutorials

.PHONY: html
html: check-python
html: check-python tutorials-tar
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
Expand Down
3 changes: 2 additions & 1 deletion hail/python/hail/docs/tutorials-landing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Hail Tutorials
==============

To take Hail for a test drive, go through our tutorials. These can be viewed here in the documentation,
but we recommend instead that you run them yourself with Jupyter.
but we recommend instead that you run them yourself with Jupyter by
`downloading the archive (.tar.gz) <tutorials.tar.gz>`__.

.. toctree::
:maxdepth: 1
Expand Down

0 comments on commit 836baa3

Please sign in to comment.