You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def test_product_fixed_metadata_by_sample_percentage(summary_store: SummaryStore):
# There are 4 interim and 16 final maturity level datasets
# at [100](https://github.com/opendatacube/datacube-explorer/runs/8104095953?check_suite_focus=true#step:5:101)% (all 20 datasets), the same dictionary will be returned
# 100% of the time
fixed_fields = summary_store._find_product_fixed_metadata(
summary_store.index.products.get_by_name("ga_ls8c_ard_3"),
sample_percentage=100,
)
assert fixed_fields == {
"platform": "landsat-8",
"instrument": "OLI_TIRS",
"product_family": "ard",
"format": "GeoTIFF",
"eo_gsd": 15.0
}
# There are 4 interim and 16 final maturity level datasets
# at 50% (10 datasets), there is a fair chance, that maturity level
# will be in the dictionary
fixed_fields = summary_store._find_product_fixed_metadata(
summary_store.index.products.get_by_name("ga_ls8c_ard_3"),
sample_percentage=50,
)
> assert len(fixed_fields) >= 5
E assert 0 >= 5
E + where 0 = len({})
The text was updated successfully, but these errors were encountered:
current sampling logic:
https://github.com/opendatacube/datacube-explorer/blob/develop/cubedash/summary/_stores.py#L651-L654
running the sql based on the above logic returns an inconsistent sample size.
this is further validated by test ci: https://github.com/opendatacube/datacube-explorer/runs/8104066958?check_suite_focus=true,
sample percentage of
50
returned zero row of datasetsThe text was updated successfully, but these errors were encountered: