-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
77 lines (66 loc) · 2.7 KB
/
Copy pathpyproject.toml
File metadata and controls
77 lines (66 loc) · 2.7 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
[project]
name = "gnode"
version = "0.1.0"
description = "Node-based, glitch-first image editor — headless evaluation engine + node catalog."
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"numpy>=2.1",
"pillow>=10.4",
"imageio>=2.34",
"pydantic>=2.7",
]
[project.optional-dependencies]
scipy = ["scipy>=1.13"]
[project.scripts]
gnode = "gnode.cli:main"
[dependency-groups]
dev = [
"ruff>=0.6",
"ty>=0.0.1a1",
"pytest>=8.2",
"pytest-cov>=5.0",
"hypothesis>=6.100",
"httpx>=0.27",
"fastapi>=0.115",
"uvicorn>=0.30",
"python-multipart>=0.0.9",
]
server = [
"fastapi>=0.115",
"uvicorn[standard]>=0.30",
"python-multipart>=0.0.9",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/gnode"]
# ── Ruff (lint + format) ──────────────────────────────────────────────────────
[tool.ruff]
target-version = "py312"
line-length = 100
src = ["src", "tests"]
extend-exclude = ["reference"] # untouched provenance — not part of the linted codebase
[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP", "B", "C4", "SIM", "PT", "PTH", "TID", "RET", "TC", "ARG", "RUF"]
# E/F/W pycodestyle+pyflakes · I isort · N naming · UP pyupgrade · B bugbear
# C4 comprehensions · SIM simplify · PT pytest · PTH pathlib · TID tidy-imports
# RET returns · TC type-checking-imports · ARG unused-args · RUF ruff-native
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["ARG", "RUF012"] # fixtures injected as args; node metadata dicts
"src/gnode/nodes/**" = ["RUF012", "ARG002"] # class-level metadata dicts; uniform evaluate() signature
"src/gnode/core/params.py" = ["N802"] # widget-field factories read like types
# lib/ is vendored/validated numerics — keep real-bug lints (F, E9, most B) but
# silence style rules so we don't churn the math (short names, int(round()), etc.).
"src/gnode/lib/**" = ["N", "E741", "E501", "E701", "ARG", "B905", "RUF005", "RUF007", "RUF046", "RUF059", "I001"]
[tool.ruff.lint.isort]
known-first-party = ["gnode"]
[tool.ruff.lint.flake8-type-checking]
# Pydantic/FastAPI evaluate annotations at runtime, so model imports used only in
# annotations must stay as real imports (not moved under TYPE_CHECKING).
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
# ── pytest ────────────────────────────────────────────────────────────────────
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-q"