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

STAC catalogue search #2

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from
Open

STAC catalogue search #2

wants to merge 20 commits into from

Conversation

mrob95
Copy link

@mrob95 mrob95 commented May 11, 2023

No description provided.

Copy link
Contributor

@snasphysicist snasphysicist left a 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

pyproject.toml Show resolved Hide resolved
datacosmos/errors.py Show resolved Hide resolved
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):
Copy link
Contributor

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.

Copy link
Author

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

Copy link
Contributor

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?

Copy link
Author

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!

datacosmos/stac/search.py Outdated Show resolved Hide resolved
datacosmos/datacosmos.py Outdated Show resolved Hide resolved
datacosmos/datacosmos.py Outdated Show resolved Hide resolved
@snasphysicist
Copy link
Contributor

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.

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.

2 participants