This repository has been archived by the owner on Feb 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathpyproject.toml
221 lines (189 loc) · 5.57 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
[project]
name = "mutablesecurity"
version = "0.4.0"
[tool.poetry]
name = "mutablesecurity"
version = "0.4.0"
description = "Seamless deployment and management of cybersecurity solutions"
keywords = ["cybersecurity", "security-solutions", "hardening", "automatic-deployment"]
license = "MIT"
authors = [
"MutableSecurity <[email protected]>"
]
repository = "https://github.com/MutableSecurity/mutablesecurity"
homepage = "https://www.mutablesecurity.io"
readme = "README.pypi.md"
classifiers = [
"Topic :: Security",
"Topic :: System :: Installation/Setup",
"Topic :: System :: Software Distribution",
"Topic :: System :: Monitoring",
"Topic :: Software Development :: Libraries :: Python Modules",
"Environment :: Console",
"Operating System :: OS Independent"
]
include = [
"LICENSE",
]
[tool.poetry.urls]
"Changelog" = "https://github.com/MutableSecurity/mutablesecurity/blob/main/CHANGELOG.md"
"Issue Tracker" = "https://github.com/MutableSecurity/mutablesecurity/issues"
"LinkedIn" = "https://www.linkedin.com/company/mutablesecurity"
"Twitter" = "https://twitter.com/mutablesecurity/"
[tool.poetry.dependencies]
Click = "^8.0"
humanfriendly = "^10.0"
packaging = "^23.0"
pyinfra = "^2.2"
pypattyrn = "^1.2"
python = ">=3.9,<3.12"
PyYAML = "6.0"
requests = "^2.27.1"
rich = "13.3.1"
sentry-sdk = "^1.9.8"
typeguard = "^2.13.3"
[tool.poetry.dev-dependencies]
black = "^23.1.0"
coverage = {extras = ["toml"], version = "^6.5.0"}
coveralls = "^3.3.1"
darglint = "^1.8.1"
flake8 = "^6.0.0"
flake8-annotations = "^3.0.0"
flake8-bandit = "^4.1.1"
flake8-docstrings = "^1.6.0"
flake8-print = "^5.0.0"
flake8-quotes = "^3.3.1"
flake8-spellcheck = "^0.28.0"
flake8-tidy-imports = "^4.8.0"
graphviz = "^0.20"
isort = "^5.10.1"
mypy = "^0.982"
pep8-naming = "^0.13.3"
pex = "^2.1.110"
poethepoet = "^0.18.1"
pyenchant = "^3.2.2"
pylint = "^2.13.5"
pyproject-flake8 = "^6.0.0"
pytest = "^7.1.2"
types-PyYAML = "^6.0.9"
types-requests = "^2.27.30"
[tool.poetry.scripts]
mutablesecurity = "mutablesecurity.cli:main"
[tool.black]
line-length = 79
preview = true
include = '\.pyi?$'
extend-exclude = """
(
^/.venv/*
^/dist/*
)
"""
[tool.flake8]
exclude = ".venv"
inline-quotes = "double"
extend-ignore = "ANN101,"
per-file-ignores = """
# The __init__.py files only imports the modules defined in the package.
./**/__init__.py: F401
# The banned module logging is used only here.
./mutablesecurity/logger/**: I251
# Ease the integration process by not requesting documentation via
# docstrings.
./mutablesecurity/solutions/implementations/**/code.py: D101, D102, D103, D106
# Ease the creation of facts and operations by not requesting functions
# documentations (only class)
./mutablesecurity/solutions/common/facts/**: D102
./mutablesecurity/solutions/common/operations/**: D103
# All the pytest unit tests use asserts.
./tests/**: S101
./mutablesecurity/helpers/pytest.py: S101
"""
ban-relative-imports = true
banned-modules = """
logging = Use the logging module instead.
"""
dictionaries = "en_US,python,technical"
[tools.isort]
line_length = 79
profile = "black"
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
known_first_party= ["mutablesecurity"]
known_local_folder = ["mutablesecurity"]
[tool.mypy]
python_version = "3.9"
files = [
"mutablesecurity",
"others",
"tests"
]
show_error_codes = true
namespace_packages = true
explicit_package_bases = true
ignore_missing_imports = true
[tool.pylint.MASTER]
init-hook="import sys; sys.path.append('.')"
[tool.pylint.MESSAGES_CONTROL]
disable="missing-function-docstring"
[tool.pytest.ini_options]
pythonpath = [
".",
"mutablesecurity",
"others",
"tests"
]
[tool.pylint.SPELLING]
spelling-dict = "en_US"
spelling-private-dict-file = "whitelist.txt"
[tool.coverage.run]
omit = [
"mutablesecurity/solutions/implementations/*",
"tests/*",
"**/greenlet.py"
]
[tool.poe.tasks]
[tool.poe.tasks.lint_flake8]
help = "Lint with flake8."
cmd = "poetry run pflake8"
[tool.poe.tasks.lint_pylint]
help = "Lint with pylint."
cmd = "poetry run pylint --recursive=y --ignore=dist,.venv ."
[tool.poe.tasks.lint_mypy]
help = "Lint with mypy."
cmd = "poetry run mypy"
[tool.poe.tasks.lint]
help = "Lint with all linters."
sequence = ["lint_flake8", "lint_pylint", "lint_mypy"]
[tool.poe.tasks._test_first_chunk]
help = "Run the first chunk of unit tests."
cmd = """
coverage run -m pytest
-vv tests/
--ignore=tests/solutions/test_invalid_commands.py;
"""
[tool.poe.tasks._test_second_chunk]
help = "Run the second chunk of unit tests."
cmd = """
coverage run -a -m pytest
-vv tests/solutions/test_invalid_commands.py;
"""
[tool.poe.tasks.test]
help = "Run all the unit tests."
sequence = ["_test_first_chunk", "_test_second_chunk"]
[tool.poe.tasks.coverage]
help = "Report the coverage"
cmd = "coverage report -m"
[tool.poe.tasks.covtest]
help = "Run the unit tests and report the coverage."
sequence = ["test", "coverage"]
[tool.poe.tasks.generate_specs]
help = "Generate the solutions spec sheets in /tmp."
cmd = "./others/spec_sheets_generation_script/generate.py /tmp"
[tool.poe.tasks.generate_api_call_graph]
help = "Generate the API call graph."
cmd = "./others/api_call_graph_script/generate.py"
[tool.poe.tasks.generate_readme]
help = "Generate README.md."
cmd = ".others/readme_generation_script/generate.py"
[tool.setuptools]
py_modules = ["mutablesecurity"]