diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 2953340d..1249ef45 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,6 +10,11 @@ build: os: ubuntu-22.04 tools: python: "3.10" + jobs: + pre_build: + cd docs + sh examples_to_rst.sh + cd - python: # Install our python package before building the docs diff --git a/docs/examples_to_rst.sh b/docs/examples_to_rst.sh new file mode 100644 index 00000000..fc08ec2f --- /dev/null +++ b/docs/examples_to_rst.sh @@ -0,0 +1,6 @@ +jupyter nbconvert --to rst ../examples/sonata-network/sonata-network.ipynb +jupyter nbconvert --to rst ../examples/nmc-portal/L5TTPC2.ipynb +cp ../examples/sonata-network/sonata-network.rst source/ +cp -r ../examples/sonata-network/sonata-network_files source/ +cp ../examples/nmc-portal/L5TTPC2.rst source/nmc-portal.rst +cp -r ../examples/nmc-portal/L5TTPC2_files source/ \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index ec3662aa..e0fe7638 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -55,7 +55,8 @@ # General information about the project. project = u'eFEL' -copyright = u'2015-2024, BBP, EPFL' +# do not define copyright here, in order to use the default Blue Brain project copyright +# copyright = u'2015-2024, BBP, EPFL' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -108,7 +109,8 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinx_rtd_theme' +html_theme = "sphinx-bluebrain-theme" +# html_theme = 'sphinx_rtd_theme' # html_theme = 'haiku-bbp' # Theme options are theme-specific and customize the look and feel of a theme diff --git a/requirements_docs.txt b/requirements_docs.txt index 62bc658e..2df0b397 100644 --- a/requirements_docs.txt +++ b/requirements_docs.txt @@ -25,6 +25,7 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. sphinx>=7.2.6 +sphinx-bluebrain-theme sphinx_rtd_theme>=2.0.0 sphinx-autobuild>=2021.3.14 sphinx-autorun>=1.1.1 diff --git a/tox.ini b/tox.ini index 34c5c8a0..a2f4b8f8 100644 --- a/tox.ini +++ b/tox.ini @@ -76,15 +76,11 @@ allowlist_externals = make jupyter cp + sh changedir = docs commands = - jupyter nbconvert --to rst ../examples/sonata-network/sonata-network.ipynb - jupyter nbconvert --to rst ../examples/nmc-portal/L5TTPC2.ipynb - cp ../examples/sonata-network/sonata-network.rst source/ - cp -r ../examples/sonata-network/sonata-network_files source/ - cp ../examples/nmc-portal/L5TTPC2.rst source/nmc-portal.rst - cp -r ../examples/nmc-portal/L5TTPC2_files source/ + sh examples_to_rst.sh # build the docs to see if it builds fine make html SPHINXOPTS=-W # make sure the feature names and units are up-to-date