Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tilebuffer #31

Merged
merged 5 commits into from
Feb 7, 2022
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: pre-commit run --all-files

- name: Run tests
run: python -m pytest --cov=titiler.pgstac --cov-report=xml --cov-report=term-missing --ignore=venv
run: python -m pytest --cov=titiler.pgstac --cov-report=xml --cov-report=term-missing --ignore=venv -s -vv
env:
POSTGRES_USER: username
POSTGRES_PASS: password
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## 0.1.0.a4 (2022-02-07) Pre-Release

* add tile `buffer` option to match rio-tiler tile options (https://github.com/stac-utils/titiler-pgstac/pull/31)

## 0.1.0.a3 (2021-12-15) Pre-Release

* Forward TMS to the STAC Reader (allow multiple TMS) (https://github.com/stac-utils/titiler-pgstac/pull/28)
Expand Down
2 changes: 2 additions & 0 deletions docs/endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ curl 'http://127.0.0.1:8000/f1ed59f0a6ad91ed80ae79b7b52bc707/info' | jq
- **colormap** (str): JSON encoded custom Colormap.
- **colormap_name** (str): rio-tiler color map name.
- **return_mask** (bool): Add mask to the output data. Default is True.
- **buffer** (float): Add buffer on each side of the tile (e.g 0.5 = 257x257, 1.0 = 258x258).

!!! important
**assets** OR **expression** is required
Expand Down Expand Up @@ -137,6 +138,7 @@ Example:
- **colormap** (str): JSON encoded custom Colormap.
- **colormap_name** (str): rio-tiler color map name.
- **return_mask** (bool): Add mask to the output data. Default is True.
- **buffer** (float): Add buffer on each side of the tile (e.g 0.5 = 257x257, 1.0 = 258x258).

!!! important
**assets** OR **expression** is required
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"test": [
"pytest",
"pytest-cov",
"pytest-asyncio",
"requests",
"pytest-asyncio<0.18.0",
"httpx",
"pypgstac>=0.4,<0.5",
"asyncpg",
],
Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
import asyncpg
import pytest
import rasterio
from httpx import AsyncClient
from pypgstac import pypgstac
from rasterio.io import MemoryFile

from starlette.testclient import TestClient

DATA_DIR = os.path.join(os.path.dirname(__file__), "fixtures")
collection = os.path.join(DATA_DIR, "noaa-emergency-response.json")
items = os.path.join(DATA_DIR, "noaa-eri-nashville2020.json")
Expand Down Expand Up @@ -126,7 +125,8 @@ async def app():
await conn.close()

await connect_to_db(app)
yield TestClient(app)
async with AsyncClient(app=app, base_url="http://test") as client:
yield client
await close_db_connection(app)

finally:
Expand Down
Loading