-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
109 lines (93 loc) · 3.1 KB
/
Copy pathpyproject.toml
File metadata and controls
109 lines (93 loc) · 3.1 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
[project]
name = "n8n-iac"
version = "0.1.0"
description = "Infrastructure-as-code SDK for n8n: typed Python authoring, deterministic compilation, offline validation, plan/apply deployment."
readme = "README.md"
license = { text = "MIT" }
authors = [{ name = "n8n-iac contributors" }]
requires-python = ">=3.12,<4.0"
dependencies = [
"pydantic (>=2.7,<3.0)",
"httpx (>=0.27,<1.0)",
"click (>=8.1,<9.0)",
]
[project.scripts]
n8n-iac = "n8n_iac.cli.main:main"
[project.urls]
homepage = "https://github.com/SAKMZ/n8n-python-sdk"
repository = "https://github.com/SAKMZ/n8n-python-sdk"
issues = "https://github.com/SAKMZ/n8n-python-sdk/issues"
[tool.poetry]
packages = [{ include = "n8n_iac" }]
[tool.poetry.group.dev.dependencies]
# Pinned to the majors the gates are actually validated against. Floating
# these apart from the developer toolchain means CI lints with a different
# rule set than local runs -- which is exactly how UP038 (since retired
# upstream) failed CI on code that passed locally.
pytest = "^9.1"
pytest-cov = "^7.1"
mypy = "^2.3"
ruff = "^0.15"
hypothesis = "^6.157"
[build-system]
# poetry-core 2.x is the floor: this project declares metadata in the PEP 621
# [project] table, which earlier poetry-core releases do not read.
requires = ["poetry-core>=2.0.0"]
build-backend = "poetry.core.masonry.api"
# --- Typing (mypy --strict must be clean; this is a merge gate) --------------
[tool.mypy]
python_version = "3.12"
strict = true
warn_unreachable = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
no_implicit_reexport = true
show_error_codes = true
packages = ["n8n_iac"]
# --- Lint --------------------------------------------------------------------
[tool.ruff]
target-version = "py312"
line-length = 100
[tool.ruff.lint]
select = [
"E", "F", "W", # pycodestyle / pyflakes
"I", # isort
"UP", # pyupgrade (enforces 3.12+ idioms)
"B", # bugbear
"C4", # comprehensions
"SIM", # simplify
"RUF",
]
ignore = [
"SIM108", # ternary is not always clearer
]
[tool.ruff.lint.isort]
known-first-party = ["n8n_iac"]
[tool.ruff.lint.per-file-ignores]
# Machine-generated async facade: ast.unparse emits single-line signatures.
# Content is reviewed via the sync source + the regeneration-drift test.
"n8n_iac/client/async_transport.py" = ["E501"]
"n8n_iac/client/async_resources.py" = ["E501"]
# --- Tests (OPUS §3) ---------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-m 'not e2e'"
markers = [
"e2e: requires a real n8n instance (Docker); excluded by default, run nightly",
]
[tool.coverage.run]
branch = true
source = ["n8n_iac"]
[tool.coverage.report]
fail_under = 100
show_missing = true
# OPUS §3.6: only no-runtime-behavior constructs are excluded globally, plus
# individually reasoned "pragma: no cover" comments (no blanket use; each one
# must carry its justification inline and is reviewed).
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"\\.\\.\\.",
]