Skip to content

Commit

Permalink
Fix install and use of Jupyter Kernel for docs (#845)
Browse files Browse the repository at this point in the history
* Try to fix Jupyter kernel name

* Display kernels in tox.ini

* Install kernel because it is not installed apparently

* Add ipykernel to dependencies

* Add correct way to set kernel name
  • Loading branch information
IvanIsCoding committed Mar 23, 2023
1 parent e65185c commit de75534
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@
u'rustworkx Contributors', 'manual'),
]

# Jupyter Sphinx options
jupyter_execute_default_kernel = "python3"

# Texinfo options

texinfo_documents = [
Expand Down
1 change: 1 addition & 0 deletions docs/source/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ qiskit-sphinx-theme>=1.7
matplotlib>=3.4
sphinx-reredirects
sphinxemoji
ipykernel
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ deps =
passenv = {[testenv]passenv} RETWORKX_DEV_DOCS RETWORKX_LEGACY_DOCS
changedir = {toxinidir}/docs
commands =
python -m ipykernel install --user
jupyter kernelspec list
sphinx-build -W -b html source build/html {posargs}

[testenv:black]
Expand Down

0 comments on commit de75534

Please sign in to comment.