forked from artefactual/archivematica
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
254 lines (234 loc) · 7.28 KB
/
pyproject.toml
File metadata and controls
254 lines (234 loc) · 7.28 KB
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
[build-system]
requires = ["setuptools>=74", "wheel>=0.44"]
build-backend = "setuptools.build_meta"
[project]
name="archivematica"
description="Web- and standards-based, open-source application which allows your institution to preserve long-term access to trustworthy, authentic and reliable digital content."
requires-python = ">=3.9"
authors = [
{name = "Artefactual Systems Inc.", email = "info@artefactual.com"},
]
maintainers = [
{name = "Artefactual Systems Inc.", email = "info@artefactual.com"},
]
readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
dynamic = [
"version",
]
dependencies = [
"django-shibboleth-remoteuser @ git+https://github.com/artefactual-labs/django-shibboleth-remoteuser.git@f08a7864d6130416c352981ccf318fff0fd5be58",
"Django>=4.2,<5",
"agentarchives",
"amclient",
"ammcpc",
"bagit",
"brotli",
"clamav-client",
"django-autoslug",
"django-csp",
"django-forms-bootstrap",
"django-prometheus",
"django-tastypie",
"elasticsearch>=8.0.0,<9.0.0",
"gearman3 @ git+https://github.com/artefactual-labs/python-gearman.git@b68efc868c7a494dd6a2d2e820fb098a6da9f797",
"gevent",
"gunicorn",
"inotify-simple",
"jsonschema",
"lazy-paged-sequence",
"lxml",
"metsrw",
"orjson",
"opf-fido @ git+https://github.com/artefactual-labs/fido.git@abc31ecdc93bd9dfefbe6da535341dfc9f03d311",
"prometheus_client",
"python-dateutil",
"requests",
"unidecode",
"whitenoise",
# Required by LDAP authentication
"django-auth-ldap",
"python-ldap",
# Required by CAS authentication
"django-cas-ng",
# Required for OpenID Connect authentication
"mozilla-django-oidc",
]
[project.optional-dependencies]
dev = [
"coverage[toml]",
"mockldap @ git+https://github.com/artefactual-labs/mockldap@v0.3.1",
"pip-tools",
"playwright",
"pytest",
"pytest-cov",
"pytest-django",
"pytest-playwright",
"pytest-randomly",
"tox",
]
[project.urls]
homepage = "https://www.archivematica.org/"
documentation = "https://www.archivematica.org/en/docs/archivematica-latest/"
repository = "https://github.com/artefacutal/archivematica"
issues = "https://github.com/archivematica/Issues/issues"
[tool.setuptools.packages.find]
where = ["src"]
include = ["archivematica*"]
[tool.setuptools.dynamic]
version = {attr = "archivematica.archivematicaCommon.version.get_full_version"}
[tool.pytest.ini_options]
addopts = "--reuse-db -p no:cacheprovider"
DJANGO_SETTINGS_MODULE="settings.test"
norecursedirs = ".svn _build tmp* node_modules bower_components share .tox"
[tool.coverage.run]
omit = [
"**/src/archivematica/archivematicaCommon/externals/*",
"**/migrations/*",
"**/settings/*",
"**/tests/*",
"**/wsgi.py",
"**/manage.py",
]
include = [
"**/src/archivematica/archivematicaCommon/*",
"**/src/archivematica/dashboard/*",
"**/src/archivematica/MCPClient/*",
"**/src/archivematica/MCPClient/clientScripts/*",
"**/src/archivematica/MCPServer/*",
]
branch = true
[tool.ruff]
target-version = "py39"
[tool.ruff.lint]
# Rule reference: https://docs.astral.sh/ruff/rules/
select = [
"B",
"C4",
"E",
"F",
"I",
"UP",
"W",
]
ignore = [
"B018",
"B904",
"E402",
"E501",
"UP031",
]
[tool.ruff.lint.per-file-ignores]
"src/archivematica/**/settings/*" = ["F403"]
"src/archivematica/dashboard/settings/*" = ["F405"]
"src/archivematica/settings/testmysql.py" = ["I001"]
[tool.ruff.lint.isort]
force-single-line = true
[tool.mypy]
explicit_package_bases = true
warn_redundant_casts = true
warn_unused_configs = true
[[tool.mypy.overrides]]
module = [
"src.archivematica.archivematicaCommon.executeOrRunSubProcess",
"src.archivematica.MCPClient.client.*",
"src.archivematica.MCPClient.clientScripts.characterize_file",
"src.archivematica.MCPClient.clientScripts.has_packages",
"src.archivematica.MCPClient.clientScripts.identify_file_format",
"src.archivematica.MCPClient.clientScripts.normalize",
"src.archivematica.MCPClient.clientScripts.policy_check",
"src.archivematica.MCPClient.clientScripts.transcribe_file",
"src.archivematica.MCPClient.clientScripts.validate_file",
"src.archivematica.search.service",
"tests.archivematicaCommon.test_execute_functions",
"tests.conftest",
"tests.dashboard.components.accounts.test_views",
"tests.dashboard.components.administration.test_administration",
"tests.dashboard.fpr.test_command_get_fpr_changes",
"tests.dashboard.fpr.test_command_import_pronom_ids",
"tests.dashboard.fpr.test_views",
"tests.dashboard.test_oidc",
"tests.integration.test_oidc_auth",
"tests.MCPClient.conftest",
"tests.MCPClient.test_characterize_file",
"tests.MCPClient.test_create_mets_v2",
"tests.MCPClient.test_fpr_commands",
"tests.MCPClient.test_has_packages",
"tests.MCPClient.test_identify_file_format",
"tests.MCPClient.test_normalize",
"tests.MCPClient.test_policy_check",
"tests.MCPClient.test_transcribe_file",
"tests.MCPClient.test_validate_file",
"tests.search.test_service",
]
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
no_implicit_reexport = true
strict_equality = true
warn_return_any = true
warn_unused_ignores = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
archivematica-common
dashboard
mcp-server
mcp-client
storage-service
migrations-dashboard
migrations-storage-service
linting
archivematica
[testenv]
package = editable
deps = -r{toxinidir}/requirements-dev.txt
commands = py.test {posargs}
allowlist_externals =
bash
find
setenv =
# General
LOGNAME = user
DJANGO_SETTINGS_MODULE = {env:DJANGO_SETTINGS_MODULE:settings.test}
PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:}
HACK_DIR = {toxinidir}/hack
# Storage Service
STORAGE_SERVICE_ROOT = {env:HACK_DIR}/submodules/archivematica-storage-service
# TOXENV-specific
# Setting HOME prevents Python's pwd module to ask for a real uid inside
# the container, and using {temp_dir} allows caching the pre-commit
# dependencies in the tox host
linting: HOME = {temp_dir}/user
changedir =
archivematica-common: {toxinidir}/tests/archivematicaCommon
dashboard: {toxinidir}/tests/dashboard
mcp-server: {toxinidir}/tests/MCPServer
mcp-client: {toxinidir}/tests/MCPClient
storage-service: {env:STORAGE_SERVICE_ROOT}
[testenv:archivematica]
change_dir = {toxinidir}/tests
[testenv:storage-service]
deps =
-r{env:STORAGE_SERVICE_ROOT}/requirements-dev.txt
commands =
pip install -e {env:STORAGE_SERVICE_ROOT}
{[testenv]commands}
[testenv:migrations-dashboard]
commands = django-admin makemigrations --check --dry-run
[testenv:migrations-storage-service]
deps = {[testenv:storage-service]deps}
commands =
pip install -e {env:STORAGE_SERVICE_ROOT}
{[testenv:migrations-dashboard]commands}
[testenv:linting]
basepython = python3
package = skip
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
"""