From 48fd2d2559fe0470204d70b6ae5c896c88114dd9 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Sun, 11 Feb 2024 19:40:54 +0000 Subject: [PATCH] DOC: Add changelog to the documentation --- .gitignore | 2 ++ changelog.d/38.misc.md | 1 + docs/source/conf.py | 11 +++++++++++ docs/source/index.md | 1 + 4 files changed, 15 insertions(+) create mode 100644 changelog.d/38.misc.md diff --git a/.gitignore b/.gitignore index c13b759..c5a3679 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,5 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ .pdm-python +/docs/source/CHANGELOG.md +/docs/html/ diff --git a/changelog.d/38.misc.md b/changelog.d/38.misc.md new file mode 100644 index 0000000..1041909 --- /dev/null +++ b/changelog.d/38.misc.md @@ -0,0 +1 @@ +`asv_runner` now uses `towncrier` to manage the changelog, also adds the changeglog to the generated documentation. diff --git a/docs/source/conf.py b/docs/source/conf.py index a841bc8..253bd4e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -56,3 +56,14 @@ "source_branch": "main", "source_directory": "docs/", } + + +# ------------- Copying things +import os +import shutil + +docs_source_dir = os.path.abspath(os.path.dirname(__file__)) +project_root_dir = os.path.abspath(os.path.join(docs_source_dir, '..', '..')) +changelog_src = os.path.join(project_root_dir, 'CHANGELOG.md') +changelog_dest = os.path.join(docs_source_dir, 'CHANGELOG.md') +shutil.copyfile(changelog_src, changelog_dest) diff --git a/docs/source/index.md b/docs/source/index.md index abcf22c..bd12b08 100644 --- a/docs/source/index.md +++ b/docs/source/index.md @@ -24,6 +24,7 @@ measure and analyze the performance of your Python packages. apidocs/index bplugin-list +CHANGELOG ``` ## Indices and tables