-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
152 lines (133 loc) · 4.8 KB
/
pyproject.toml
File metadata and controls
152 lines (133 loc) · 4.8 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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "cipherrescue"
version = "0.1.0.dev0"
description = "Bootable FDE recovery framework with LP-optimal SCPR diagnostic engine"
readme = "README.md"
license = { file = "LICENSE" }
authors = [
{ name = "Abiola Tolulope Babatunde" }
]
requires-python = ">=3.11"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: System Administrators",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Security",
"Topic :: System :: Recovery Tools",
]
dependencies = [
# LP solver — scipy.optimize.linprog implements the revised simplex method
# used in the SCPR diagnostic engine (Layer 5).
"scipy>=1.11",
"numpy>=1.26",
# ML-based scheme detection (Layer 2) — ONNX runtime for inference only.
# Training is done offline; the model is shipped as a frozen .onnx file.
"onnxruntime>=1.17",
# Audit log HMAC chaining and credential memory management (Layer 3).
"cryptography>=42",
# Terminal User Interface (Layer 7).
"textual>=0.52",
# CLI entry points and subcommand dispatch.
"click>=8.1",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-cov>=5.0",
"pytest-asyncio>=0.23",
"ruff>=0.4",
"mypy>=1.9",
"types-click",
]
[project.scripts]
cipherrescue = "cipherrescue.tui.app:main"
[project.urls]
Homepage = "https://github.com/YOUR_USERNAME/cipherrescue"
"Bug Tracker" = "https://github.com/YOUR_USERNAME/cipherrescue/issues"
Documentation = "https://github.com/YOUR_USERNAME/cipherrescue/tree/main/docs"
# ── Setuptools package discovery ───────────────────────────────────────────────
[tool.setuptools.packages.find]
where = ["src"]
# ── Ruff (linter + formatter) ──────────────────────────────────────────────────
[tool.ruff]
src = ["src"]
line-length = 88
target-version = "py311"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"S", # flake8-bandit (security)
"N", # pep8-naming
]
ignore = [
"S101", # assert — used in tests
"S603", # subprocess calls — intentional for cryptsetup/dislocker wrappers
"S607", # partial path — intentional for tool discovery
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["S", "N", "B017"]
"src/cipherrescue/scpr/**" = ["N802", "N803", "N806", "S301"]
"src/cipherrescue/scpr/reduction.py" = ["N802", "N803", "N806"]
"src/cipherrescue/scpr/lp_solver.py" = ["N802", "N803", "N806"]
"src/cipherrescue/scpr/_thesis_instance.py" = ["N803", "N806"]
"src/cipherrescue/scpr/engine.py" = ["N806"]
# ── Mypy ───────────────────────────────────────────────────────────────────────
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
mypy_path = "src"
[[tool.mypy.overrides]]
module = [
"numpy",
"numpy.typing",
"scipy",
"scipy.optimize",
"scipy.optimize._linprog",
"click",
"textual",
"textual.*",
"onnxruntime",
]
ignore_missing_imports = true
# Thesis-ported mathematical modules — strict typing conflicts with
# the algorithm's inherently mixed list structures (U, R, E, A, etc.)
[[tool.mypy.overrides]]
module = [
"cipherrescue.scpr._extract_reasons",
"cipherrescue.scpr._thesis_instance",
"cipherrescue.scpr.reduction",
"cipherrescue.scpr.file_handler",
"cipherrescue.scpr.lp_solver",
]
ignore_errors = true
# Plugin and TUI layers depend on untyped base modules not yet stubbed
[[tool.mypy.overrides]]
module = [
"cipherrescue.plugins.luks2_plugin",
"cipherrescue.tui",
]
ignore_errors = true
# ── Pytest ─────────────────────────────────────────────────────────────────────
[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "--cov=src/cipherrescue --cov-report=term-missing --cov-report=xml"
[tool.coverage.run]
source = ["src/cipherrescue"]
omit = ["tests/*"]