Skip to content

Conversation

@jonhealy1
Copy link
Collaborator

Related Issue(s):

Description:
Create an ingestion script to load sample data into the database. Run the script with make ingest

PR Checklist:

  • Code is formatted and linted (run pre-commit run --all-files)
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG, if applicable

@jonhealy1 jonhealy1 requested a review from philvarner February 24, 2022 07:53
collection = "test-collection"
load_collection(collection)

for feature in feature_collection["features"]:
Copy link
Collaborator

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

Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch here!

Copy link
Collaborator Author

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

Copy link
Collaborator Author

@jonhealy1 jonhealy1 Feb 25, 2022

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?

Copy link
Collaborator

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

@jonhealy1 jonhealy1 requested a review from philvarner February 25, 2022 09:53
@jonhealy1 jonhealy1 merged commit 989c3de into main Feb 25, 2022
@philvarner philvarner deleted the ingest_data branch March 25, 2022 15:24
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.

3 participants