Skip to content

Commit

Permalink
+ logging
Browse files Browse the repository at this point in the history
  • Loading branch information
7yl4r committed Jul 23, 2024
1 parent 8d4cf46 commit 08a2774
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nerrs_data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__author__ = """Tylar Murray"""
__email__ = '[email protected]'
__version__ = '1.2.0'
__version__ = '1.2.1'

from .exportSingleParam import exportSingleParam
from .exportStationCodes import exportStationCodes
Expand Down
5 changes: 4 additions & 1 deletion nerrs_data/exportAllParamsDateRange.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,21 @@
import xml.etree.ElementTree as ET

def exportAllParamsDateRange(stationCode, minDate, maxDate, paramTested):
print('init SOAP client...')
soapClient = Client(
"http://cdmo.baruch.sc.edu/webservices2/requests.cfc?wsdl",
timeout=90,
retxml=True
)

print('submitting request...')
# Get the station codes SOAP request example.
data_xml = soapClient.service.exportAllParamsDateRangeXMLNew(
stationCode, # Station_Code
minDate,
maxDate,
paramTested
)
print('parsing xml...')
data_tree = ET.fromstring(data_xml)
#print(
# "data:\n",
Expand All @@ -53,6 +55,7 @@ def exportAllParamsDateRange(stationCode, minDate, maxDate, paramTested):
record[elem.tag] = elem.text
records.append(record)

print('exporting as dataframe...')
# Convert to DataFrame
df = pd.DataFrame(records)

Expand Down

0 comments on commit 08a2774

Please sign in to comment.