diff --git a/docs/conf.py b/docs/conf.py index 9bc0c489..8c9f0efa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,8 +12,8 @@ # import os import sys -import pkg_resources import datetime +import importlib.metadata source_dir = os.path.dirname(__file__) pkg_dir = os.path.join(source_dir, '..', '..', 'src', 'highdicom') @@ -23,14 +23,15 @@ project = 'highdicom' copyright = f'2020-{datetime.datetime.now().year}, highdicom contributors' -author = 'Markus D. Herrmann' +author = 'Markus D. Herrmann, Christopher P. Bridge' # The full version, including alpha/beta/rc tags try: - release = pkg_resources.get_distribution('highdicom').version -except pkg_resources.DistributionNotFound: + release = importlib.metadata.version("highdicom") +except importlib.metadata.PackageNotFoundError: print('Package "highdicom" must be installed to build docs.') sys.exit(1) + # The short X.Y version version = '.'.join(release.split('.')[:2]) @@ -48,7 +49,7 @@ 'sphinxcontrib.autoprogram', 'sphinx.ext.autodoc', 'sphinx.ext.napoleon', - 'sphinx_autodoc_typehints', + # 'sphinx_autodoc_typehints', 'sphinx.ext.extlinks', ] diff --git a/pyproject.toml b/pyproject.toml index d161a276..c9469dd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,11 +56,11 @@ test = [ "pytest-flake8==1.3.0", ] docs = [ - "sphinx-autodoc-typehints==1.17.0", - "sphinx-pyreverse==0.0.17", - "sphinx-rtd-theme==1.0.0", - "sphinxcontrib-autoprogram==0.1.7", - "sphinxcontrib-websupport==1.2.4", + "sphinx-autodoc-typehints==3.9.9", + "sphinx-pyreverse==0.0.18", + "sphinx-rtd-theme==3.1.0", + "sphinxcontrib-autoprogram==0.1.9", + "sphinxcontrib-websupport==2.0.0", ] [project.urls] diff --git a/src/highdicom/seg/sop.py b/src/highdicom/seg/sop.py index 6399856a..44f91238 100644 --- a/src/highdicom/seg/sop.py +++ b/src/highdicom/seg/sop.py @@ -218,7 +218,7 @@ def __init__( """ Parameters ---------- - source_images: Sequence[Dataset] + source_images: Sequence[pydicom.Dataset] Image(s) from which this segmentation was derived. A sequence containing either one or more single-frame images, or exactly one multi-frame image. Passing the metadata of the image(s) is