diff --git a/.github/workflows/sphinx-docs-build.yml b/.github/workflows/sphinx-docs-build.yml index 59241b6..bca4cec 100644 --- a/.github/workflows/sphinx-docs-build.yml +++ b/.github/workflows/sphinx-docs-build.yml @@ -13,10 +13,10 @@ jobs: with: # git is required to clone the docs theme # before custom requirement are resolved https://github.com/ammaraskar/sphinx-action/issues/16 - pre-build-command: "sudo apt-get update -y && sudo apt-get install -y git && pip install . && pip install -r docs/requirements.txt" + pre-build-command: "sudo apt-get update -y && sudo apt-get install -y git && pip install -r docs/requirements.txt" build-command: "sphinx-build -b html source build" docs-folder: "docs/" - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v2 with: name: Documentation - path: docs/build/ + path: docs/build/html/ diff --git a/docs/Makefile b/docs/Makefile index d4bb2cb..92dd33a 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,7 +5,7 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = . +SOURCEDIR = source BUILDDIR = _build # Put it first so that "make" without argument is like "make help". diff --git a/docs/make.bat b/docs/make.bat index 2119f51..447b8bd 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -7,7 +7,7 @@ REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) -set SOURCEDIR=. +set SOURCEDIR=source set BUILDDIR=_build if "%1" == "" goto help diff --git a/docs/source/conf.py b/docs/source/conf.py index 64fd6bc..cd421a9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -20,6 +20,7 @@ import os import sys import sphinx_rtd_theme +import quickvision PATH_HERE = os.path.abspath(os.path.dirname(__file__)) PATH_ROOT = os.path.join(PATH_HERE, '..', '..') @@ -104,3 +105,13 @@ 'Pillow': 'PIL', 'opencv-python': 'cv2', } + +# only run doctests marked with a ".. doctest::" directive +doctest_test_doctest_blocks = '' +doctest_global_setup = """ +import importlib +import os +import torch +import quickvision + +"""