-
Notifications
You must be signed in to change notification settings - Fork 3
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
Submit STAC using transactions API #297
base: dev
Are you sure you want to change the base?
Conversation
ad3fac7
to
cccda9e
Compare
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.
Thank you for the PR. I just left some small comments
class TransactionsApi: | ||
|
||
@classmethod | ||
def from_veda_auth_secret(cls, *, secret_id: str, base_url: str) -> "IngestionApi": |
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.
Shouldn't the return type hint be "TransactionsApi" instead of "IngestionApi"
response.raise_for_status() | ||
except Exception as ex: | ||
print(response.text) | ||
raise f"Error, {ex}" |
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.
Raise should be derived from a baseException otherwise it won't raise a string 🤔
Probably we should use
raise RuntimeError(f"Error, {ex}")
:param token: Optional Bearer token for authenticated STAC APIs. | ||
""" | ||
self.stac_ingestor_api_url = stac_ingestor_api_url.rstrip('/') | ||
self.cognito_app_secret = cognito_app_secret |
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.
Where are we using self.cognito_app_secret
?
Proposed implementation for #288
Original ingest API support is maintained through an Airflow variable. I learned while setting this up that this is not a recommended approach, but it is consistent with what we do elsewhere.