diff --git a/examples/conf.py b/examples/conf.py index 9e85afecb..9893f5a80 100644 --- a/examples/conf.py +++ b/examples/conf.py @@ -70,7 +70,8 @@ ], } version = os.environ.get("READTHEDOCS_VERSION", "") -version = version if "-" in version else "main" +version = version if "." in version else "main" +doi_code = os.environ.get("READTHEDOCS_DOI", "10.5281/zenodo.5654871") html_context = { "github_url": "https://github.com", "github_user": "pymc-devs", @@ -78,8 +79,8 @@ "github_version": version, "doc_path": "examples/", "sandbox_repo": f"pymc-devs/pymc-sandbox/{version}", - "doi_url": "https://doi.org/10.5281/zenodo.5654871", - "doi_code": "10.5281/zenodo.5654871", + "doi_url": f"https://doi.org/{doi_code}", + "doi_code": doi_code, } @@ -122,6 +123,7 @@ "pip_dependencies": "{{ extra_dependencies }}", "conda_dependencies": "{{ extra_dependencies }}", "extra_install_notes": "", + "doi_code": doi_code, } jupyter_execute_notebooks = "off"