From 95c59333590599893e78d4cfe090962efffbce03 Mon Sep 17 00:00:00 2001 From: Kento Nozawa Date: Sat, 25 Jan 2025 19:40:25 +0900 Subject: [PATCH 1/3] Update python version to 3.12 --- .github/workflows/sphinx-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sphinx-build.yml b/.github/workflows/sphinx-build.yml index c94fcc3b..2c50c3cc 100644 --- a/.github/workflows/sphinx-build.yml +++ b/.github/workflows/sphinx-build.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install Dependencies run: | From 9cf2bc0c248e99085912283e9ebd69a815f3eda1 Mon Sep 17 00:00:00 2001 From: Kento Nozawa Date: Sat, 25 Jan 2025 19:47:06 +0900 Subject: [PATCH 2/3] Replace deprecated `pkg_resources`. Ref: https://setuptools.pypa.io/en/latest/pkg_resources.html --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 055b6355..478dd6fa 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,10 +16,10 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) -import pkg_resources +from importlib.metadata import version -__version__ = pkg_resources.get_distribution("optuna-integration").version +__version__ = version("optuna-integration") # -- Project information ----------------------------------------------------- From e77f30936495e52eee1014354a0572ad9b0a2c42 Mon Sep 17 00:00:00 2001 From: Kento Nozawa Date: Sat, 25 Jan 2025 19:53:13 +0900 Subject: [PATCH 3/3] Use sphinx-notfound-page --- docs/source/conf.py | 1 + pyproject.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 478dd6fa..6a67f190 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -42,6 +42,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + "notfound.extension", "sphinx.ext.autodoc", "sphinx.ext.autosummary", "sphinx.ext.doctest", diff --git a/pyproject.toml b/pyproject.toml index 96f0346e..f683bf7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,6 +56,7 @@ document = [ "scikit-learn>=0.24.2", "scipy>=1.9.2; python_version>='3.8'", "sphinx", + "sphinx-notfound-page", "sphinx_rtd_theme", ] allennlp = [