-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
150 lines (129 loc) · 4.66 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[project]
authors = [
{name = "Blair Conrad", email = "blair@blairconrad.com"},
]
classifiers=[
"License :: OSI Approved :: MIT License",
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Healthcare Industry",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Medical Science Apps.",
"Topic :: Software Development :: Libraries",
"Typing :: Typed",
]
dependencies = [
"pydicom>=3.0.1",
]
description="A tool for anonymizing DICOM files"
dynamic = ["version"]
keywords = [
"anonymize",
"deidentify",
"dicom",
]
name = "dicognito"
readme = "README.md"
requires-python = ">=3.10"
[project.scripts]
dicognito = "dicognito.__main__:main"
[project.urls]
Changelog = "https://github.com/blairconrad/dicognito/blob/main/src/dicognito/release_notes.md"
Documentation = "https://github.com/blairconrad/dicognito/blob/main/README.md"
Homepage = "https://github.com/blairconrad/dicognito"
Issues = "https://github.com/blairconrad/dicognito/issues"
Repository = "https://github.com/blairconrad/dicognito"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
dev-dependencies = [
"mypy",
"pytest",
"ruff",
]
[tool.hatch.version]
path = "src/dicognito/release_notes.md"
pattern = "^## (?P<version>.+)$"
[tool.mypy]
show_error_codes=true
show_error_context=true
show_column_numbers=true
pretty=true
color_output=true
warn_unreachable=true
allow_redefinition=false
# treat Optional per PEP 484
strict_optional=true
strict=true
[[tool.mypy.overrides]]
module="pydicom.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module="pytest."
ignore_missing_imports = true
[[tool.mypy.overrides]]
module="tests.*"
allow_untyped_defs = true
[tool.pytest.ini_options]
xfail_strict=true
[tool.ruff]
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN101", # choosing not to type-annotate self at this time.
"COM812", # may cause conflicts when used with the formatter.
"COM819", # may cause conflicts when used with the formatter.
"D203", # can either force a blank line before docstring or forbid.
"D206", # may cause conflicts when used with the formatter.
"D212", # can either force multi-line docstring to start on first or second line.
"E501", # may cause conflicts when used with the formatter.
"ISC001", # may cause conflicts when used with the formatter.
"PTH", # choosing not to swith to pathlib at this time.
"Q000", # may cause conflicts when used with the formatter.
"Q001", # may cause conflicts when used with the formatter.
"Q002", # may cause conflicts when used with the formatter.
"Q003", # may cause conflicts when used with the formatter.
"T201", # print calls are intentional.
"W191", # may cause conflicts when used with the formatter.
]
[tool.ruff.lint.flake8-annotations]
mypy-init-return = true
[tool.ruff.lint.per-file-ignores]
"assets/**" = [
"ANN001", # not public code. No type annotations needed.
"ANN201", # not public code. No type annotations needed.
"D100", # not public code. No docstrings needed.
"D103", # not public code. No docstrings needed.
"INP001", # assets isn't a namespace package.
"TRY002", # I don't care that much about custom exceptions.
]
"tests/**" = [
"ANN001", # not public code. No type annotations needed.
"ANN201", # not public code. No type annotations needed.
"D100", # not public code. No docstrings needed.
"D101", # not public code. No docstrings needed.
"D102", # not public code. No docstrings needed.
"D103", # not public code. No docstrings needed.
"D104", # not public code. No docstrings needed.
"PGH001", # eval is worth it in tests.
"S101", # assert is a key feature of tests.
"S307", # eval is worth it in tests.
"SLF001", # sometimes we just want to test privates.
]
"tools/**" = [
"D100", # tools don't count as public code. No docstrings needed.
"D103", # tools don't count as public code. No docstrings needed.
"INP001", # tools isn't a namespace package.
"TRY002", # I don't care that much about custom exceptions.
]
"tools/release-version.py" = [
"S603", # subprocess calls in release-version have been checked
"S607", # release-version is assumed to be running on trusted machine
]