stac-utils / stac-fastapi-elasticsearch-opensearch

Elasticsearch backend for stac-fastapi with Opensearch support.
https://stac-utils.github.io/stac-fastapi-elasticsearch-opensearch
MIT License
24 stars 14 forks source link

Remove duplicated code from stac_fastapi.types #257

Closed StijnCaerts closed 1 month ago

StijnCaerts commented 1 month ago

Related Issue(s):

Description: We have duplicated code from stac_fastapi.types in the code base. This could introduce hard to find bugs when method signatures in these abstract classes change and we do not propagate this change (eg. the path parameter collection_id that was introduced recently in the collection update from the transaction extension). By removing the duplicated code, we should catch these errors faster and it should be easier to upgrade to newer stac_fastapi versions.

PR Checklist:

jonhealy1 commented 1 month ago

I created this so that I could add: database = attr.ib(default=BaseDatabaseLogic) to the AsyncBaseTransactionsClient and AsyncBaseCoreClient. I am sure there is a better way to do this as this is clearly not very maintainable. This was done to create the core library to support different databases. It looks like we don't need to do this but I'm not sure why tests are failing