-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
194 lines (168 loc) · 4.81 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
[tool.poetry]
name = "runzero-sdk"
version = "0.8.6"
description = "The runZero platform sdk"
license = "BSD-2-Clause"
authors = ["runZero <[email protected]>"]
readme = "README.md"
homepage = "https://runzero.com/"
documentation = "https://runzeroinc.github.io/runzero-sdk-py"
repository = "https://github.com/runZeroInc/runzero-sdk-py"
keywords = ["runzero", "api", "sdk"]
packages = [{include = "runzero"}]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Pydantic",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"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",
"Topic :: Security",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Systems Administration",
"Typing :: Typed",
]
[tool.poetry.group.codegen]
[tool.poetry.group.docs]
optional = true
[tool.poetry.dependencies]
python = "^3.8"
pydantic = ">=1.10.5,<2.0.0"
requests = "^2.32.3"
# no standard mechanism to pin transitive deps
# https://github.com/python-poetry/poetry/issues/4991
certifi = ">=2024.2.2"
[tool.poetry.group.dev.dependencies]
black = ">=23.7,<25.0"
mypy = "^1.5.1"
isort = "^5.12.0"
pylint = ">=2.17.5,<4.0.0"
pytest = "^7.4.1"
types-requests = "^2.31.0.2"
toml = "^0.10.2"
pytest-lazy-fixture = "^0.6.3"
pytest-cov = "^4.0.0"
deptry = ">=0.8,<0.15"
pytest-integration = "^0.2.3"
mypy-extensions = "^1.0.0"
[tool.poetry.group.devlocal.dependencies]
tox = "^4.4.7"
[tool.poetry.group.codegen.dependencies]
datamodel-code-generator = { version = ">=0.17.1,<0.25.0", extras = ["http"]}
[tool.poetry.group.docs.dependencies]
sphinx = ">=6.1.3,<8.0.0"
myst_parser = "^2.0.0"
pandoc = "^2.3"
sphinx-codeautolink = ">=0.14.1,<0.16.0"
sphinx-autoapi = "^3.0.0"
furo = "2024.5.6"
[tool.deptry]
extend_exclude = [
# necessary until deptry can understand
# that if TYPE_CHECKING means dev dep
"runzero/client/_http/io.py"
]
ignore_obsolete = [
"certifi"
]
[tool.coverage.paths]
source = [".", "*/site-packages"]
[tool.coverage.run]
branch = true
omit = [
# Don't measure coverage of tests
'tests/*'
]
[tool.coverage.report]
exclude_lines = [
# Don't complain if tests don't hit defensive assertion code:
"raise NotImplementedError",
"raise AssertionError",
"def __repr__",
"if __name__ == .__main__.:",
]
[tool.coverage.html]
directory = "coverage_html_report"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
preview = true
[tool.datamodel-codegen]
field-constraints = true
snake-case-field = true
strip-default-none = false
target-python-version = "3.8"
[tool.isort]
profile = "black"
multi_line_output = 3
[tool.mypy]
python_version = 3.8
exclude = "tests"
plugins = [
"pydantic.mypy"
]
follow_imports = "silent"
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = true
[tool.pylint]
ignore-patterns = ["_data_models_gen.py", "docs"]
[tool.pylint.code_style]
max-line-length = 120
[tool.pylint.'MESSAGES CONTROL']
extension-pkg-whitelist = "pydantic"
disable = [
"fixme",
"too-few-public-methods",
"too-many-arguments", # TODO: consider re-enabling and refactoring error locations
"too-many-branches", # TODO: consider re-enabling and refactoring error locations
"too-many-instance-attributes", # TODO: consider re-enabling and refactoring error locations
"unnecessary-pass",
]
[tool.tox]
legacy_tox_ini = """
[tox]
isolated_build = true
env_list =
py38
py39
py310
py311
[testenv]
# This runs tests using all in-scope envs on your local source tree files.
# This is faster but can hide serious issues downstream.
allowlist_externals = poetry
commands_pre =
poetry install --no-root --sync
commands =
poetry run pytest --import-mode importlib --cov
[testenv:ci]
# This runs tests using all in-scope envs on a built and installed version of the package.
# This is slower but more thorough.
allowlist_externals = poetry
commands_pre =
poetry install
commands =
poetry run pytest --import-mode importlib --cov --without-integration
[testenv:ci-integration]
# This runs unit & integration tests using all in-scope envs on a built and installed version of the package.
# This is slower but more thorough.
allowlist_externals = poetry
commands_pre =
poetry install
commands =
poetry run pytest --import-mode importlib --cov --with-integration --integration-cover
"""