-
Notifications
You must be signed in to change notification settings - Fork 18
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 db logic from all collections in core.py #196
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Just one question. Does the base_url
always have a trailing slash?
{ | ||
"rel": Relations.self.value, | ||
"type": MimeTypes.json, | ||
"href": urljoin(base_url, "collections"), | ||
"href": f"{base_url}collections", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any chance that the self href could be malformed if base_url does not have a trailing slash?
Like https://stac_base_urlcollections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I guess urljoin probably guarantees the url will be fine either way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok nice. Thanks for sharing
Related Issue(s):
Description:
Removing the es-specific language from core.py makes it easier to use other databases with the api core package in the future.
PR Checklist:
pre-commit run --all-files
)make test
)