-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
202 lines (177 loc) · 5.49 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
[tool.poetry]
name = "otterdog"
version = "0.0.0"
description = "Tool to manage GitHub organizations and their repositories."
authors = ["Thomas Neidhart <[email protected]>"]
readme = "README.md"
license = "Eclipse Public License 2.0 (EPL-2.0)"
homepage = "https://github.com/eclipse-csi/otterdog"
repository = "https://github.com/eclipse-csi/otterdog"
documentation = "https://otterdog.readthedocs.io"
keywords = ["infrastructure-as-code", "supply-chain-security", "github", "gitops"]
packages = [
{ include = "otterdog" }
]
include = [
"CHANGELOG.md",
"README.md",
{ path = "tests", format = "sdist" }
]
exclude = [
"otterdog/app.py",
"otterdog/webapp"
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Topic :: Security",
"Topic :: Software Development :: Version Control",
"Topic :: System :: Systems Administration",
"Typing :: Typed",
]
[tool.poetry.dependencies]
python = ">=3.11, <4.0"
aiofiles = "^24.1"
aiohttp = "^3.11"
aiohttp-client-cache = ">=0.12.3"
aiohttp-retry = "^2.9"
aiosqlite = "^0.20"
aioshutil = "^1.5"
chevron = "^0.14"
click = "^8.1"
colorama = "^0.4"
rjsonnet = "^0.5"
importlib_resources = "^6.4"
jsonata-python = "^0.5"
jsonschema = "^4.23"
jwt = "^1.3"
mintotp = "^0.3"
playwright = "^1.44"
JSONBender = "^0.9"
PyNaCl = "^1.5"
requests = "^2.32"
GitPython = "^3.1"
[tool.poetry.group.app.dependencies]
quart = "^0.19"
quart-flask-patch = "^0.3"
python-decouple = "^3.8"
python-dotenv = "^1.0"
pymongo = "==4.9.1"
pydantic = "^2.7"
odmantic = "^1.0"
quart-auth = "^0.10"
quart-redis = "^2.0"
github-flask = "^3.2"
aiohttp-client-cache = {version=">=0.12.3", extras=["redis"]}
ariadne = "^0.23"
pyyaml = "^6.0"
semver = "^3.0"
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
ruff = "^0.8"
mypy = "^1.8"
pre-commit = "^4.0"
[tool.poetry.group.test.dependencies]
tox = ">4.22"
pytest = "^8.0"
pytest-asyncio = "^0.24"
parameterized = "^0.9"
[tool.poetry.group.typing]
optional = true
[tool.poetry.group.typing.dependencies]
types-colorama = "^0.4"
types-requests = "^2.31"
types-jsonschema = "^4.17"
types-chevron = "^0.14"
types-aiofiles = "^24.0"
types-redis = "^4.6"
types-PyYAML = "^6.0"
motor-types = ">=1.0.0b4"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.5"
mkdocs-material = "^9.5"
mkdocs-exclude = "^1.0"
pymdown-extensions = "^10.7"
[tool.poetry.scripts]
otterdog = "otterdog.cli:cli"
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
latest-tag = true
format-jinja = """
{%- if distance == 0 -%}
{{ serialize_pep440(base, stage, revision) }}
{%- else -%}
{{ serialize_pep440(bump_version(base, 1), stage, revision, dev=distance) }}
{%- endif -%}
"""
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.pytest.ini_options]
minversion = "7.2"
testpaths = ["tests"]
pythonpath = [".", "otterdog"]
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
asyncio_default_fixture_loop_scope="function"
[tool.mypy]
python_version = "3.11"
exclude = ["scripts", "docs", "tests"]
[tool.ruff]
line-length = 120
indent-width = 4
target-version = "py311"
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"ERA", # flake8-eradicate/eradicate
"I", # isort
"N", # pep8-naming
"PIE", # flake8-pie
"S", # flake8-bandit
"PGH", # pygrep
"RUF", # ruff checks
"SIM", # flake8-simplify
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
]
ignore = [
"E203",
"ERA001", # commented out code
"PGH003", # specific ignore
"PGH004", # specific ignore
"SIM102", # nested ifs
"SIM103", # inline return
"N818", # exception names
"S102", # we deliberately use exec
"S105" # hardcoded passwords (too many false-positives for now)
]
[tool.ruff.lint.per-file-ignores]
"**/db/models.py" = ["UP007", "TCH003"] # new optional spec is not yet supported by odmantic
"**/webhook/github_models.py" = ["TCH003"]
"tests/**/*.py" = ["S101"]
[tool.tox]
requires = ["tox>=4.22"]
env_list = ["3.11", "3.12", "3.13"]
[tool.tox.env_run_base]
description = "Run tests under {base_python}"
skip_install = true
allowlist_externals = ["poetry"]
commands_pre = [["poetry", "install", "--without", "dev,typing,docs"]]
commands = [["poetry", "run", "pytest", "tests/", "--import-mode", "importlib"]]