stateless tipg: remove `collection_catalog`
@bitner がすでに取り組んでいます。
2023年3月16日 から。
評価
この issue はまだ評価されていません。
説明
Since the start of tifeature/timvt/tipg, we designed the application with having a list of the available collections/layers stored in the application State: https://github.com/developmentseed/tipg/blob/489f0243b0b4f0d46d12f06a1baf0bccc1d4232a/tipg/db.py#L83
This gave some advantages:
- cost of running the collection listing is only paid once (at startup)
- we know what are the available collection so we can raise useful error if the user input collection is not in the list https://github.com/developmentseed/tipg/blob/489f0243b0b4f0d46d12f06a1baf0bccc1d4232a/tipg/dependencies.py#L40-L43
- cheap collection filtering https://github.com/developmentseed/tipg/blob/main/tipg/factory.py#L439-L458
The collection_catalog is created at application startup https://github.com/developmentseed/tipg/blob/489f0243b0b4f0d46d12f06a1baf0bccc1d4232a/tipg/main.py#L65-L80 because we assumed it's a pretty costly process.
The problem then (as explained in https://github.com/developmentseed/eoAPI/pull/55#issuecomment-1471006644) is when you have changed in the DB (e.g new table) it won't show up in the application because the catalog is now updated.
Proposal
- remove
collection_catalog - create a clean SQL function which will list the collections
- the function should accept
id(to return only one collection),limit,offset,spatial_filterandtemporal_filter
cc @bitner
- 主要言語
- PLpgSQL
- スター
- 220
- フォーク
- 39
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 6
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
developmentseed/tipg のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
developmentseed/tipg#248 · リアクション 1 件 ·
-
add support for JSONB column search再び着手できるかも @bitner が 283 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
developmentseed/tipg#247 · 担当者 2 名 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
developmentseed/tipg#241 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
developmentseed/tipg#240 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
developmentseed/tipg#228 · コメント 3 件 ·