From aa88dfab708764896c7f28a7a3c88552943cef37 Mon Sep 17 00:00:00 2001 From: Nicolas Schmid Date: Mon, 7 Aug 2023 14:33:04 +0200 Subject: [PATCH] chores: move and rename qml parser code --- catalog_tools/io/client.py | 10 +++++----- .../{download/download_qml.py => io/parser.py} | 0 2 files changed, 5 insertions(+), 5 deletions(-) rename catalog_tools/{download/download_qml.py => io/parser.py} (100%) diff --git a/catalog_tools/io/client.py b/catalog_tools/io/client.py index f2554ec..8fa5cfc 100644 --- a/catalog_tools/io/client.py +++ b/catalog_tools/io/client.py @@ -5,14 +5,14 @@ import pandas as pd import requests -from catalog_tools.download.download_qml import CustomContentHandler +from catalog_tools.io.parser import CustomContentHandler class FDSNWSEventClient(): def __init__(self, url: str): """ Args: - url: base url of the FDSNWS event service + url: base url of the FDSNWS event service (eg. 'https://earthquake.usgs.gov/fdsnws/event/1/query') """ @@ -85,9 +85,9 @@ def get_events(self, start_time: Optional[datetime] = None, def main(): - url = 'https://earthquake.usgs.gov/fdsnws/event/1/query' - url2 = 'http://arclink.ethz.ch/fdsnws/event/1/query' - client = FDSNWSEventClient(url2) + # url = 'https://earthquake.usgs.gov/fdsnws/event/1/query' + url = 'http://arclink.ethz.ch/fdsnws/event/1/query' + client = FDSNWSEventClient(url) cat = client.get_events(start_time=datetime( 2023, 7, 1)) print(cat[cat['magnitude_value'].isna()]) diff --git a/catalog_tools/download/download_qml.py b/catalog_tools/io/parser.py similarity index 100% rename from catalog_tools/download/download_qml.py rename to catalog_tools/io/parser.py