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

Remove duplicated code from stac_fastapi.types #257

Merged
merged 3 commits into from
May 14, 2024

Conversation

StijnCaerts
Copy link
Collaborator

Related Issue(s):

  • N/A

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:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable
  • Changes are added to the changelog

@jonhealy1
Copy link
Collaborator

jonhealy1 commented May 13, 2024

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

Copy link
Collaborator

@jonhealy1 jonhealy1 left a comment

Choose a reason for hiding this comment

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

Nice work thank you

@jonhealy1 jonhealy1 merged commit b490a23 into stac-utils:main May 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants