Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
* switch to uv for development
* switch to hatch for python package build-system
* bump minimum python version to 3.11
* update titiler requirement to `>=1.0,<1.1`
* switch to rio-tiler mosaic backend
* change `/point` response
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Document the change

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add change for the /{search_id}/list endpoint (now /{search_id}/)


## 1.9.0 (2025-09-23)

Expand Down
11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ classifiers = [
"Topic :: Scientific/Engineering :: GIS",
]
dependencies = [
"titiler.core>=0.24,<0.25",
"titiler.mosaic>=0.24,<0.25",
# "titiler.core>=1.0,<1.1",
# "titiler.mosaic>=1.0,<1.1",
"titiler.core @ git+https://github.com/developmentseed/titiler@feature/optional-cogeo-mosaic#egg=titiler.core&subdirectory=src/titiler/core",
"titiler.mosaic @ git+https://github.com/developmentseed/titiler@feature/optional-cogeo-mosaic#egg=titiler.mosaic&subdirectory=src/titiler/mosaic",
"cql2>=0.3.6",
"pydantic>=2.4,<3.0",
"pydantic-settings~=2.0",
Expand Down Expand Up @@ -60,7 +62,7 @@ dev = [
"pytest-cov",
"pytest-asyncio",
"httpx",
"pypgstac>=0.7,<=0.10",
"pypgstac>=0.9.8,<=0.10",
"pytest-postgresql",
"pre-commit",
"bump-my-version",
Expand Down Expand Up @@ -93,6 +95,9 @@ only-include = ["titiler"]
[tool.hatch.build.targets.wheel]
only-include = ["titiler"]

[tool.hatch.metadata]
allow-direct-references = true

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def load_json(filepath: str):
params=[
"0.7.10",
"0.8.5",
"0.9.5",
"0.9.8",
],
scope="session",
)
Expand Down
13 changes: 6 additions & 7 deletions tests/test_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ def test_tilejson_collections(app):
assert response.headers["content-type"] == "application/json"
assert response.status_code == 200
resp = response.json()
assert resp["name"] == f"Mosaic for '{collection_id}' Collection"
assert resp["minzoom"] == 0
assert resp["maxzoom"] == 24
assert round(resp["bounds"][0]) == -180
Expand Down Expand Up @@ -520,14 +519,14 @@ def test_query_point_collections(app):
response = app.get(
f"/collections/{collection_id}/point/-85.5,36.1624", params={"assets": "cog"}
)

assert response.status_code == 200
resp = response.json()
values = resp["values"]
values = resp["assets"]
assert len(values) == 2
assert values[0][0] == "noaa-emergency-response/20200307aC0853130w361030"
assert values[0][2] == ["cog_b1", "cog_b2", "cog_b3"]
assert values[1][0] == "noaa-emergency-response/20200307aC0853000w361030"
assert values[0]["name"] == "noaa-emergency-response/20200307aC0853130w361030"
assert values[0]["band_names"] == ["cog_b1", "cog_b2", "cog_b3"]
assert values[0]["values"] == [27.0, 34.0, 42.0]
assert values[1]["name"] == "noaa-emergency-response/20200307aC0853000w361030"

# with coord-crs
response = app.get(
Expand All @@ -536,7 +535,7 @@ def test_query_point_collections(app):
)
assert response.status_code == 200
resp = response.json()
assert len(resp["values"]) == 2
assert len(resp["assets"]) == 2

# CollectionId not found
response = app.get(
Expand Down
15 changes: 6 additions & 9 deletions tests/test_searches.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ def test_tilejson(app, search_no_bbox, search_bbox):
assert response.headers["content-type"] == "application/json"
assert response.status_code == 200
resp = response.json()
assert resp["name"] == search_no_bbox
assert resp["minzoom"] == 0
assert resp["maxzoom"] == 24
assert round(resp["bounds"][0]) == -180
Expand Down Expand Up @@ -209,7 +208,6 @@ def test_tilejson(app, search_no_bbox, search_bbox):
assert response.headers["content-type"] == "application/json"
assert response.status_code == 200
resp = response.json()
assert resp["name"] == search_bbox
assert resp["minzoom"] == 0
assert resp["maxzoom"] == 24
assert resp["bounds"] == [-85.535, 36.137, -85.465, 36.179]
Expand Down Expand Up @@ -386,19 +384,18 @@ def test_cql2(rio, app):
assert response.headers["content-type"] == "application/json"
assert response.status_code == 200
resp = response.json()
assert resp["name"] == cql2_id
assert resp["minzoom"] == 0
assert resp["maxzoom"] == 24
assert round(resp["bounds"][0]) == -180
# Make sure we return a tilejson with the `/{search_id}/tiles/{tms}` format
assert (
f"/searches/{cql2_id}/tiles/WebMercatorQuad/{{z}}/{{x}}/{{y}}?assets=cog"
f"/searches/{cql2_id}/tiles/WebMercatorQuad/{{z}}/{{x}}/{{y}}@1x?assets=cog"
in resp["tiles"][0]
)

z, x, y = 15, 8589, 12849
response = app.get(
f"/searches/{cql2_id}/tiles/WebMercatorQuad/{z}/{x}/{y}?assets=cog"
f"/searches/{cql2_id}/tiles/WebMercatorQuad/{z}/{x}/{y}@1x?assets=cog"
)
assert response.status_code == 200
assert response.headers["content-type"] == "image/jpeg"
Expand Down Expand Up @@ -1015,10 +1012,10 @@ def test_query_point_searches(app, search_no_bbox, search_bbox):
assert response.status_code == 200
resp = response.json()

values = resp["values"]
values = resp["assets"]
assert len(values) == 2
assert values[0][0] == "noaa-emergency-response/20200307aC0853130w361030"
assert values[0][2] == ["cog_b1", "cog_b2", "cog_b3"]
assert values[0]["name"] == "noaa-emergency-response/20200307aC0853130w361030"
assert values[0]["band_names"] == ["cog_b1", "cog_b2", "cog_b3"]

# with coord-crs
response = app.get(
Expand All @@ -1027,7 +1024,7 @@ def test_query_point_searches(app, search_no_bbox, search_bbox):
)
assert response.status_code == 200
resp = response.json()
assert len(resp["values"]) == 2
assert len(resp["assets"]) == 2

# SearchId not found
response = app.get(
Expand Down
Loading
Loading