Skip to content

Commit 8ddcd6b

Browse files
setup.py → pyproject.toml (#293)
1 parent b7f81f6 commit 8ddcd6b

7 files changed

Lines changed: 85 additions & 92 deletions

File tree

.github/workflows/run_unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip setuptools
30-
pip install -r requirements_test.txt
30+
pip install .[test]
3131
pip install ${{ matrix.dependencies }}
3232
- name: Lint with flake8
3333
run: |

docs/development.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Install requirements:
6161

6262
.. code-block:: none
6363
64-
pip install -r ~/highdicom/requirements_test.txt
64+
pip install .[test]
6565
6666
Run tests (including checks for PEP8 compliance):
6767

@@ -79,7 +79,7 @@ Install requirements:
7979

8080
.. code-block:: none
8181
82-
pip install -r ~/highdicom/requirements_docs.txt
82+
pip install .[docs]
8383
8484
Build documentation in *HTML* format:
8585

pyproject.toml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
[build-system]
2+
requires = ["setuptools>=64"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "highdicom"
7+
dynamic = ["version"]
8+
description = "High-level DICOM abstractions."
9+
readme = "README.md"
10+
requires-python = ">=3.6"
11+
authors = [
12+
{ name = "Markus D. Herrmann" },
13+
]
14+
maintainers = [
15+
{ name = "Markus D. Herrmann" },
16+
]
17+
classifiers = [
18+
"Development Status :: 4 - Beta",
19+
"Intended Audience :: Science/Research",
20+
"License :: OSI Approved :: MIT License",
21+
"Operating System :: MacOS",
22+
"Operating System :: Microsoft :: Windows",
23+
"Operating System :: POSIX :: Linux",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3.6",
26+
"Programming Language :: Python :: 3.7",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
"Topic :: Multimedia :: Graphics",
33+
"Topic :: Scientific/Engineering :: Information Analysis",
34+
]
35+
dependencies = [
36+
"numpy>=1.19",
37+
"pillow-jpls>=1.0",
38+
"pillow>=8.3",
39+
"pydicom>=2.3.0,!=2.4.0",
40+
]
41+
42+
[project.optional-dependencies]
43+
libjpeg = [
44+
"pylibjpeg-libjpeg>=1.3",
45+
"pylibjpeg-openjpeg>=1.2",
46+
"pylibjpeg>=1.4",
47+
]
48+
test = [
49+
"mypy==0.971",
50+
"pytest==7.1.2",
51+
"pytest-cov==3.0.0",
52+
"pytest-flake8==1.1.1",
53+
"numpy-stubs @ git+https://github.com/numpy/numpy-stubs@201115370a0c011d879d69068b60509accc7f750",
54+
]
55+
docs = [
56+
"sphinx-autodoc-typehints==1.17.0",
57+
"sphinx-pyreverse==0.0.17",
58+
"sphinx-rtd-theme==1.0.0",
59+
"sphinxcontrib-autoprogram==0.1.7",
60+
"sphinxcontrib-websupport==1.2.4",
61+
]
62+
63+
[project.urls]
64+
homepage = "https://github.com/imagingdatacommons/highdicom"
65+
documentation = "https://highdicom.readthedocs.io/"
66+
repository = "https://github.com/ImagingDataCommons/highdicom.git"
67+
68+
[tool.pytest.ini_options]
69+
addopts = "--doctest-modules"
70+
testpaths = ["tests"]
71+
log_cli_level = "INFO"
72+
73+
[tool.mypy]
74+
warn_unreachable = true
75+
76+
[[tool.mypy.overrides]]
77+
module = "mypy-pydicom.*"
78+
ignore_missing_imports = true
79+
80+
[[tool.mypy.overrides]]
81+
module = "mypy-PIL.*"
82+
ignore_missing_imports = true

requirements_docs.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

requirements_test.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.cfg

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,3 @@ test=pytest
55
max_line_length = 80
66
ignore = E121 E125 W504
77
statistics = True
8-
9-
[mypy]
10-
warn_unreachable = True
11-
12-
[mypy-pydicom.*]
13-
ignore_missing_imports = True
14-
15-
[mypy-PIL.*]
16-
ignore_missing_imports = True
17-
18-
[tool:pytest]
19-
python_files = tests/*.py
20-
log_cli_level = INFO
21-
addopts = --doctest-modules

setup.py

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)