Skip to content

Commit b0d3ce8

Browse files
Generate validation-blind protobuf messages (#43)
1 parent cb7e27c commit b0d3ce8

52 files changed

Lines changed: 1153 additions & 2326 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
hooks:
1010
- id: sync-with-uv
1111
- repo: https://github.com/charliermarsh/ruff-pre-commit
12-
rev: v0.15.20
12+
rev: v0.15.21
1313
hooks:
1414
- id: ruff-check
1515
args: [--fix, --exit-non-zero-on-fix]

AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ Generated files live under paths such as:
7575

7676
- `tilebox-datasets/tilebox/datasets/datasets/v1/*_pb2*.py`
7777
- `tilebox-datasets/tilebox/datasets/tilebox/v1/*_pb2*.py`
78-
- `tilebox-datasets/tilebox/datasets/buf/validate/*_pb2*.py`
7978
- `tilebox-workflows/tilebox/workflows/workflows/v1/*_pb2*.py`
8079

8180
Regenerate protobuf code with:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- `tilebox-workflows`: Allow task `execute()` methods to use a `-> None` return annotation when postponed annotation
1313
evaluation is enabled.
14+
- `tilebox-datasets` and `tilebox-workflows`: Generate validation-blind protobuf messages without vendoring
15+
`buf.validate`, avoiding duplicate descriptor conflicts when applications use their own generated validation rules.
1416

1517
## [0.55.0] - 2026-07-01
1618

buf.gen.datasets.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ inputs:
1919
paths:
2020
- "datasets"
2121
- "tilebox"
22-
- module: buf.build/bufbuild/protovalidate
22+
# Deliberately generate validation-blind client messages: the SDK does not validate
23+
# client-side, and omitting buf.validate avoids conflicts in protobuf's global descriptor pool.
24+
exclude_types:
25+
- "buf.validate.**"

buf.gen.workflows.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,7 @@ inputs:
1818
- module: buf.build/tilebox/api
1919
paths:
2020
- "workflows"
21+
# Deliberately generate validation-blind client messages: the SDK does not validate
22+
# client-side, and omitting buf.validate avoids conflicts in protobuf's global descriptor pool.
23+
exclude_types:
24+
- "buf.validate.**"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = [{ name = "Tilebox, Inc.", email = "support@tilebox.com" }]
66
readme = "README.md"
77
requires-python = ">=3.10"
88
dependencies = [
9-
"tilebox-datasets",
9+
"tilebox-datasets>=0.56.0",
1010
"tilebox-grpc",
1111
"tilebox-storage",
1212
"tilebox-workflows",

tilebox-datasets/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ packages = ["tilebox"]
5656
omit = [
5757
"tilebox/*/datasets/v1/*",
5858
"tilebox/*/tilebox/v1/*",
59-
"tilebox/*/buf/validate/*",
6059
]
6160

6261
[tool.pytest.ini_options]

tilebox-datasets/tests/query/test_time_interval.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S"
1717

18-
# first time we use pandas takes sometimes a while to import and compile the code, causing hypothesis timeout issues
19-
# so we warm up the function like this before
20-
_ = _convert_to_datetime("2026-01-01")
18+
# Parsing a timezone-suffixed string takes a slower pandas path on first use, which can exceed Hypothesis' deadline.
19+
# Exercise that path before Hypothesis starts timing generated examples.
20+
_ = _convert_to_datetime("2026-01-01 00:00:00.000000 UTC")
2121

2222

2323
@given(

tilebox-datasets/tilebox/datasets/buf/validate/validate_pb2.py

Lines changed: 0 additions & 469 deletions
This file was deleted.

tilebox-datasets/tilebox/datasets/buf/validate/validate_pb2.pyi

Lines changed: 0 additions & 652 deletions
This file was deleted.

0 commit comments

Comments
 (0)