예제 #1
0
# is possible to raise some exception. As a result, it is beneficial to pass
# in station metadata through optional argument 'metadata'.

# Please review README file for more instructions on how to use argument
# 'metadata'

# loads method takes string object as input rather than a file path.

import woudc_formats
import logging
from woudc_formats.util import setup_logger

logfile = 'PATH TO LOG FILE'
loglevel = 'DEBUG'

setup_logger(logfile, loglevel)
LOGGER = logging.getLogger(__name__)

outpath = 'PATH TO OUTPUT EXT-CSV FILE'
inpath = 'PATH TO INPUT AMES-2160 FILE'

metadata = {
    'station': 'San Pedro',
    'agency': 'U_Colorado',
    'ID': '523',
    'country': 'Costa Rica'
}

with open(inpath, 'r') as f:
    s = f.read()
예제 #2
0
 def setUp(self):
     """setup test fixtures, etc."""
     logfile = 'log.log'
     loglevel = 'ERROR'
     setup_logger(logfile, loglevel)
     LOGGER = logging.getLogger(__name__)  # noqa