Skip to content

Commit

Permalink
Merge pull request #167 from developmentseed/patch/avoid-future-depre…
Browse files Browse the repository at this point in the history
…cation

Patch/avoid future deprecation
  • Loading branch information
vincentsarago authored Feb 2, 2024
2 parents 1ed838c + 2a6b62a commit b4732c0
Show file tree
Hide file tree
Showing 4 changed files with 304 additions and 80 deletions.
8 changes: 7 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

Note: Minor version `0.X.0` update might break the API, It's recommended to pin `tipg` to minor version: `tipg>=0.1,<0.2`

## [0.6.3] - 2024-02-02

- update pydantic's `Field` usage to avoid 3.0 deprecation
- update starlette's `TemplateResponse' usage to avoid deprecation

## [0.6.2] - 2024-01-19

- add `root_path` API settings
Expand Down Expand Up @@ -281,7 +286,8 @@ Note: Minor version `0.X.0` update might break the API, It's recommended to pin

- Initial release

[unreleased]: https://github.com/developmentseed/tipg/compare/0.6.2...HEAD
[unreleased]: https://github.com/developmentseed/tipg/compare/0.6.3...HEAD
[0.6.3]: https://github.com/developmentseed/tipg/compare/0.6.2...0.6.3
[0.6.2]: https://github.com/developmentseed/tipg/compare/0.6.1...0.6.2
[0.6.1]: https://github.com/developmentseed/tipg/compare/0.6.0...0.6.1
[0.6.0]: https://github.com/developmentseed/tipg/compare/0.5.7...0.6.0
Expand Down
2 changes: 1 addition & 1 deletion tipg/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class Collection(BaseModel):
type: str
id: str
table: str
dbschema: str = Field(..., alias="schema")
dbschema: str = Field(alias="schema")
title: Optional[str] = None
description: Optional[str] = None
table_columns: List[Column] = []
Expand Down
8 changes: 4 additions & 4 deletions tipg/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ def create_html_response(
baseurl += router_prefix

return templates.TemplateResponse(
f"{template_name}.html",
{
"request": request,
request,
name=f"{template_name}.html",
context={
"response": orjson.loads(data),
"template": {
"api_root": baseurl,
Expand Down Expand Up @@ -1829,9 +1829,9 @@ def viewer_endpoint(
tilejson_url += f"?{urlencode(request.query_params._list)}"

return self.templates.TemplateResponse(
request,
name="map.html",
context={
"request": request,
"tilejson_endpoint": tilejson_url,
},
media_type="text/html",
Expand Down
Loading

1 comment on commit b4732c0

@github-actions
Copy link

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'TiPg Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.30.

Benchmark suite Current: b4732c0 Previous: 1ed838c Ratio
tests/benchmarks.py::test_benchmark_items[html-1] 142.97847439045577 iter/sec (stddev: 0.01178159518159165) 194.2132790484021 iter/sec (stddev: 0.0002061388961837057) 1.36

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.