-
Notifications
You must be signed in to change notification settings - Fork 33
/
pyproject.toml
154 lines (132 loc) · 4.08 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
[build-system]
requires = ["hatchling>=1.25"]
build-backend = "hatchling.build"
[project]
name = "model-signing"
dynamic = ["version"]
description = "A tool for signing and verifying ML models"
readme = "README.model_signing.md" # TODO: Merge READMEs and update
license = { file = "LICENSE" }
authors = [
{ name = "Sigstore Authors", email = "[email protected]" }
]
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Security",
"Topic :: Security :: Cryptography",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Typing :: Typed",
]
dependencies = [
"cryptography", # TODO: make pki a feature
"in-toto-attestation",
"sigstore",
"typing_extensions",
]
requires-python = ">=3.10"
keywords = [
"machine learning",
"artificial intelligence",
"model signing",
"AI security",
"ML security",
"AI supply chain security",
"ML supply chain security",
]
[project.urls]
Homepage = "https://pypi.org/project/model-signing/"
Changelog = "https://github.com/sigstore/model-transparency/blob/main/CHANGELOG.md"
Documentation = "https://sigstore.github.io/model-transparency/model_signing.html"
Source = "https://github.com/sigstore/model-transparency"
Issues = "https://github.com/sigstore/model-transparency/issues"
PyPI = "https://pypi.org/project/model-signing/"
[tool.hatch.version]
path = "src/model_signing/__init__.py"
[tool.hatch.build]
packages = ["src/model_signing"]
[tool.hatch.envs.hatch-test]
installer = "pip"
parallel = true
randomize = true
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.10", "3.11", "3.12", "3.13"]
[tool.hatch.envs.bench]
description = """Custom environment for running benchmarks.
Use `hatch run +py=3... bench:generate ${args}` to generate test models.
Use `hatch run +py=3... bench:serialize ${args}` to benchmark serialization code.
"""
extra-dependencies = [
"numpy",
]
[[tool.hatch.envs.bench.matrix]]
python = ["3.10", "3.11", "3.12", "3.13"]
[tool.hatch.envs.bench.scripts]
generate = "python benchmarks/generate.py {args}"
serialize = "python benchmarks/serialize.py {args}"
[tool.hatch.envs.docs]
description = """Custom environment for pdoc.
Use `hatch run docs:serve` to view documentation.
"""
extra-dependencies = [
"pdoc"
]
[tool.hatch.envs.docs.scripts]
serve = "pdoc model_signing --docformat google --edit-url model_signing=https://github.com/sigstore/model-transparency/blob/main/src/model_signing/ {args}"
build = "serve --output-directory html"
[tool.hatch.envs.type]
description = """Custom environment for pytype.
Use `hatch run type:check` to check types.
"""
extra-dependencies = [
"pytest",
"pytype",
]
installer = "pip"
python = "3.11"
[tool.hatch.envs.type.scripts]
check = "pytype -k -j auto src tests benchmarks"
[tool.coverage.report]
exclude_also = [
"pass",
"return NotImplemented",
]
omit = ["tests/*"]
show_missing = true
skip_covered = true
skip_empty = true
# Add support for testing via the old `pytest .` way, too.
[tool.pytest.ini_options]
pythonpath = "src"
[tool.ruff]
line-length = 80
[tool.ruff.format]
docstring-code-format = true
line-ending = "lf"
skip-magic-trailing-comma = true
[tool.ruff.lint]
select = ["B", "D", "E", "F", "I", "N", "PLC", "PLE", "PT", "SIM", "UP", "W"]
ignore = [
# TODO: selectively enable back most of these in subsequent PRs
"B024", "D100", "D101", "D102", "D103", "D104", "D105", "D107", "D417",
# Unnecessary arguments can help with clarity
"UP012", "UP015"
]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
[tool.ruff.lint.isort]
force-single-line = true
force-sort-within-sections = true
lines-after-imports = 2
single-line-exclusions = ["collections.abc", "typing"]
[tool.ruff.lint.pydocstyle]
convention = "google"