forked from Kitware/pybsm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
181 lines (162 loc) · 5.28 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# :auto build-system:
[build-system]
requires = ["poetry-core>=1.9"]
build-backend = "poetry.core.masonry.api"
# :auto build-system:
# :auto package-meta:
[tool.poetry]
name = "pybsm"
license = "Apache-2.0"
readme = "README.md"
packages = [{include = "pybsm", from="src"}]
documentation = "https://pybsm.readthedocs.io/"
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: Apache Software License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Unix',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
# :auto package-meta:
# package-specific meta, don't put this in "generated package-meta"
authors = ["Kitware, Inc. <nrtk@kitware.com>"]
version = "0.7.0"
description = "pyBSM is a Python-based tool for sensor modeling. It provides common components useful for simulating the image formation process through different imaging systems."
[tool.poetry.dependencies]
python = "^3.8.1"
# Python capped to <3.13 because of:
# https://stackoverflow.com/questions/77431252/why-doesnt-poetry-select-the-good-version-of-my-dependency
numpy = [
{version = ">=1.22,<1.25", python = "~3.8"}, # CVE-2021-34141
{version = ">=1.22,^1.25", python = ">=3.9,<3.12" }, # CVE-2021-34141
{version = "^1.26", python = ">=3.12,<3.13" } # numpy==1.26 is the first release supporting python 3.12
]
matplotlib = ">=3.5.2"
# simulation.img2reflectance currently uses interpolate.interp1d but will be removed in scipy==1.14.0
# https://github.com/scipy/scipy/blob/44e4ebaac992fde33f04638b99629d23973cb9b2/scipy/interpolate/_interpolate.py#L118
scipy = [
{version = "<1.11.1", python = "~3.8.1"}, # Can't satisfy CVE-2023-25399 because it is too restrictive
{version = ">=1.10.0,<1.14", python = ">=3.9"}, # CVE-2023-25399
]
setuptools = ">=65.6.1"
opencv-python = {version = ">=4.6", optional = true}
opencv-python-headless = {version = ">=4.6", optional = true}
[tool.poetry.extras]
graphics = ["opencv-python"]
headless = ["opencv-python-headless"]
# :auto dev-linting:
# Linting
[tool.poetry.group.dev-linting]
optional = true
[tool.poetry.group.dev-linting.dependencies]
flake8 = ">=6"
flake8-mutable = ">=1.2.0"
pyproject-flake8 = ">=6"
mypy = ">=0.991,!=1.11.0"
pre-commit = ">=2.20"
ruff = "^0.1.0"
types-setuptools = ">=65.6.0.1"
black = {version = ">=24.3.0", extras=["jupyter"]}
# :auto dev-linting:
# :auto dev-docs:
# Docs
[tool.poetry.group.dev-docs]
optional = true
[tool.poetry.group.dev-docs.dependencies]
Sphinx = ">=5.3.0"
sphinx-copybutton = "^0.5.2"
sphinx-rtd-theme = ">=1.1.1"
sphinx-prompt = ">=1.5.0"
livereload = ">=2.6.3"
# :auto dev-docs:
# :auto dev-testing:
# Testing
[tool.poetry.group.dev-testing]
optional = true
[tool.poetry.group.dev-testing.dependencies]
coverage = ">=6.5.0"
pytest = ">=7.2.0"
pytest-cov = ">=4.0.0"
syrupy = ">=4.0.0"
# Jupyter notebook testing
notebook = ">=7.0.7"
papermill = ">=2.4.0"
# :auto dev-testing:
# :auto pytest:
[tool.pytest.ini_options]
addopts = [
"-lv", # Show local in trace-backs.
"--doctest-modules", # Increased verbosity.
"--tb=long", # Trace-back print mode.
"--cov=./src/pybsm", # Cover our package specifically
"--cov=./tests", # Also cover our tests for dead spots
"--cov-report=term", # Coverage report to terminal
"--cov-report=xml:coverage.xml", # for external tool reporting
]
testpaths = [
"tests",
"src/pybsm",
]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
]
# :auto pytest:
# :auto flake8:
[tool.flake8]
exclude = [
"__pycache__",
".eggs",
".venv",
"docs",
"scripts"
]
# While a max length of 79 is encouraged, sometimes going over makes more sense
# for overall clarity.
max-line-length = 120
# :auto flake8:
# :auto black:
[tool.black]
# The regular expression pattern must be written as a single line;
# otherwise pytest-black fails to exclude the folders. For details see
# https://github.com/shopkeep/pytest-black/issues/36
exclude = '(/(\.git|.venv|.eggs|docs|scripts$)/)'
line-length = 120
# :auto black:
# :auto ruff:
[tool.ruff]
select = ["E", "W", "F", "I", "D", "A", "B", "N", "YTT", "C4", "PT"]
line-length = 120
ignore = [
# -- Ignore these rules, since they contradict our coding standards
"C408", # JATIC guidelines prefer "list()", rather than "[]", to create an empty list
"C416", # JATIC guidelines prefer "dict()", rather than "{}", to create an empty dict
# -- Ignoring these "Missing Docstring" errors for now, we will fix later
"D100", "D101", "D102", "D103", "D104", "D105", "D107"
]
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.pycodestyle]
max-doc-length = 120
[tool.ruff.isort]
known-first-party = ["pybsm"]
# :auto ruff:
# :auto mypy:
[tool.mypy]
python_version = "3.8"
disallow_untyped_defs = true
ignore_errors = false
ignore_missing_imports = true
strict_optional = false
incremental = false
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
# :auto mypy: