[Git][debian-gis-team/asf-search][master] 4 commits: New upstream version 10.0.2
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Aug 30 17:14:19 BST 2025
Antonio Valentino pushed to branch master at Debian GIS Project / asf-search
Commits:
3fd4143c by Antonio Valentino at 2025-08-30T16:11:03+00:00
New upstream version 10.0.2
- - - - -
86110568 by Antonio Valentino at 2025-08-30T16:11:06+00:00
Update upstream source from tag 'upstream/10.0.2'
Update to upstream version '10.0.2'
with Debian dir 008b4066b0174d3e8f741a8f0f661561733e6f13
- - - - -
3aca1525 by Antonio Valentino at 2025-08-30T16:12:20+00:00
New upstream release
- - - - -
c8bb2037 by Antonio Valentino at 2025-08-30T16:12:38+00:00
Set distribution to unstable
- - - - -
6 changed files:
- CHANGELOG.md
- asf_search/CMR/datasets.py
- asf_search/CMR/subquery.py
- asf_search/CMR/translate.py
- asf_search/__init__.py
- debian/changelog
Changes:
=====================================
CHANGELOG.md
=====================================
@@ -25,10 +25,17 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-->
+------
+## [v10.0.2](https://github.com/asfadmin/Discovery-asf_search/compare/v10.0.1...v10.0.2)
+### Fixed
+- `PRODUCTION_CONFIGURATION` constants module now accessible as top level import
+- NISAR Urgent Response works properly with processing level searches
+
------
## [v10.0.1](https://github.com/asfadmin/Discovery-asf_search/compare/v10.0.0...v10.0.1)
### Added
- adds NISAR file sizes to the `nisar` attribute of exports
+
------
## [v10.0.0](https://github.com/asfadmin/Discovery-asf_search/compare/v9.0.9...v10.0.0)
### Added
=====================================
asf_search/CMR/datasets.py
=====================================
@@ -1,5 +1,13 @@
from typing import List
+from asf_search.constants import PRODUCT_TYPE
+
+NISAR_PRODUCT_TYPES = [
+ PRODUCT_TYPE.L0B, #L4
+ PRODUCT_TYPE.SME2, # L3
+ PRODUCT_TYPE.GSLC, PRODUCT_TYPE.GCOV, PRODUCT_TYPE.GUNW, PRODUCT_TYPE.GOFF, # L2
+ PRODUCT_TYPE.RSLC, PRODUCT_TYPE.RIFG, PRODUCT_TYPE.RUNW, PRODUCT_TYPE.ROFF, # L1
+]
dataset_collections = {
'ALOS-2': {
=====================================
asf_search/CMR/subquery.py
=====================================
@@ -5,6 +5,7 @@ from copy import copy
from asf_search.ASFSearchOptions import ASFSearchOptions
from asf_search.constants import CMR_PAGE_SIZE
from asf_search.CMR.datasets import (
+ NISAR_PRODUCT_TYPES,
collections_by_processing_level,
collections_per_platform,
get_concept_id_alias,
@@ -12,7 +13,6 @@ from asf_search.CMR.datasets import (
)
from numpy import intersect1d, union1d
-
def build_subqueries(opts: ASFSearchOptions) -> List[ASFSearchOptions]:
"""
Build a list of sub-queries using the cartesian product
@@ -45,7 +45,13 @@ def build_subqueries(opts: ASFSearchOptions) -> List[ASFSearchOptions]:
'maxResults',
] # these params exist in opts, but shouldn't be passed on to subqueries at ALL
- collections, aliased_keywords = get_keyword_concept_ids(params, opts.collectionAlias)
+ includes_nisar_products = False
+ if params.get('processingLevel') is not None:
+ for product in params.get('processingLevel', []):
+ if product in NISAR_PRODUCT_TYPES:
+ includes_nisar_products = True
+ break
+ collections, aliased_keywords = get_keyword_concept_ids(params, opts.collectionAlias, includes_nisar_products)
params['collections'] = list(union1d(collections, params.get('collections', [])))
for keyword in [*skip_param_names, *aliased_keywords]:
@@ -83,7 +89,7 @@ def _build_subquery(
return ASFSearchOptions(**q, **list_params)
-def get_keyword_concept_ids(params: dict, use_collection_alias: bool = True) -> dict:
+def get_keyword_concept_ids(params: dict, use_collection_alias: bool = True, includes_nisar_products: bool = False) -> dict:
"""
Gets concept-ids for dataset, platform, processingLevel keywords
processingLevel is scoped by dataset or platform concept-ids when available
@@ -92,6 +98,8 @@ def get_keyword_concept_ids(params: dict, use_collection_alias: bool = True) ->
search parameter dictionary pre-CMR translation
: param use_collection_alias:
whether or not to alias platform and processingLevel with concept-ids
+ : includes_nisar_products:
+ Flag to skip the processing level aliasing (urgent response products are grouped by product level and not product type)
: returns two lists:
- list of concept-ids for dataset, platform, and processingLevel
- list of aliased keywords to remove from final parameters
@@ -100,7 +108,7 @@ def get_keyword_concept_ids(params: dict, use_collection_alias: bool = True) ->
aliased_keywords = []
if use_collection_alias:
- if 'processingLevel' in params.keys():
+ if 'processingLevel' in params.keys() and not includes_nisar_products:
collections = get_concept_id_alias(
params.get('processingLevel'), collections_by_processing_level
)
=====================================
asf_search/CMR/translate.py
=====================================
@@ -8,7 +8,7 @@ from shapely import wkt
from shapely.geometry import Polygon
from shapely.geometry.base import BaseGeometry
from .field_map import field_map
-from .datasets import collections_per_platform
+from .datasets import collections_per_platform, NISAR_PRODUCT_TYPES
import logging
try:
@@ -22,6 +22,12 @@ def translate_opts(opts: ASFSearchOptions) -> List:
# so use a dict to avoid the validate_params logic:
dict_opts = dict(opts)
+ if dict_opts.get('processingLevel') is not None: # Certain products are now using PRODUCT_TYPE instead of PROCESSING_LEVEL
+ processingType = dict_opts.get('processingLevel', [])[0]
+ if processingType in NISAR_PRODUCT_TYPES:
+ # Use new PRODUCT_TYPE keyword later, remove processingLevel so we don't try the value with PROCESSING_LEVEL
+ dict_opts['productType'] = dict_opts.pop('processingLevel')[0]
+
# Escape commas for each key in the list.
# intersectsWith, temporal, and other keys you don't want to escape, so keep whitelist instead
for escape_commas in ['campaign']:
@@ -79,6 +85,9 @@ def translate_opts(opts: ASFSearchOptions) -> List:
for key, val in dict_opts.items():
# If it's "session" or something else CMR doesn't accept, don't send it:
if key not in field_map:
+ if key == 'productType':
+ custom_cmr_keywords.append(('attribute[]', f'string,PRODUCT_TYPE,{val}'))
+
continue
if isinstance(val, list):
for x in val:
=====================================
asf_search/__init__.py
=====================================
@@ -44,7 +44,8 @@ from .constants import ( # noqa: F401 E402
PRODUCT_TYPE, # noqa: F401 E402
INTERNAL, # noqa: F401 E402
DATASET, # noqa: F401 E402
- RANGE_BANDWIDTH, # noqa: F401 E402
+ RANGE_BANDWIDTH, # noqa: F401 E402,
+ PRODUCTION_CONFIGURATION, # noqa: F401 E402
)
from .health import * # noqa: F403 F401 E402
from .search import * # noqa: F403 F401 E402
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+asf-search (10.0.2-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 30 Aug 2025 16:12:24 +0000
+
asf-search (10.0.1-1) unstable; urgency=medium
* New upstream release.
View it on GitLab: https://salsa.debian.org/debian-gis-team/asf-search/-/compare/f5a26b454afb38f6baf7a0943fd5d85dea60d6c1...c8bb20374323ca8f84db82b0a074f58057a3044b
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/asf-search/-/compare/f5a26b454afb38f6baf7a0943fd5d85dea60d6c1...c8bb20374323ca8f84db82b0a074f58057a3044b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20250830/5720efff/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list