Skip to content

Commit e96f916

Browse files
Progress tracking (#17)
* Add progress bars and progress updates to protobuf messages * Add progress tracking * Add submitted at and started at to job dataclass * Add GetJobProgress endpoint protobuf messages and rpc * Prepare release v43 * Add unit test for progress recording * Fix pytest.raises match regex ruff rule * Exclude auto-generated code from pyright checks * Fix job dataclass decoding
1 parent f8d6cf7 commit e96f916

30 files changed

+837
-573
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ repos:
66
- id: end-of-file-fixer
77
- repo: https://github.com/charliermarsh/ruff-pre-commit
88
# keep the version here in sync with the version in uv.lock
9-
rev: "v0.12.9"
9+
rev: "v0.13.0"
1010
hooks:
1111
- id: ruff-check
1212
args: [--fix, --exit-non-zero-on-fix]

CHANGELOG.md

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

88
## [Unreleased]
99

10+
## [0.43.0] - 2025-09-12
11+
12+
- `tilebox-workflows`: Added progress tracking support to the `TaskRunner`.
13+
1014
## [0.42.0] - 2025-08-22
1115

1216
### Added
@@ -251,8 +255,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
251255
- Released under the [MIT](https://opensource.org/license/mit) license.
252256
- Released packages: `tilebox-datasets`, `tilebox-workflows`, `tilebox-storage`, `tilebox-grpc`
253257

254-
255-
[Unreleased]: https://github.com/tilebox/tilebox-python/compare/v0.42.0...HEAD
258+
[Unreleased]: https://github.com/tilebox/tilebox-python/compare/v0.43.0...HEAD
259+
[0.43.0]: https://github.com/tilebox/tilebox-python/compare/v0.42.0...v0.43.0
256260
[0.42.0]: https://github.com/tilebox/tilebox-python/compare/v0.41.0...v0.42.0
257261
[0.41.0]: https://github.com/tilebox/tilebox-python/compare/v0.40.0...v0.41.0
258262
[0.40.0]: https://github.com/tilebox/tilebox-python/compare/v0.39.0...v0.40.0

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ Python library for [Tilebox](https://tilebox.com), a lightweight space data mana
3636
## Install
3737

3838
```bash
39-
pip install tilebox-datasets tilebox-workflows tilebox-storage
39+
pip install tilebox
4040
```
4141

4242
> [!TIP]
43-
> For new projects we recommend using [uv](https://docs.astral.sh/uv/) - `uv add tilebox-datasets tilebox-workflows tilebox-storage`. Additional installation options are available [in our docs](https://docs.tilebox.com/sdks/python/install).
43+
> For new projects we recommend using [uv](https://docs.astral.sh/uv/) - `uv add tilebox`. Additional installation options are available [in our docs](https://docs.tilebox.com/sdks/python/install).
4444
4545
## Documentation
4646

@@ -78,7 +78,6 @@ results = s2a_l1c.query(
7878
print(f"Found {results.sizes['time']} datapoints") # Found 979 datapoints
7979
```
8080

81-
8281
### Tilebox Workflows
8382

8483
A parallel processing engine to simplify the creation of dynamic tasks that can be executed across various computing environments, including on-premise and auto-scaling clusters in public clouds.

buf.gen.workflows.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ plugins:
1212
out: tilebox-workflows/tilebox/workflows
1313
inputs:
1414
# for local development
15-
# - directory: ../api
15+
# directory: ../api
1616
- module: buf.build/tilebox/api
1717
paths:
1818
- "workflows"

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,13 @@ known-first-party = ["tilebox", "_tilebox"]
113113
"*/tests/*" = ["INP001", "SLF001"]
114114

115115
[tool.pyright]
116-
exclude = ["**/.ipynb_checkpoints", "**/__pycache__", ".venv"]
116+
exclude = [
117+
"**/.ipynb_checkpoints",
118+
"**/__pycache__",
119+
".venv",
120+
"tilebox-datasets/tests/example_dataset/*", # auto-generated code
121+
"tilebox-workflows/tests/proto/*", # auto-generated code
122+
]
117123

118124
# ignore warnings in those files, but still type check them when used as a dependency in other files
119125
ignore = [

tilebox-datasets/tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def test_datapoint_not_found() -> None:
126126
s2_dataset = client.dataset("open_data.copernicus.sentinel2_msi")
127127
collection = s2_dataset.collection("S2A_S2MSI1C")
128128

129-
with pytest.raises(NotFoundError, match="No such datapoint.*"):
129+
with pytest.raises(NotFoundError, match=r"No such datapoint.*"):
130130
collection.find("0181f4ef-2040-101a-1423-d818e4d1895e") # is in another collection
131131

132132

tilebox-datasets/tests/test_timeseries.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,15 @@ def test_timeseries_dataset_collection_find_invalid_id() -> None:
186186
mocked.collection.find("invalid")
187187

188188
mocked.service.query_by_id.side_effect = ArgumentError
189-
with pytest.raises(ValueError, match="Invalid datapoint id.*"):
189+
with pytest.raises(ValueError, match=r"Invalid datapoint id.*"):
190190
mocked.collection.find(uuid4())
191191

192192

193193
def test_timeseries_dataset_collection_find_not_found() -> None:
194194
"""Test that .find() of a collection raises a NotFoundError if the datapoint is not found."""
195195
mocked = _mocked_collection()
196196
mocked.service.query_by_id.side_effect = NotFoundError
197-
with pytest.raises(NotFoundError, match="No such datapoint.*"):
197+
with pytest.raises(NotFoundError, match=r"No such datapoint.*"):
198198
mocked.collection.find("14eb91a2-a42f-421f-9397-1dab577f05a9")
199199

200200

tilebox-grpc/tests/aio/test_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ async def _mock_rpc() -> None:
3434
self.some_rpc = _mock_rpc
3535

3636
stub = with_pythonic_errors(Stub())
37-
with pytest.raises(exception_type, match=".*"):
37+
with pytest.raises(exception_type, match=r".*"):
3838
await stub.some_rpc()

tilebox-grpc/tests/test_channel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ def test_parse_channel_info_unix(url: str) -> None:
8888

8989

9090
def test_parse_channel_invalid() -> None:
91-
with pytest.raises(ValueError, match="Invalid"):
91+
with pytest.raises(ValueError, match=r"Invalid"):
9292
parse_channel_info("i'm not a url")
9393

9494

9595
def test_parse_channel_port_required_for_http() -> None:
96-
with pytest.raises(ValueError, match="Explicit port required"):
96+
with pytest.raises(ValueError, match=r"Explicit port required"):
9797
parse_channel_info("http://0.0.0.0")

tilebox-grpc/tests/test_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ def _mock_rpc() -> None:
3838
self.some_rpc = _mock_rpc
3939

4040
stub = with_pythonic_errors(Stub())
41-
with pytest.raises(exception_type, match=".*"):
41+
with pytest.raises(exception_type, match=r".*"):
4242
stub.some_rpc()

0 commit comments

Comments
 (0)