-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
96 lines (86 loc) · 4.1 KB
/
Copy pathpyproject.toml
File metadata and controls
96 lines (86 loc) · 4.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
[project]
name = "continuo-python-runtime"
version = "0.4.1"
description = "Runtime harness, contract tooling, and CI lint for Continuo python nodes."
authors = [{ name = "Simone Carolini" }]
maintainers = [{ name = "Simone Carolini" }]
readme = "README.md"
requires-python = ">= 3.14"
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE"]
dependencies = [
# Exact-pinned like every other dependency here, and for a stronger reason:
# [tool.uv.sources] below redirects this to the in-tree workspace member for
# development, but that redirect is a uv-only mechanism that never reaches
# the built wheel's metadata. A wheel installed from PyPI carries only this
# requirement, so an unbounded one would resolve whatever contract release
# is newest rather than the one this runtime was tested against -- and the
# harness imports the contract's port, result format, SQL guard and types
# directly. Both packages ship from this repo on one v* tag, so a new
# contract version never exists without a new runtime version to match it;
# an exact pin therefore costs nothing and keeps the tested pair together.
"continuo-engine-contract==0.7.3",
"boto3==1.43.85",
"pyarrow==25.0.1",
"PyYAML==6.0.3",
# Pinned in lockstep with continuo-engine-contract's OWN sqlglot pin
# (currently ==30.17.0) -- bump this whenever that pin moves.
# continuo_python_runtime/contract/loader.py imports sqlglot.errors
# directly to catch TokenError, which escapes
# continuo_engine_contract.sql.ensure_single_read uncaught despite
# its docstring's guarantee that only ValueError does (an unterminated
# string literal or comment fails sqlglot's tokenizer before the
# parser's own ParseError handling ever runs). Once that contract bug is
# fixed upstream, this direct import -- and this explicit pin, since
# sqlglot would then again be needed only transitively -- can be dropped.
"sqlglot==30.17.0",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.14",
]
[project.scripts]
continuo-runtime = "continuo_python_runtime.cli:main"
[dependency-groups]
dev = ["ruff==0.16.5", "mypy==2.3.1", "types-PyYAML==6.0.12.20250915"]
test = ["pytest==9.1.1", "pytest-cov==7.1.0"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["continuo_python_runtime"]
[tool.ruff]
target-version = "py312"
[tool.ruff.lint]
# Pin the rule set ruff enforced by default through 0.3.0. Ruff's default
# `select` widened enormously in later releases (0.16 enables 400+ rules by
# default), so an unpinned bump silently switches on hundreds of new rules —
# including behavior-changing ones (e.g. TRY004 wants TypeError over
# ValueError). Adopting more rules should be a deliberate change here, not a
# side effect of a dependency bump.
select = ["E4", "E7", "E9", "F"]
[tool.mypy]
python_version = "3.14"
strict = false
[tool.uv.workspace]
members = ["contract", "adapters/postgres", "adapters/trino"]
[tool.uv.sources]
continuo-engine-contract = { workspace = true }
[tool.pytest.ini_options]
# importlib import-mode: each workspace member's tests/ is its own `tests`
# package (carries __init__.py). Even in importlib mode, two files with the
# SAME basename in different `tests` packages resolve to one module name
# (tests.<basename>) and the second silently collects the first's functions —
# so every test module basename must be unique across the root suite and both
# adapter suites (test_adapter_runtime_<engine>.py,
# test_adapter_<engine>_validation.py, etc). Dropping the __init__.py files
# instead is not an option: pytest's parent-module insertion would then claim
# the top-level `trino/` directory name and shadow the installed trino DBAPI
# package (see adapters/trino/tests).
addopts = "--tb=short --import-mode=importlib"
testpaths = ["tests"]
markers = [
"integration: needs a live docker-compose stack running (see tests/smoke/*-stack)",
"image: needs a built continuo-python-runtime-<engine> image (see tests/test_image_smoke_validation.py)",
]