Skip to content

Commit 2b9c7b8

Browse files
authored
Fix readthedocs build errors (#402)
* Fix doc build errors * Fixes to conf.py
1 parent b645499 commit 2b9c7b8

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

docs/conf.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#
1313
import os
1414
import sys
15-
import pkg_resources
1615
import datetime
16+
import importlib.metadata
1717

1818
source_dir = os.path.dirname(__file__)
1919
pkg_dir = os.path.join(source_dir, '..', '..', 'src', 'highdicom')
@@ -23,14 +23,15 @@
2323

2424
project = 'highdicom'
2525
copyright = f'2020-{datetime.datetime.now().year}, highdicom contributors'
26-
author = 'Markus D. Herrmann'
26+
author = 'Markus D. Herrmann, Christopher P. Bridge'
2727

2828
# The full version, including alpha/beta/rc tags
2929
try:
30-
release = pkg_resources.get_distribution('highdicom').version
31-
except pkg_resources.DistributionNotFound:
30+
release = importlib.metadata.version("highdicom")
31+
except importlib.metadata.PackageNotFoundError:
3232
print('Package "highdicom" must be installed to build docs.')
3333
sys.exit(1)
34+
3435
# The short X.Y version
3536
version = '.'.join(release.split('.')[:2])
3637

@@ -48,7 +49,7 @@
4849
'sphinxcontrib.autoprogram',
4950
'sphinx.ext.autodoc',
5051
'sphinx.ext.napoleon',
51-
'sphinx_autodoc_typehints',
52+
# 'sphinx_autodoc_typehints',
5253
'sphinx.ext.extlinks',
5354
]
5455

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ test = [
5656
"pytest-flake8==1.3.0",
5757
]
5858
docs = [
59-
"sphinx-autodoc-typehints==1.17.0",
60-
"sphinx-pyreverse==0.0.17",
61-
"sphinx-rtd-theme==1.0.0",
62-
"sphinxcontrib-autoprogram==0.1.7",
63-
"sphinxcontrib-websupport==1.2.4",
59+
"sphinx-autodoc-typehints==3.9.9",
60+
"sphinx-pyreverse==0.0.18",
61+
"sphinx-rtd-theme==3.1.0",
62+
"sphinxcontrib-autoprogram==0.1.9",
63+
"sphinxcontrib-websupport==2.0.0",
6464
]
6565

6666
[project.urls]

src/highdicom/seg/sop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def __init__(
218218
"""
219219
Parameters
220220
----------
221-
source_images: Sequence[Dataset]
221+
source_images: Sequence[pydicom.Dataset]
222222
Image(s) from which this segmentation was derived. A sequence
223223
containing either one or more single-frame images, or exactly one
224224
multi-frame image. Passing the metadata of the image(s) is

0 commit comments

Comments
 (0)