From d75cb9a0e7beab56b8d2b689700a061473f5ead4 Mon Sep 17 00:00:00 2001 From: mrosskopf Date: Fri, 6 Sep 2024 13:34:12 +0200 Subject: [PATCH] removed sources (brackets in a function and wrong variable name) for failed tests --- dug_seis/db/sqlite_db_backend.py | 28 +++++++++++++--------------- dug_seis/tests/test_dug_picker.py | 3 +-- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/dug_seis/db/sqlite_db_backend.py b/dug_seis/db/sqlite_db_backend.py index cbcfe12..132bd6c 100644 --- a/dug_seis/db/sqlite_db_backend.py +++ b/dug_seis/db/sqlite_db_backend.py @@ -196,22 +196,20 @@ def ci(x: typing.Dict) -> typing.Optional[obspy.core.event.CreationInfo]: return None return obspy.core.event.CreationInfo( agency_id=x["creationInfo_agencyID"], - agency_uri=( - obspy.core.event.ResourceIdentifier(x["creationInfo_agencyURI"]) - if x["creationInfo_agencyURI"] - else None, - ), + agency_uri=obspy.core.event.ResourceIdentifier( + x["creationInfo_agencyURI"] + ) + if x["creationInfo_agencyURI"] + else None, author=x["creationInfo_author"], - author_uri=( - obspy.core.event.ResourceIdentifier(x["creationInfo_authorURI"]) - if x["creationInfo_authorURI"] - else None, - ), - creation_time=( - obspy.UTCDateTime(x["creationInfo_creationTime"]) - if x["creationInfo_creationTime"] - else None, - ), + author_uri=obspy.core.event.ResourceIdentifier( + x["creationInfo_authorURI"] + ) + if x["creationInfo_authorURI"] + else None, + creation_time=obspy.UTCDateTime(x["creationInfo_creationTime"]) + if x["creationInfo_creationTime"] + else None, version=x["creationInfo_version"], ) diff --git a/dug_seis/tests/test_dug_picker.py b/dug_seis/tests/test_dug_picker.py index 2d1b206..80a3e92 100644 --- a/dug_seis/tests/test_dug_picker.py +++ b/dug_seis/tests/test_dug_picker.py @@ -15,8 +15,7 @@ def test_dug_picker_sta_lta(): picker_opts={ "st_window": 70, "lt_window": 700, - "threshold_on": 3.0, - "threshold_off": 0.5, + "thresholds": [3.0]*len(st), }, )