-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
156 lines (142 loc) · 3.65 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
[build-system]
requires = ["poetry-core>=1.0.0", ]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "sekoia-automation-sdk"
version = "1.14.1"
description = "SDK to create Sekoia.io playbook modules"
license = "MIT"
readme = "README.md"
authors = ["Sekoia.io"]
packages = [
{ include = "sekoia_automation" },
]
homepage = "https://sekoia.io/"
repository = "https://github.com/SEKOIA-IO/sekoia-automation-sdk"
documentation = "https://docs.sekoia.io/"
keywords = ["SDK", "Sekoia.io", "automation", "playbook"]
classifiers = [
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Intended Audience :: Developers",
"Topic :: Security",
"Topic :: Software Development :: Libraries"
]
[tool.poetry.scripts]
sekoia-automation = 'sekoia_automation.cli:app'
[tool.poetry.dependencies]
python = ">=3.10,<3.12"
requests = "^2.25"
requests-ratelimiter = "^0.4.2"
sentry-sdk = "*"
tenacity = "*"
boto3 = "^1.28"
s3path = "^0.5"
orjson = "^3.8"
pydantic = "^1.10"
typer = { extras = ["all"], version = "^0.7"}
cookiecutter = "^2.1"
python-slugify = "^5.0.2"
PyYAML = "^6.0"
Jinja2 = "^3.0.3"
black = "*" # To format files in cli tools
poetry = "*" # To lock requirements when creating new module
prometheus-client = "^0.16.0"
aiohttp = { version = "^3.8.4", optional = true }
aiolimiter = { version = "^1.1.0", optional = true }
aiobotocore = { version = "^2.5.2", optional = true }
aiofiles = { version = "^23.1.0", optional = true }
aiocsv = { version = "^1.2.4", optional = true }
loguru = { version = "^0.7.0", optional = true }
jsonschema = "^4.22.0"
[tool.poetry.group.dev.dependencies]
unittest-xml-reporting = "^3"
pylint = "*"
pytest = "<8"
pytest-cov = "*"
pytest-asyncio = "*"
pytest-xdist = "*"
pytest-env = "*"
requests-mock = "^1.9"
faker = "^19.0.0"
aioresponses = { git = "https://github.com/pnuckowski/aioresponses.git", rev = "444aa498cd2f625edd7923355fa373972d5fcf44" }
types-aiofiles = "^23.1.0.4"
types-requests = "^2.31.0.1"
types-pyyaml = "^6.0.12.10"
types-python-slugify = "^8.0.0.2"
pre-commit = "^3.3.3"
requests-oauthlib = "^2.0.0"
[tool.poetry.group.lint.dependencies]
ruff = "*"
black = "*"
mypy = "*"
isort = "*"
autoflake = "^1.4"
poethepoet = { version = "^0.16.5", extras = ["poetry_plugin"] }
[tool.poetry.extras]
all = [
"aiohttp",
"aiolimiter",
"aiobotocore",
"aiofiles",
"aiocsv",
"loguru",
]
async-aws = [
"aiobotocore",
]
async-http = [
"aiohttp",
"aiolimiter",
"aiofiles",
]
async-files = [
"aiofiles",
"aiocsv"
]
logging = [
"loguru"
]
[tool.black]
target-version = ["py311"]
force-exclude = "tests/expectations/sample_module/main.py|sekoia_automation/scripts/new_module/template/"
[tool.autoflake]
exclude = "sekoia_automation/scripts/**/*"
[tool.pytest.ini_options]
minversion = "6.0"
addopts = '''
--asyncio-mode=auto
--cache-clear
--cov=sekoia_automation
--cov-report=html
--cov-report=term-missing:skip-covered
--cov-fail-under=90
-ra
'''
testpaths = [
"tests",
]
[tool.ruff]
select = ["A", "ARG", "E", "F", "I", "N", "RUF", "UP", "W"]
exclude = [
"tests/expectations/sample_module/main.py",
"tests/aio/",
"sekoia_automation/scripts/new_module/template/"
]
[tool.ruff.per-file-ignores]
"tests/*" = ["ARG"] # Ignore unusued args because of pytest fixtures
[tool.mypy]
python_version = "3.11"
ignore_missing_imports = true
show_column_numbers = true
exclude = [
"sekoia_automation/scripts/new_module/template/",
"tests/"
]
disable_error_code = "annotation-unchecked"
[tool.poe.tasks.lint]
sequence = [
{ cmd = "poetry run autoflake ." },
{ cmd = "poetry run black ." },
]
help = "Make code linting and formatting."