Skip to content

Instantly share code, notes, and snippets.

@phaustin
Last active September 2, 2020 15:26
Show Gist options
  • Select an option

  • Save phaustin/bd46472f691b4663f439f3596ee25e2f to your computer and use it in GitHub Desktop.

Select an option

Save phaustin/bd46472f691b4663f439f3596ee25e2f to your computer and use it in GitHub Desktop.
py37 jupyter-book tox and docs build
(minitox):Users/Phil
> conda create -n dtox37 python=3.7 tox git pip
(minitox):Users/Phil
> conda activate dtox37
> tox -e py37-sphinx3
GLOB sdist-make: C:\Users\Phil\repos\jupyter-book\setup.py
py37-sphinx3 recreate: C:\Users\Phil\repos\jupyter-book\.tox\py37-sphinx3
py37-sphinx3 installdeps: sphinx>=3,<4
py37-sphinx3 inst: C:\Users\Phil\repos\jupyter-book\.tox\.tmp\package\1\jupyter-book-0.8.0.zip
py37-sphinx3 installed: alabaster==0.7.12,altair==4.1.0,apipkg==1.5,appdirs==1.4.4,argon2-cffi==20.1.0,async-generator==1.10,atomicwrites==1.4.0,attrs==20.1.0,Babel==2.8.0,backcall==0.2.0,beautifulsoup4==4.9.1,bleach==3.1.5,bokeh==2.2.1,branca==0.4.1,certifi==2020.6.20,cffi==1.14.2,chardet==3.0.4,click==7.1.2,colorama==0.4.3,coverage==5.2.1,cycler==0.10.0,decorator==4.4.2,defusedxml==0.6.0,docutils==0.16,entrypoints==0.3,execnet==1.7.1,folium==0.11.0,gitdb==4.0.5,GitPython==3.1.7,idna==2.10,imagesize==1.2.0,importlib-metadata==1.7.0,ipykernel==5.3.4,ipython==7.18.1,ipython-genutils==0.2.0,ipywidgets==7.5.1,jedi==0.17.2,Jinja2==2.11.2,jsonschema==3.2.0,jupyter-book @ file:///C:/Users/Phil/repos/jupyter-book/.tox/.tmp/package/1/jupyter-book-0.8.0.zip,jupyter-cache==0.4.1,jupyter-client==6.1.7,jupyter-core==4.6.3,jupyter-sphinx==0.3.1,jupytext==1.6.0rc0,kiwisolver==1.2.0,latexcodec==2.0.1,libsass==0.20.1,markdown-it-py==0.5.2,MarkupSafe==1.1.1,matplotlib==3.3.1,mistune==0.8.4,more-itertools==8.5.0,mpmath==1.1.0,myst-nb==0.10.0,myst-parser==0.12.8,nbclient==0.5.0,nbconvert==5.6.1,nbdime==2.0.0,nbformat==5.0.7,nest-asyncio==1.4.0,notebook==6.1.3,numpy==1.19.1,oset==0.1.3,packaging==20.4,pandas==1.1.1,pandocfilters==1.4.2,parso==0.7.1,pbr==5.5.0,pickleshare==0.7.5,Pillow==7.2.0,plotly==4.9.0,pluggy==0.13.1,prometheus-client==0.8.0,prompt-toolkit==3.0.7,py==1.9.0,pybtex==0.22.2,pybtex-docutils==0.2.2,pycparser==2.20,pydata-sphinx-theme==0.3.2,pyee==7.0.2,Pygments==2.6.1,pyparsing==2.4.7,pyppeteer==0.2.2,pyrsistent==0.16.0,pytest==3.10.1,pytest-cov==2.10.1,pytest-datadir==1.3.1,pytest-forked==1.3.0,pytest-regressions==2.0.1,pytest-timeout==1.4.2,pytest-xdist==2.1.0,python-dateutil==2.8.1,pytz==2020.1,pywin32==228,pywinpty==0.5.7,PyYAML==5.3.1,pyzmq==19.0.2,requests==2.24.0,retrying==1.3.3,Send2Trash==1.5.0,six==1.15.0,smmap==3.0.4,snowballstemmer==2.0.0,soupsieve==2.0.1,Sphinx==3.2.1,sphinx-book-theme==0.0.36,sphinx-click==2.5.0,sphinx-comments==0.0.3,sphinx-copybutton==0.3.0,sphinx-panels==0.4.1,sphinx-tabs==1.2.1,sphinx-thebe==0.0.7,sphinx-togglebutton==0.2.2,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-bibtex==1.0.0,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==1.0.3,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.4,sphinxext-rediraffe==0.2.1,SQLAlchemy==1.3.19,sympy==1.6.2,terminado==0.8.3,testpath==0.4.4,toml==0.10.1,toolz==0.10.0,tornado==6.0.4,tqdm==4.48.2,traitlets==5.0.0,typing-extensions==3.7.4.3,urllib3==1.25.10,wcwidth==0.2.5,webencodings==0.5.1,websockets==8.1,widgetsnbextension==3.5.1,zipp==3.1.0
py37-sphinx3 run-test-pre: PYTHONHASHSEED='253'
py37-sphinx3 run-test: commands[0] | pytest
============================= test session starts =============================
platform win32 -- Python 3.7.8, pytest-3.10.1, py-1.9.0, pluggy-0.13.1
JB TEMPDIR: <TEMP>
rootdir: C:\Users\Phil\repos\jupyter-book, inifile: tox.ini
plugins: cov-2.10.1, datadir-1.3.1, forked-1.3.0, regressions-2.0.1, timeout-1.4.2, xdist-2.1.0
timeout: 100.0s
timeout method: thread
timeout func_only: False
collected 42 items
tests\test_build.py ............F... [ 38%]
tests\test_clean.py .... [ 47%]
tests\test_config.py ............ [ 76%]
tests\test_pdf.py .. [ 80%]
tests\test_toc.py .... [ 90%]
tests\test_tocdirective.py ..s [ 97%]
tests\test_utils.py . [100%]
================================== FAILURES ===================================
_______________________________ test_build_docs _______________________________
docs = WindowsPath('C:/Users/Phil/AppData/Local/Temp/pytest-of-unknown/pytest-2/test_build_docs0/docs')
cli = <click.testing.CliRunner object at 0x000002482F683388>
def test_build_docs(docs, cli):
"""Test building the documentation book."""
html = docs.joinpath("_build", "html")
result = cli.invoke(commands.build, [docs.as_posix()])
> assert result.exit_code == 0
E assert 1 == 0
E + where 1 = <Result SystemExit(1)>.exit_code
tests\test_build.py:149: AssertionError
============================== warnings summary ===============================
tests/test_build.py::test_build_from_template
C:\Users\Phil\repos\jupyter-book\jupyter_book\config.py:49: DeprecationWarning: The metaschema specified by $schema was not found. Using the latest draft to validate, but this will raise an error in the future.
validator_cls = jsonschema.validators.validator_for(schema)
c:\users\phil\repos\jupyter-book\.tox\py37-sphinx3\lib\site-packages\oset\pyoset.py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
from collections import MutableSet
-- Docs: https://docs.pytest.org/en/latest/warnings.html
======== 1 failed, 40 passed, 1 skipped, 2 warnings in 101.29 seconds =========
ERROR: InvocationError for command 'C:\Users\Phil\repos\jupyter-book\.tox\py37-sphinx3\Scripts\pytest.EXE' (exited with code 1)
_______________________________________________________ summary _______________________________________________________
ERROR: py37-sphinx3: commands failed
(dtox37):repos/jupyter-book
>
(dtox37):repos/jupyter-book
> jb build docs
Running Jupyter-Book v0.8.0
Source Folder: C:\Users\Phil\repos\jupyter-book\docs
Config Path: C:\Users\Phil\repos\jupyter-book\docs\_config.yml
Output Path: C:\Users\Phil\repos\jupyter-book\docs\_build\html
Running Sphinx v3.2.1
making output directory... done
myst v0.12.8: MdParserConfig(renderer='sphinx', commonmark_only=False, dmath_enable=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, amsmath_enable=True, deflist_enable=True, update_mathjax=True, admonition_enable=True, figure_enable=True, disable_syntax=[], html_img_enable=True, url_schemes=['mailto', 'http', 'https'])
loading intersphinx inventory from https://executablebooks.org/en/latest/objects.inv...
loading intersphinx inventory from https://myst-parser.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://myst-nb.readthedocs.io/en/latest/objects.inv...
loading intersphinx inventory from https://www.sphinx-doc.org/en/master/objects.inv...
loading intersphinx inventory from https://nbformat.readthedocs.io/en/latest/objects.inv...
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 36 source files that are out of date
updating environment: [new config] 36 added, 0 changed, 0 removed
checking for C:\Users\Phil\repos\jupyter-book\docs\references.bib in bibtex cache... not found
parsing bibtex file C:\Users\Phil\repos\jupyter-book\docs\references.bib... parsed 4 entries
reading sources... [100%] start/publish
Updating `nb-exec-table`s in: {'content/execute'}
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] start/publish
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:18: WARNING: 'myst' reference target not found: ..\start\build.md
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:30: WARNING: 'myst' reference target not found: ..\content\math.md
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:43: WARNING: 'myst' reference target not found: ..\advanced\advanced.md
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:60: WARNING: 'myst' reference target not found: ..\content\content-blocks.md
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:61: WARNING: 'myst' reference target not found: ..\content\figures.md
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:63: WARNING: 'myst' reference target not found: ..\content\content-blocks.md
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:64: WARNING: 'myst' reference target not found: ..\content\math.md
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:68: WARNING: 'myst' reference target not found: ..\file-types\jupytext.Rmd
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:82: WARNING: 'myst' reference target not found: ..\content\execute.md
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:85: WARNING: 'myst' reference target not found: ..\content\code-outputs.md
C:\Users\Phil\repos\jupyter-book\CHANGELOG.md:95: WARNING: 'myst' reference target not found: ..\content\content-blocks.md
generating indices... genindexdone
writing additional pages... searchdone
copying images... [100%] C:/Users/Phil/repos/jupyter-book/docs/_build/jupyter_execute/reference\cheatsheet_7_0.png1.png
copying downloadable files... [100%] references.bib
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 11 warnings.
The HTML pages are in docs\_build\html.
Copying tabs assets
Writing redirects...
(good) content-types\markdown.html --> file-types\markdown.html
(good) content-types\notebooks.html --> file-types\notebooks.html
(good) content-types\myst-notebooks.html --> file-types\myst-notebooks.html
(good) content-types\jupytext.html --> file-types\jupytext.html
(good) content-types\restructuredtext.html --> file-types\restructuredtext.html
===============================================================================
Finished generating HTML for book.
docs\_build\html\
You can look at your book by opening this file in a browser:
docs\_build\html\index.html
Or paste this line directly into your browser bar:
file://C:\Users\Phil\repos\jupyter-book\docs\_build\html\index.html
===============================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment