-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
511 lines (477 loc) · 13 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
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
[build-system]
requires = ["setuptools>=72.1.0", "wheel>=0.44.0"]
build-backend = "setuptools.build_meta"
[project]
name = "aiootp"
dynamic = ["version", "readme"]
description = "a high-level async cryptographic anonymity library to scale, simplify, & automate privacy best practices for secure data & identity processing, communication, & storage."
license = {text = "AGPL-3.0-only"}
requires-python = ">=3.8"
dependencies = ["aiofiles>=24.1.0", "cryptography>=43.0.1"]
authors = [
{name = "Gonzo Investigative Journalism Agency, LLC", email = "[email protected]"},
{name = "Ricchi Machado", email = "[email protected]"},
]
maintainers = [
{name = "Ricchi Machado", email = "[email protected]"},
]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: AsyncIO",
"Framework :: IPython",
"Framework :: Jupyter",
"Framework :: Pytest",
"Natural Language :: English",
"Operating System :: Other OS",
"Operating System :: Unix",
"Operating System :: MacOS",
"Operating System :: MacOS :: MacOS X",
"Operating System :: POSIX",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Operating System :: OS Independent",
"Operating System :: Microsoft :: Windows",
"Topic :: System",
"Topic :: Internet",
"Topic :: Security",
"Topic :: Database",
"Topic :: Education",
"Topic :: Utilities",
"Topic :: Communications",
"Topic :: Office/Business",
"Topic :: Text Processing",
"Topic :: System :: Archiving",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development",
"Topic :: System :: Networking",
"Topic :: System :: Filesystems",
"Topic :: Communications :: Chat",
"Topic :: Scientific/Engineering",
"Topic :: Communications :: Email",
"Topic :: Security :: Cryptography",
"Topic :: Office/Business :: Financial",
"Topic :: Communications :: File Sharing",
"Topic :: System :: Distributed Computing",
"Topic :: System :: Software Distribution",
"Topic :: System :: Systems Administration",
"Topic :: Software Development :: Libraries",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Office/Business :: Financial :: Investment",
"Topic :: Office/Business :: Financial :: Accounting",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Typing :: Typed",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Intended Audience :: Education",
"Intended Audience :: Developers",
"Intended Audience :: Legal Industry",
"Intended Audience :: Other Audience",
"Intended Audience :: Science/Research",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Healthcare Industry",
"Intended Audience :: System Administrators",
"Intended Audience :: Information Technology",
"Intended Audience :: Telecommunications Industry",
"Intended Audience :: Financial and Insurance Industry",
"License :: OSI Approved :: GNU Affero General Public License v3"
]
keywords = [
"xor",
"key",
"salt",
"pepper",
"nonce",
"aad",
"iv",
"siv",
"resuse",
"misuse",
"robust",
"fully",
"context",
"committing",
"commitment",
"online",
"AEAD",
"auth",
"authenticated",
"authentication",
"shmac",
"hmac",
"nmac",
"mac",
"digest",
"integrity",
"infosec",
"opsec",
"appsec",
"privacy",
"engineering",
"stream",
"block",
"cipher",
"permutation",
"chunky2048",
"slick256",
"encrypt",
"plaintext",
"decrypt",
"ciphertext",
"passcrypt",
"passphrase",
"PBKDF",
"password",
"based",
"derivation",
"function",
"3dh",
"2dh",
"25519",
"x25519",
"ed25519",
"curve25519",
"diffie",
"hellman",
"sign",
"signature",
"verify",
"verification",
"db",
"database",
"value",
"store",
"user",
"uuid",
"unique",
"guid",
"global",
"transparent",
"encryption",
"decryption",
"indistinguishable",
"indistinguishability",
"pseudo",
"one",
"time",
"pad",
"onetimepad",
"canonical",
"canonicalization",
"domain",
"separation",
"KDF",
"bit",
"bits",
"hash",
"sha",
"sha3",
"sha-3",
"keccak",
"ephemeral",
"byte",
"entropy",
"PRF",
"PRG",
"PRP",
"RNG",
"PRNG",
"CSPRNG",
"cryptographically",
"secure",
"random",
"number",
"generator",
"bitwise",
"operations",
"IND",
"CCA",
"CPA",
"RUP",
"information",
"cyber",
"security",
"active",
"passive",
"adaptive",
"chosen",
"attack",
"resistance",
"resistant",
"tweak",
"tweakable",
"anonymous",
"anonymity",
"pseudonymous",
"symmetric",
"asymmetric",
"communications",
"utilities",
"simple",
"clean",
"code",
"crypto",
"cryptology",
"cryptography",
"cryptanalysis",
"beta",
"testing",
"data",
"science",
"multi",
"processing",
"threading",
"await",
"async",
"asyncio",
"parallel",
"concurrency",
"coroutine",
"coroutines",
"asynchronous",
"asynchrony",
]
[project.optional-dependencies]
test = [
"coverage[toml]>=7.6.1",
"hypothesis>=6.113.0",
"pytest>=8.3.3",
"pytest-asyncio>=0.24.0",
"ruff>=0.6.9",
]
dev = [
"build>=1.2.2",
"coverage[toml]>=7.6.1",
"hypothesis>=6.113.0",
"pytest>=8.3.3",
"pytest-asyncio>=0.24.0",
"ruff>=0.6.9",
"setuptools>=75.1.0",
"twine>=5.1.1",
"wheel>=0.44.0",
]
[project.urls]
Homepage = "https://twitter.com/aiootp"
Download = "https://pypi.org/project/aiootp"
Source = "https://github.com/rmlibre/aiootp"
Repository = "https://github.com/rmlibre/aiootp.git"
Tracker = "https://github.com/rmlibre/aiootp/issues"
Changelog = "https://github.com/rmlibre/aiootp/blob/main/CHANGES.rst"
Documentation = "https://github.com/rmlibre/aiootp/blob/main/README.rst"
[tool.setuptools]
license-files = ["LICENSE"]
include-package-data = true
[tool.setuptools.packages.find]
where = ["."]
include = ["aiootp", "aiootp*"]
exclude = ["aiootp.db*", "aiootp.tor*"]
namespaces = false
[tool.setuptools.package-data]
aiootp = ["db/README_DATABASES.rst", "tor/README_TOR.rst"]
[tool.setuptools.dynamic]
version = {attr = "aiootp.__init__.__version__"}
readme = {file = ["README.rst"]}
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
cache_dir = "/tmp/.pytest_cache"
asyncio_default_fixture_loop_scope = "function"
doctest_optionflags = ["IGNORE_EXCEPTION_DETAIL", "ELLIPSIS"]
# filterwarnings = [
# "error",
# "ignore::RuntimeWarning",
# "ignore::DeprecationWarning",
# "ignore::pytest.PytestUnraisableExceptionWarning:test_gentools",
# ]
addopts = [
"--verbose",
"--ignore=setup.py",
"--ignore=docs/*",
"--ignore=aiootp/db/*",
"--ignore=aiootp/tor/*",
"--show-capture=all",
"--pythonwarnings=default",
]
[tool.coverage.run]
branch = true
parallel = true
relative_files = true
source = ["aiootp"]
# command_line = "-m pytest tests/test_aiootp.py"
concurrency = ["thread", "multiprocessing"]
omit = ["**/__engagement/**", "**/db/**", "**/tor/**"]
[tool.coverage.html]
directory = "tests/htmlcov"
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".env",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"env",
"node_modules",
"site-packages",
"venv",
]
line-length = 76
indent-width = 4
target-version = "py38"
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"ASYNC", # flake8-async
"B", # flake8-bugbear
"C", # conventions & complexity
"E", # pycodestyle errors
"ERA", # eradicate commented out code
"F", # pyflakes
"FBT", # flake8-boolean-trap
"FLY", # flynt
"FURB", # refurb
"PERF", # Perflint
"PIE", # flake8-pie
"PL", # Pylint
"PT", # pytest-style
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RSE", # flake8-raise
"S", # flake8-bandit
"SIM", # flake8-simplify
"T20", # flake8-print
"TCH", # flake8-type-checking
"TD", # flake8-todos
"RUF", # Ruff-specific
"UP", # pyupgrade
"W", # pycodestyle warnings
]
ignore = [
"ANN101", # deprecated 'self' annotation requirement
"ANN102", # deprecated 'cls' annotation requirement
"B006", # mutable defaults only used for **unpacking interface
"B028", # thanks for the warning, if stacklevel was needed
"C408", # string keys aren't better than keyword arguments
"COM", # TODO: use? it's discouraged but nice
"E501", # trust the 76-length enforcement from the formatter
"E731", # TODO: look through lambda's to maybe comply
"PLE0604", # runtime will catch non-string __all__ members
"PLR0913", # many arguments is a smell, but sometimes it's practical
"PLR2004", # TODO: refactor out magic values
"PLW2901", # overwriting names is ok
"RUF012", # sometimes other types better describe class variables
"S101", # sometimes asserts are nice sanity checks
"SIM300", # hey! yoda's alright
"TD003", # not all TODOs have an issue link, but should?
]
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
"__init__.py" = [
"E402", # sometimes an init defines things for its subpackages
"F403", # the init are just shuttling names, `import *` == fine
"F405", # honestly, `import *` is ok for shuttling inits
"F821", # (sub)packages don't need to import their modules' names
"F822", # potential NameError warnings ie. `import *`
]
"{issue_reporting,setup,sign_package_build}.py" = [
"T201", # legit print use in CLI
]
"sign_package_build.py" = [
"S603", # legit shell use to get git file tree to sign
]
"**/_typing/*" = [
"A002", # no control if mirrored interfaces reuse built-in names
"FBT001", # no control over positional boolean params here
]
"**/asynchs/aos.py" = [
"F822", # `__all__` declarations exist in `os` module
]
"**/randoms/_early_salts.py" = [
"PLW0603", # global updates are ok in context of package entropy
]
"**/randoms/simple.py" = [
"S311", # weak random is labelled in simple module
]
"**/randoms/rng.py" = [
"B008", # random defaults at startup are intended
]
"**/databases/{async,sync}_database.py" = [
"ARG002", # TODO: temp, until `admin` kwarg (non-)usage is decided
]
"dual_output_shake_cipher_config.py" = [
"SIM114", # TODO: specify branch exceptions & other build limits
]
"*{config,format}.py" = [
"PLR0913", # config objects can have many arguments
]
"conftest.py" = [
"E402", # there's a wibbly wobbly, timey wimey import sequence here
"F401", # most other tests get their imports from this module
]
"**/{tests,docs}/*" = [
"ANN001", # type annotations on tests nice but unnecessary
"ANN003", # '' ''
"ANN202", # '' ''
"C901", # tests can get complex
"F403", # tests get most of their imports from `import *`
"F405", # `import *` confuses it a lot
"F822", # potential NameError warnings ie. `import *`
"PLE0605", # it doesn't think `sorted` returns a list
"PLR0915", # TODO: refactor tests so this passes
"PLR2004", # literals can be clearer in tests
"S101", # asserts happen in tests
"S311", # weak random is fine in tests
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.format]
line-ending = "auto"
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false
# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"
# This Ruff configuration is adapted from their documentation.
# https://docs.astral.sh/ruff/configuration/