-
Notifications
You must be signed in to change notification settings - Fork 25
Ingest sample data #32
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
Conversation
collection = "test-collection" | ||
load_collection(collection) | ||
|
||
for feature in feature_collection["features"]: |
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.
The Transactions Extension defines that either an Item or ItemCollection can be posted to /collections/{cid}/items -- if stac-fastapi doesn't support this, there should be a bug filed
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.
so, apparently stac-fastapi does not support this. It does, however, have a bulk_items endpoint. But, that doesn't work with the code in transactions.py because of a bug. I'll create a PR for that bug and put my code for bulk_items somewhere.
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.
Good catch here!
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.
I just assumed that stac-fastapi was following the spec before
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.
Should we add this pr, then update the code when the bulk transactions endpoint is fixed? Or should we wait?
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.
I'd wait -- this is fine for loading locally
Related Issue(s):
Description:
Create an ingestion script to load sample data into the database. Run the script with
make ingest
PR Checklist:
pre-commit run --all-files
)make test
)make docs
)