-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: search platforms separately to keep under 10,000 results (#48)
* Search for platforms separately to stay <10,000 link results * Update root Makefile for ruff switch * Update unit tests * Mock scihub search supports platform query * Fix test of granule count (5x row for 5 days, per platform) * Revert "Mock scihub search supports platform query" This reverts commit 4841e3c. * Revert "Revert "Mock scihub search supports platform query"" This reverts commit 50a5116. * Remove non-platform specific responses * Update expected number of granule for 4x100 results * fix query->filter
- Loading branch information
Showing
25 changed files
with
34,599 additions
and
27,154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
alembic_migration/versions/ec89745f0bac_granule_count_by_platform.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
"""Granule count by platform | ||
Revision ID: ec89745f0bac | ||
Revises: 1c8c38951d47 | ||
Create Date: 2024-11-25 18:13:36.964410 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "ec89745f0bac" | ||
down_revision = "1c8c38951d47" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint( | ||
"granule_count_pkey", | ||
"granule_count", | ||
"primary", | ||
) | ||
op.add_column( | ||
"granule_count", | ||
sa.Column( | ||
"platform", | ||
sa.String(), | ||
nullable=False, | ||
server_default="S2A+S2B", | ||
), | ||
) | ||
op.create_primary_key( | ||
"granule_count_pkey", | ||
"granule_count", | ||
["date", "platform"], | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint( | ||
"granule_count_pkey", | ||
"granule_count", | ||
"primary", | ||
) | ||
op.drop_column("granule_count", "platform") | ||
op.create_primary_key( | ||
"granule_count_pkey", | ||
"granule_count", | ||
["date"], | ||
) | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.