-
Notifications
You must be signed in to change notification settings - Fork 1
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
STAC catalogue search #2
base: develop
Are you sure you want to change the base?
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.
Note to self: reached up to 06def02
datacosmos/const.py
Outdated
DATACOSMOS_PRODUCTION_BASE_URL = "https://app.open-cosmos.com/api/data/v0" | ||
DATACOSMOS_PRODUCTION_AUDIENCE = "https://beeapp.open-cosmos.com" | ||
DATACOSMOS_TOKEN_URL = "https://opencosmos.eu.auth0.com/oauth/token" | ||
|
||
|
||
class Satellites(Enum): |
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.
Will these read like something like from datacosmos.const import Satellites
Satellites.SENTINEL_1A
? I would have preferred something like from datacosmos.satellite import SENTINEL_1A
and it would avoid creating a poorly-scoped const
file which is going to be become very large and be a dumping ground for many things.
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.
Yeah we can do it that way, python Enums are not great so getting rid of them is no bad thing, it's just a shame to lose the informative type hint
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 fair point. Is there a way we can eat our cake and have it too, i.e. avoid the enum but keep nice type hints? Python equivalent of type Satellite string
in Go?
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 is: https://docs.python.org/3/library/enum.html#enum.StrEnum
Unfortunately it was only introduced in python 3.11 and I don't think we want to restrict ourselves that much. We can update it in a few years!
This ideally should have been at least 4 MRs. Especially since this is a public facing SDK I expect there will be many comments, it will require quite a bit of discussion and changes, and it will get quite messy. |
No description provided.