From c84af625a503fc4983337c659d539b9ef6afc4c6 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 17 Oct 2023 09:10:15 -0400 Subject: [PATCH] docs: add changelog (#115) * docs: add changelog Signed-off-by: Henry Schreiner * Update pyproject.toml --------- Signed-off-by: Henry Schreiner --- docs/changelog.md | 7 +++++++ docs/conf.py | 11 +++++++++++ docs/index.rst | 1 + pyproject.toml | 1 + 4 files changed, 20 insertions(+) create mode 100644 docs/changelog.md diff --git a/docs/changelog.md b/docs/changelog.md new file mode 100644 index 0000000..2941b6e --- /dev/null +++ b/docs/changelog.md @@ -0,0 +1,7 @@ +# Changelog + +```{changelog} +:changelog-url: https://github.com/scikit-hep/uhi/releases +:github: https://github.com/scikit-hep/uhi/releases +:pypi: https://pypi.org/project/uhi +``` diff --git a/docs/conf.py b/docs/conf.py index 02db719..de207c3 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,6 +6,7 @@ from __future__ import annotations +import os import sys if sys.version_info < (3, 8): @@ -33,6 +34,7 @@ "myst_parser", "sphinx.ext.napoleon", "sphinx_copybutton", + "sphinx_github_changelog", ] source_suffix = [".rst", ".md"] @@ -45,8 +47,17 @@ # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = "furo" + + +# -- Changelog builder ------------------------------------------------------- + +sphinx_github_changelog_token = os.environ.get("GITHUB_API_TOKEN") + +commit = os.environ.get("READTHEDOCS_GIT_COMMIT_HASH", "main") +code_url = "https://github.com/scientific-python/repo-review/blob" diff --git a/docs/index.rst b/docs/index.rst index 0f925f9..55cc258 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,6 +30,7 @@ to plot a histogram, including error bars. indexing.rst indexing+.rst plotting.rst + changelog.md diff --git a/pyproject.toml b/pyproject.toml index 7915192..1ba50a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ docs = [ "furo", "sphinx-copybutton>=0.3.1", "myst-parser", + "sphinx_github_changelog", ] test = [ "pytest>=6",