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: | diff --git a/docs/source/conf.py b/docs/source/conf.py index 055b6355..6a67f190 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 ----------------------------------------------------- @@ -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 = [