Skip to content

Commit

Permalink
Fix for QuakeML column (a23fbce)
Browse files Browse the repository at this point in the history
  • Loading branch information
Baashen committed Jul 11, 2024
1 parent 2749e32 commit 46947b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions stream2segment/download/modules/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def get_events_df(session, url, evt_query_args, start, end,
pd_df_list = events_df_list(url, evt_query_args, start, end, timeout, show_progress)
# pd_df_list surely not empty (otherwise we raised FailedDownload)
events_df = pd.concat(pd_df_list, axis=0, ignore_index=True, copy=False)
events_df.drop(columns=[Event.quakeml.key], inplace=True)

events_df[Event.webservice_id.key] = eventws_id
events_df = dbsyncdf(events_df, session,
Expand Down
2 changes: 1 addition & 1 deletion stream2segment/io/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def webservice_id(cls):
mag_author = Column(String)
event_location_name = Column(String)
event_type = Column(String)
quakeml = Column(LargeBinary, nullable=True)
quakeml = Column(LargeBinary)

@property
def url(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/download/test_u_download_01_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ def test_get_events_response_has_one_col_more(self, mock_urljoin, db):
Event MODEL. TO FIX THIS, EDIT THE RESPONSE BELOW IN ORDER TO HAVE ALWAYS ONE
COLUMN MORE THAN IN OUR Event MODEL
"""
urlread_sideeffect = ["""#EventID|Time|Latitude|Longitude|Depth/km|Author|Catalog|Contributor|ContributorID|MagType|Magnitude|MagAuthor|EventLocationName|EventType|QuakeML|
urlread_sideeffect = ["""#EventID|Time|Latitude|Longitude|Depth/km|Author|Catalog|Contributor|ContributorID|MagType|Magnitude|MagAuthor|EventLocationName|EventType||
gfz2021edty|2021-02-28T23:37:15.211956|-17.565212|167.572067|10.0|||GFZ|gfz2021edty|M|5.787024361||Vanuatu Islands|earthquake||
gfz2021edpn|2021-02-28T21:23:50.840903|-22.500320|172.554474|26.75543594|||GFZ|gfz2021edpn|mb|4.907085435||Southeast of Loyalty Islands|earthquake||
gfz2021edoa|2021-02-28T20:37:40.931643|-22.658522|172.432373|30.70357132|||GFZ|gfz2021edoa|Mw|5.755797284||Southeast of Loyalty Islands|earthquake||
Expand Down

0 comments on commit 46947b8

Please sign in to comment.