Skip to content

Commit

Permalink
Move performance to an example.
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmabus committed Dec 21, 2022
1 parent 26c48e4 commit e98cd84
Show file tree
Hide file tree
Showing 4 changed files with 263 additions and 200 deletions.
25 changes: 25 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@
# import sys
# sys.path.insert(0, '/home/carlos/git/dcor/dcor')


import os
import sys

import pkg_resources
# Patch sphinx_gallery.binder.gen_binder_rst so as to point to .py file in
# repository
import sphinx_gallery.binder

try:
release = pkg_resources.get_distribution('dcor').version
Expand Down Expand Up @@ -269,3 +273,24 @@
bibtex_bibfiles = ['refs.bib']

autodoc_typehints = "description"

# Binder integration
# Taken from
# https://stanczakdominik.github.io/posts/simple-binder-usage-with-sphinx-gallery-through-jupytext/
original_gen_binder_rst = sphinx_gallery.binder.gen_binder_rst


def patched_gen_binder_rst(*args, **kwargs):
return original_gen_binder_rst(*args, **kwargs).replace(
"../examples/auto_",
"",
).replace(
".ipynb",
".py",
)


# # And then we finish our monkeypatching misdeed by redirecting

# sphinx-gallery to use our function:
sphinx_gallery.binder.gen_binder_rst = patched_gen_binder_rst
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ References
theory
auto_examples/index
apilist
performance
energycomparison
development

Expand Down
199 changes: 0 additions & 199 deletions docs/performance.rst

This file was deleted.

0 comments on commit e98cd84

Please sign in to comment.