[Git][debian-gis-team/asf-search][master] 4 commits: New upstream version 14.1.0
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Oct 17 09:51:50 BST 2026
Antonio Valentino pushed to branch master at Debian GIS Project / asf-search
Commits:
7bb1a14c by Antonio Valentino at 2026-10-17T08:47:59+00:00
New upstream version 14.1.0
- - - - -
58fc2a25 by Antonio Valentino at 2026-10-17T08:48:04+00:00
Update upstream source from tag 'upstream/14.1.0'
Update to upstream version '14.1.0'
with Debian dir 38240277d7c5958c1566dbbd4cdea6396fc98452
- - - - -
d3ce0ae9 by Antonio Valentino at 2026-10-17T08:48:35+00:00
New upstream release
- - - - -
e2300067 by Antonio Valentino at 2026-10-17T08:49:00+00:00
Set distribution to unstable
- - - - -
14 changed files:
- CHANGELOG.md
- README.md
- asf_search/CMR/datasets.py
- asf_search/search/geo_search.py
- asf_search/search/granule_search.py
- asf_search/search/product_search.py
- asf_search/search/search.py
- asf_search/search/search_count.py
- asf_search/search/search_generator.py
- debian/changelog
- tests/Search/test_search.py
- tests/pytest-config.yml
- tests/pytest-managers.py
- tests/yml_tests/test_search.yml
Changes:
=====================================
CHANGELOG.md
=====================================
@@ -25,6 +25,19 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-
-->
+## [v14.1.0](https://github.com/asfadmin/Discovery-asf_search/compare/v14.0.4...v14.1.0)
+
+### Added
+- `search()`, `geo_search()`, `granule_search()`, `product_search()`, `search_generator()` and `search_count()` now accept a `session` keyword argument, so an authenticated session can be passed directly (e.g. `asf.search(session=session, maxResults=250)`) instead of through `ASFSearchOptions`. Takes priority over `opts.session`.
+
+---
+
+## [v14.0.4](https://github.com/asfadmin/Discovery-asf_search/compare/v14.0.3...v14.0.4)
+
+### Added
+- Add new `ALOS` collections to processing levels
+
+---
## [v14.0.3](https://github.com/asfadmin/Discovery-asf_search/compare/v14.0.2...v14.0.3)
=====================================
README.md
=====================================
@@ -84,6 +84,12 @@ asf_search.download_urls(urls=urls, path='/Users/SARGuru/data', session=ASFSessi
Also note that `ASFSearchResults.download()` and the generic `download_urls()` function both accept a `processes` parameter which allows for parallel downloads.
+An authenticated session can also be passed directly to the search functions (`search()`, `geo_search()`, `granule_search()`, `product_search()`, `search_generator()` and `search_count()`):
+```python
+session = asf_search.ASFSession().auth_with_token('EDL token')
+results = asf_search.search(session=session, maxResults=250)
+```
+
Further examples of all of the above can be found in `examples/`
=====================================
asf_search/CMR/datasets.py
=====================================
@@ -557,7 +557,7 @@ collections_by_processing_level = {
"SENTINEL-1D_SP_GRD_HIGH",
},
"CSLC": {"OPERA_L2_CSLC-S1_CALVAL_V1", "OPERA_L2_CSLC-S1_V1"},
- "RTC": {"OPERA_L2_RTC-S1_CALVAL_V1", "OPERA_L2_RTC-S1_V1"},
+ "RTC": {"OPERA_L2_RTC-S1_CALVAL_V1", "OPERA_L2_RTC-S1_V1", "ALOS_RTC_PSR"},
"DISP-S1": {"OPERA_L3_DISP-S1_V1"},
"DISP-S1-STATIC": {"OPERA_L3_DISP-S1-STATIC_V1"},
"DIST-ALERT-S1": {"OPERA_L3_DIST-ALERT-S1_V1"},
@@ -571,14 +571,14 @@ collections_by_processing_level = {
"GRD": {"STS-59_GRD", "STS-59_META_GRD", "STS-68_GRD", "STS-68_META_GRD"},
"RTC_HI_RES": {"ALOS_PSR_RTC_HIGH"},
"RTC_LOW_RES": {"ALOS_PSR_RTC_LOW"},
- "L1.5": {"ALOS_PSR_L1.5"},
"KMZ": {
"ALOS_PSR_KMZ",
"UAVSAR_POLSAR",
"UAVSAR_RPI",
},
- "L1.0": {"ALOS_PSR_L1.0"},
- "L1.1": {"ALOS_PSR_L1.1"},
+ "L1.0": {"ALOS_L10_PSR", "ALOS_PSR_L1.0"},
+ "L1.1": {"ALOS_L11_PSR", "ALOS_PSR_L1.1"},
+ "L1.5": {"ALOS_L15_PSR", "ALOS_PSR_L1.5"},
"L2.2": {"ALOS_PSR_L2.2"},
"L0": {"ERS-1_L0", "ERS-2_L0", "JERS-1_L1", "RSAT-1_L0"},
"L1": {"ERS-1_L1", "ERS-2_L1", "JERS-1_L0", "RSAT-1_L1"},
=====================================
asf_search/search/geo_search.py
=====================================
@@ -4,6 +4,7 @@ from copy import copy
from asf_search.search import search
from asf_search.ASFSearchOptions import ASFSearchOptions
+from asf_search.ASFSession import ASFSession
from asf_search.ASFSearchResults import ASFSearchResults
@@ -64,6 +65,7 @@ def geo_search(
cmr_keywords: Union[Tuple[str, str], Sequence[Tuple[str, str]]] = None,
maxResults: int = None,
tileID: Union[str, Sequence[str]] = None,
+ session: ASFSession = None,
opts: ASFSearchOptions = None,
) -> ASFSearchResults:
"""
@@ -163,6 +165,9 @@ def geo_search(
For DIST-ALERT-S1 product type products
maxResults:
The maximum number of results to be returned by the search
+ session:
+ An ASFSession (or other requests.Session subclass) used to query CMR,
+ such as an authenticated session. Takes priority over `opts.session`
opts:
An ASFSearchOptions object describing the search parameters to be used.
Search parameters specified outside this object will override in event of a conflict.
=====================================
asf_search/search/granule_search.py
=====================================
@@ -3,10 +3,13 @@ from copy import copy
from asf_search.search import search
from asf_search.ASFSearchOptions import ASFSearchOptions
+from asf_search.ASFSession import ASFSession
from asf_search.ASFSearchResults import ASFSearchResults
-def granule_search(granule_list: Sequence[str], opts: ASFSearchOptions = None) -> ASFSearchResults:
+def granule_search(
+ granule_list: Sequence[str], opts: ASFSearchOptions = None, session: ASFSession = None
+) -> ASFSearchResults:
"""
Performs a granule name search using the ASF SearchAPI
@@ -18,6 +21,9 @@ def granule_search(granule_list: Sequence[str], opts: ASFSearchOptions = None) -
opts:
An ASFSearchOptions object describing the search parameters to be used.
Search parameters specified outside this object will override in event of a conflict.
+ session:
+ An ASFSession (or other requests.Session subclass) used to query CMR,
+ such as an authenticated session. Takes priority over `opts.session`
Returns
-------
@@ -28,4 +34,4 @@ def granule_search(granule_list: Sequence[str], opts: ASFSearchOptions = None) -
opts.merge_args(granule_list=granule_list)
- return search(opts=opts)
+ return search(session=session, opts=opts)
=====================================
asf_search/search/product_search.py
=====================================
@@ -3,10 +3,13 @@ from copy import copy
from asf_search.search import search
from asf_search.ASFSearchOptions import ASFSearchOptions
+from asf_search.ASFSession import ASFSession
from asf_search.ASFSearchResults import ASFSearchResults
-def product_search(product_list: Sequence[str], opts: ASFSearchOptions = None) -> ASFSearchResults:
+def product_search(
+ product_list: Sequence[str], opts: ASFSearchOptions = None, session: ASFSession = None
+) -> ASFSearchResults:
"""
Performs a product ID search using the ASF SearchAPI
@@ -18,6 +21,9 @@ def product_search(product_list: Sequence[str], opts: ASFSearchOptions = None) -
opts:
An ASFSearchOptions object describing the search parameters to be used.
Search parameters specified outside this object will override in event of a conflict.
+ session:
+ An ASFSession (or other requests.Session subclass) used to query CMR,
+ such as an authenticated session. Takes priority over `opts.session`
Returns
-------
@@ -28,4 +34,4 @@ def product_search(product_list: Sequence[str], opts: ASFSearchOptions = None) -
opts.merge_args(product_list=product_list)
- return search(opts=opts)
+ return search(session=session, opts=opts)
=====================================
asf_search/search/search.py
=====================================
@@ -5,6 +5,7 @@ import datetime
from asf_search import ASF_LOGGER, ASFSearchResults
from asf_search.ASFSearchOptions import ASFSearchOptions
+from asf_search.ASFSession import ASFSession
from asf_search.exceptions import ASFSearchError
from asf_search.search.search_generator import search_generator
@@ -66,6 +67,7 @@ def search(
cmr_keywords: Union[Tuple[str, str], Sequence[Tuple[str, str]]] = None,
maxResults: int = None,
tileID: Union[str, Sequence[str]] = None,
+ session: ASFSession = None,
opts: ASFSearchOptions = None,
) -> ASFSearchResults:
"""
@@ -171,6 +173,9 @@ def search(
For DIST-ALERT-S1 product type products
maxResults:
The maximum number of results to be returned by the search
+ session:
+ An ASFSession (or other requests.Session subclass) used to query CMR,
+ such as an authenticated session. Takes priority over `opts.session`
opts:
An ASFSearchOptions object describing the search parameters to be used.
Search parameters specified outside this object will override in event of a conflict.
=====================================
asf_search/search/search_count.py
=====================================
@@ -2,6 +2,7 @@ import datetime
from typing import Literal, Sequence, Tuple, Union
from copy import copy
from asf_search.ASFSearchOptions import ASFSearchOptions
+from asf_search.ASFSession import ASFSession
from asf_search.CMR.subquery import build_subqueries
from asf_search.CMR import translate_opts
from asf_search.search.search_generator import get_page, preprocess_opts
@@ -64,6 +65,7 @@ def search_count(
cmr_keywords: Union[Tuple[str, str], Sequence[Tuple[str, str]]] = None,
tileID: Union[str, Sequence[str]] = None,
maxResults: int = None,
+ session: ASFSession = None,
opts: ASFSearchOptions = None,
) -> int:
# Create a kwargs dict, that's all of the 'not None' items, and merge it with opts:
=====================================
asf_search/search/search_generator.py
=====================================
@@ -94,6 +94,7 @@ def search_generator(
cmr_keywords: Union[Tuple[str, str], Sequence[Tuple[str, str]]] = None,
tileID: Union[str, Sequence[str]] = None,
maxResults: int = None,
+ session: ASFSession = None,
opts: ASFSearchOptions = None,
) -> Generator[ASFSearchResults, None, None]:
"""
@@ -198,6 +199,9 @@ def search_generator(
used for Sentinel-1 Interferogram (BETA)
maxResults:
The maximum number of results to be returned by the search
+ session:
+ An ASFSession (or other requests.Session subclass) used to query CMR,
+ such as an authenticated session. Takes priority over `opts.session`
opts:
An ASFSearchOptions object describing the search parameters to be used.
Search parameters specified outside this object will override in event of a conflict.
=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+asf-search (14.1.0-1) unstable; urgency=medium
+
+ * New upstream release.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 17 Oct 2026 08:48:46 +0000
+
asf-search (14.0.3-1) unstable; urgency=medium
* New upstream release.
=====================================
tests/Search/test_search.py
=====================================
@@ -10,10 +10,10 @@ from asf_search.CMR.subquery import build_subqueries
from asf_search.CMR.translate import try_parse_date
from asf_search.constants import INTERNAL
from asf_search.exceptions import ASFSearchError
-from asf_search.search import search
+from asf_search.search import search, granule_search, product_search
from asf_search.ASFSearchResults import ASFSearchResults
from asf_search.CMR import dataset_collections
-from pytest import raises
+from pytest import raises, warns
from typing import List
import requests
import requests_mock
@@ -65,6 +65,41 @@ def run_test_search(search_parameters, answer):
# assert(response.geojson()["features"] == answer)
+def run_test_search_with_session(search_parameters, answer):
+ session = ASFSession()
+ session.headers.update({"X-Test-Session": "search-session"})
+
+ # session in opts, to check the session keyword argument takes priority
+ opts_session = ASFSession()
+ opts_session.headers.update({"X-Test-Session": "opts-session"})
+ opts = ASFSearchOptions(session=opts_session)
+
+ with requests_mock.Mocker() as m:
+ m.post(
+ f"https://{INTERNAL.CMR_HOST}{INTERNAL.CMR_GRANULE_PATH}",
+ json={"items": answer, "hits": len(answer)},
+ )
+
+ with warns(UserWarning):
+ response = search(session=session, opts=opts, **search_parameters)
+
+ for request in m.request_history:
+ assert request.headers.get("X-Test-Session") == "search-session"
+
+ assert len(response) == len(answer)
+ assert response.searchOptions.session is session
+ assert opts.session is opts_session
+ for product in response:
+ assert product.session is session
+
+ # granule_search() and product_search() pass the session through to search()
+ for response in [
+ granule_search(["ALPSRS279162400"], session=session),
+ product_search(["ALPSRS279162400"], session=session),
+ ]:
+ assert response.searchOptions.session is session
+
+
def run_test_search_http_error(search_parameters, status_code: Number, report: str):
if not len(search_parameters.keys()):
with requests_mock.Mocker() as m:
=====================================
tests/pytest-config.yml
=====================================
@@ -85,6 +85,11 @@ test_types:
required_in_title: test-ASFSearch-search-valid
method: test_ASFSearch_Search
+ - For ASFSearch search with session keyword tests:
+ required_keys: ["parameters", "answer"]
+ required_in_title: test-ASFSearch-search-session
+ method: test_ASFSearch_Search_Session
+
- For ASFSearch search_generator with parameters tests:
required_keys: parameters
required_in_title: test-ASFSearch-search-valid
=====================================
tests/pytest-managers.py
=====================================
@@ -35,6 +35,7 @@ from Search.test_search import (
run_test_keyword_aliasing_results,
run_test_search,
run_test_search_http_error,
+ run_test_search_with_session,
)
from Search.test_search_generator import (
run_test_search_generator,
@@ -303,6 +304,18 @@ def test_ASFSearch_Search(**args) -> None:
run_test_search(parameters, answer)
+def test_ASFSearch_Search_Session(**args) -> None:
+ """
+ Test asf_search.search with a session passed directly as a keyword argument,
+ asserting the session is used for the CMR request and attached to the results
+ """
+ test_info = args["test_info"]
+ parameters = get_resource(test_info["parameters"])
+ answer = get_resource(test_info["answer"])
+
+ run_test_search_with_session(parameters, answer)
+
+
def test_ASFSearch_Search_Generator(**args) -> None:
test_info = args["test_info"]
params = get_resource(test_info["parameters"])
=====================================
tests/yml_tests/test_search.yml
=====================================
@@ -124,6 +124,11 @@ tests:
platform: ALOS
maxResults: 3
answer: Alos_response_maxResults3.yml
+ - test-ASFSearch-search-session Alos:
+ parameters:
+ platform: ALOS
+ maxResults: 3
+ answer: Alos_response_maxResults3.yml
- test-ASFSearch-search-error 400-Error:
parameters: {}
status_code: 400
View it on GitLab: https://salsa.debian.org/debian-gis-team/asf-search/-/compare/2821578432a5c097f5d1e759d8738bb9736dc857...e230006707d5e4a9b4c9b5dbe3d740352aaa9bf5
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/asf-search/-/compare/2821578432a5c097f5d1e759d8738bb9736dc857...e230006707d5e4a9b4c9b5dbe3d740352aaa9bf5
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20261017/fe3625b2/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list