diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c483fabe5f..df656a00d8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -153,9 +153,9 @@ All code requires testing. We use the [pytest](https://docs.pytest.org/en/stable We use following plugins for various needs: -[nbmake](https://github.com/treebeardtech/nbmake)) : plugins to test the example notebooks. +[nbmake](https://github.com/treebeardtech/nbmake/) : plugins to test the example notebooks. -[pytest-xdist](https://pypi.org/project/pytest-xdist/)) : plugins to run tests in parallel. +[pytest-xdist](https://pypi.org/project/pytest-xdist/) : plugins to run tests in parallel. If you have `nox` installed, to run unit tests, type diff --git a/docs/conf.py b/docs/conf.py index 1d26e7ce38..a2a12bf04f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -176,13 +176,21 @@ html_sidebars = {"**": ["sidebar-nav-bs.html", "sidebar-ethical-ads.html"]} # For edit button -html_context = { - "github_user": "pybamm-team", - "github_repo": "pybamm", - "github_version": "develop", - "doc_path": "docs/", -} +html_context.update( + { + "github_user": "pybamm-team", + "github_repo": "pybamm", + "github_version": "develop", + "doc_path": "docs/", + } +) + +# Set canonical URL from the Read the Docs Domain +html_baseurl = os.getenv("READTHEDOCS_CANONICAL_URL", "") +# Tell Jinja2 templates the build is running on Read the Docs +if os.getenv("READTHEDOCS") == "True": + html_context["READTHEDOCS"] = True # -- Options for HTMLHelp output ---------------------------------------------