Skip to content

Commit

Permalink
clean defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentsarago committed Feb 15, 2021
1 parent db513d0 commit a95073d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

* update `titiler.dependencies.AssetsBidxParams` to make `asset` a required parameter (https://github.com/developmentseed/titiler/pull/230
* the STAC `/info` endpoint now expect the `assets` parameter to be passed. To ge the list of available assets we added a new `/assets` endpoint within the tiler factory
* remove `COGReader` as default `reader` in `titiler.endpoints.factory.BaseTilerFactory`

## 0.1.0a14 (2021-01-05)

Expand Down
7 changes: 5 additions & 2 deletions titiler/endpoints/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
class BaseTilerFactory(metaclass=abc.ABCMeta):
"""BaseTiler Factory."""

reader: Type[BaseReader] = COGReader
reader: Type[BaseReader]
reader_options: Dict = field(default_factory=dict)

# FastAPI router
Expand Down Expand Up @@ -122,6 +122,9 @@ def url_for(self, request: Request, name: str, **path_params: Any) -> str:
class TilerFactory(BaseTilerFactory):
"""Tiler Factory."""

# Default reader is set to COGReader
reader: Type[BaseReader] = COGReader

# Endpoint Dependencies
metadata_dependency: Type[DefaultDependency] = MetadataParams
img_dependency: Type[DefaultDependency] = ImageParams
Expand Down Expand Up @@ -925,7 +928,7 @@ class MosaicTilerFactory(BaseTilerFactory):
needs a reader (MosaicBackend) and a dataset_reader (BaseReader).
"""

reader: BaseBackend = MosaicBackend
reader: Type[BaseBackend] = MosaicBackend
dataset_reader: Type[BaseReader] = COGReader

# BaseBackend does not support other TMS than WebMercator
Expand Down

0 comments on commit a95073d

Please sign in to comment.