Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kwant
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joseph Weston
kwant
Commits
9fc01a7e
Commit
9fc01a7e
authored
5 years ago
by
Joseph Weston
Browse files
Options
Downloads
Patches
Plain Diff
add jupyter-sphinx to documentation config
parent
182beca1
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+2
-2
2 additions, 2 deletions
.gitlab-ci.yml
doc/source/conf.py
+10
-4
10 additions, 4 deletions
doc/source/conf.py
with
12 additions
and
6 deletions
.gitlab-ci.yml
+
2
−
2
View file @
9fc01a7e
...
...
@@ -241,7 +241,7 @@ build documentation:
script
:
-
pip install git+https://github.com/jupyter-widgets/jupyter-sphinx
-
python -m ipykernel install --user --name kwant-latest
-
make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
-
make -C doc realclean; make -C doc html SPHINXOPTS='-A website_deploy=True -n -W
-D jupyter_execute_default_kernel=kwant-latest
' SOURCE_LINK_TEMPLATE="$CI_PROJECT_URL"/blob/\$\$r/\$\$f
artifacts
:
paths
:
-
doc/build/html/
...
...
@@ -255,7 +255,7 @@ build PDF documentation:
script
:
-
pip install git+https://github.com/jupyter-widgets/jupyter-sphinx
-
python -m ipykernel install --user --name kwant-latest
-
make -C doc latex SPHINXOPTS='-n -W'
-
make -C doc latex SPHINXOPTS='-n -W
-D jupyter_execute_default_kernel=kwant-latest
'
-
cd doc/build/latex
-
make all-pdf
artifacts
:
...
...
This diff is collapsed.
Click to expand it.
doc/source/conf.py
+
10
−
4
View file @
9fc01a7e
...
...
@@ -15,8 +15,15 @@ import sys
import
os
import
string
from
distutils.util
import
get_platform
sys
.
path
.
insert
(
0
,
"
../../build/lib.{0}-{1}.{2}
"
.
format
(
get_platform
(),
*
sys
.
version_info
[:
2
]))
package_path
=
os
.
path
.
abspath
(
"
../../build/lib.{0}-{1}.{2}
"
.
format
(
get_platform
(),
*
sys
.
version_info
[:
2
]))
# Insert into sys.path so that we can import kwant here
sys
.
path
.
insert
(
0
,
package_path
)
# Insert into PYTHONPATH so that jupyter-sphinx will pick it up
os
.
environ
[
'
PYTHONPATH
'
]
=
'
:
'
.
join
((
package_path
,
os
.
environ
.
get
(
'
PYTHONPATH
'
,
''
)))
import
kwant
import
kwant.qsymm
...
...
@@ -31,7 +38,7 @@ sys.path.insert(0, os.path.abspath('../sphinxext'))
extensions
=
[
'
sphinx.ext.autodoc
'
,
'
sphinx.ext.autosummary
'
,
'
sphinx.ext.todo
'
,
'
sphinx.ext.mathjax
'
,
'
numpydoc
'
,
'
kwantdoc
'
,
'
sphinx.ext.linkcode
'
]
'
kwantdoc
'
,
'
sphinx.ext.linkcode
'
,
'
jupyter_sphinx.execute
'
]
# Add any paths that contain templates here, relative to this directory.
templates_path
=
[
'
../templates
'
]
...
...
@@ -239,7 +246,6 @@ autosummary_generate = True
autoclass_content
=
"
both
"
autodoc_default_flags
=
[
'
show-inheritance
'
]
# -- Teach Sphinx to document bound methods like functions ---------------------
import
types
from
sphinx.ext
import
autodoc
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment