forked from XAITK/xaitk-saliency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
146 lines (140 loc) · 6.22 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
[build-system]
requires = ["poetry-core>=1.0.8"]
build-backend = "poetry.core.masonry.api"
###############################################################################
[tool.poetry]
name = "xaitk_saliency"
# REMEMBER: `distutils.version.*Version` types can be used to compare versions
# from strings like this.
# This package prefers to use the strict numbering standard when possible.
version = "0.8.3"
description = """\
Visual saliency map generation interfaces and baseline implementations \
for explainable AI."""
license = "BSD-3-Clause"
authors = ["Kitware, Inc. <[email protected]>"]
readme = "README.md"
repository = "https://github.com/XAITK/xaitk-saliency"
documentation = "https://xaitk-saliency.readthedocs.io/"
classifiers = [
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD 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',
]
[tool.poetry.dependencies]
python = "^3.8"
# 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" } # py3.12 only supports >= 1.26
]
scikit-image = [
# Hinge because minimum support 0.20.0 for py3.11
{ version = ">=0.18.1", python = "<3.11" },
{ version = ">=0.20.0", python = ">=3.11, <3.12" },
{ version = ">=0.22.0", python = ">=3.12" }
]
scikit-learn = [
{version = ">=1.2", python = "<3.9"},
{version = ">=1.5", python = ">=3.9"}
]
smqtk-classifier = ">=0.17.0"
smqtk-core = ">=0.18.0"
smqtk-descriptors = ">=0.16.0"
smqtk-detection = ">=0.19.0"
scipy = [
{version = "<1.11.1", python = "~3.8.1"}, # Can't satisfy CVE-2023-25399 because it is too restrictive
{version = ">=1.9", python = "^3.11"}
]
click = ">=8.0.3"
setuptools = "*"
# Optionals for "example" extra
notebook = { version = ">=7.0.7", optional = true }
matplotlib = { version=">=3.4.1", optional = true }
papermill = { version = ">=2.3.3", optional = true }
torch = {version = ">=1.9.0,!=2.0.1", optional = true}
torchvision = {version = ">=0.10.0", optional = true}
tqdm = { version = "4.66.3", optional = true } # CVE-2024-34062
# Optionals for "tools" extra"
kwcoco = { version = ">=0.2.18", optional = true}
pyyaml = {version = ">=6.0.1", optional = true, python = ">=3.12"}
shapely = {version = ">=2.0.2", optional = true, python = ">=3.12"}
[tool.poetry.extras]
example_deps = [ "notebook", "matplotlib", "papermill", "torch", "torchvision", "tqdm" ]
tools = [ "kwcoco", "matplotlib", "pyyaml", "shapely" ]
[tool.poetry.dev-dependencies]
# CI
flake8 = [
# Hinge because 6.0 minimum supported python version is 3.8.1
{ version = ">=5", python = "<3.8.1" },
{ version = ">=6", python = ">=3.8.1" }
]
flake8-mutable = ">=1.2"
mypy = ">=0.991"
types-setuptools = ">=57.0.0"
# Docs
# - Also see: `docs/readthedocs-reqs.txt` for use by RTD
Sphinx = [
# Hinge because, while sphinx >=5.3 supports python <3.8.1, it requires an
# importlib-metadata version higher than what flake8 ^5 supports, which is
# the version of flake8 required for python version <3.8.1.
{ version = ">=4.3.2", python = "<3.8.1" },
{ version = ">=5.3", python = ">=3.8.1"}
]
sphinx-rtd-theme = ">=1.1.1"
sphinx-prompt = ">=1.5"
livereload = ">=2.6.3"
# Testing
coverage = ">=6.5.0"
pytest = ">=7.2.0"
pytest-cov = ">=4.0.0"
# Utility
notebook = ">=7.0.7"
[tool.poetry.scripts]
sal-on-coco-dets= "xaitk_saliency.utils.bin.sal_on_coco_dets:sal_on_coco_dets"
[tool.poetry.plugins."smqtk_plugins"]
# Add implementation sub-module exposure here.
"impls.perturb_image.sliding_window" = "xaitk_saliency.impls.perturb_image.sliding_window"
"impls.perturb_image.rise" = "xaitk_saliency.impls.perturb_image.rise"
"impls.perturb_image.random_grid" = "xaitk_saliency.impls.perturb_image.random_grid"
"impls.perturb_image.sliding_radial" = "xaitk_saliency.impls.perturb_image.sliding_radial"
"impls.gen_classifier_conf_sal.occlusion_scoring" = "xaitk_saliency.impls.gen_classifier_conf_sal.occlusion_scoring"
"impls.gen_classifier_conf_sal.rise_scoring" = "xaitk_saliency.impls.gen_classifier_conf_sal.rise_scoring"
"impls.gen_descriptor_sim_sal.similarity_scoring" = "xaitk_saliency.impls.gen_descriptor_sim_sal.similarity_scoring"
"impls.gen_image_classifier_blackbox_sal.occlusion_based" = "xaitk_saliency.impls.gen_image_classifier_blackbox_sal.occlusion_based"
"impls.gen_image_classifier_blackbox_sal.rise" = "xaitk_saliency.impls.gen_image_classifier_blackbox_sal.rise"
"impls.gen_detector_prop_sal.drise_scoring" = "xaitk_saliency.impls.gen_detector_prop_sal.drise_scoring"
"impls.gen_object_detector_blackbox_sal.drise" = "xaitk_saliency.impls.gen_object_detector_blackbox_sal.drise"
"impls.gen_object_detector_blackbox_sal.occlusion_based" = "xaitk_saliency.impls.gen_object_detector_blackbox_sal.occlusion_based"
"impls.gen_image_similarity_blackbox_sal.occlusion_based" = "xaitk_saliency.impls.gen_image_similarity_blackbox_sal.occlusion_based"
"image.gen_image_similarity_blackbox_sal.sbsm" = "xaitk_saliency.impls.gen_image_similarity_blackbox_sal.sbsm"
###############################################################################
[tool.pytest.ini_options]
addopts = [
"-lv", # Show local in trace-backs.
"--doctest-modules", # Increased verbosity.
"--tb=long", # Trace-back print mode.
"--cov=./xaitk_saliency", # 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",
"xaitk_saliency",
]
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
]