mirror of
				https://github.com/bspeice/metrik
				synced 2025-11-03 18:00:51 -05:00 
			
		
		
		
	Logging for Travis
This commit is contained in:
		
							
								
								
									
										9
									
								
								.idea/inspectionProfiles/Project_Default.xml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										9
									
								
								.idea/inspectionProfiles/Project_Default.xml
									
									
									
										generated
									
									
									
								
							@ -15,5 +15,14 @@
 | 
			
		||||
        </value>
 | 
			
		||||
      </option>
 | 
			
		||||
    </inspection_tool>
 | 
			
		||||
    <inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
 | 
			
		||||
      <option name="ignoredPackages">
 | 
			
		||||
        <value>
 | 
			
		||||
          <list size="1">
 | 
			
		||||
            <item index="0" class="java.lang.String" itemvalue="pymongo" />
 | 
			
		||||
          </list>
 | 
			
		||||
        </value>
 | 
			
		||||
      </option>
 | 
			
		||||
    </inspection_tool>
 | 
			
		||||
  </profile>
 | 
			
		||||
</component>
 | 
			
		||||
@ -1,17 +1,15 @@
 | 
			
		||||
from __future__ import print_function
 | 
			
		||||
from luigi.task import Task
 | 
			
		||||
 | 
			
		||||
import csv
 | 
			
		||||
import requests
 | 
			
		||||
from collections import namedtuple
 | 
			
		||||
from dateutil.parser import parse
 | 
			
		||||
from io import StringIO
 | 
			
		||||
import logging
 | 
			
		||||
from luigi.parameter import DateParameter, Parameter
 | 
			
		||||
# noinspection PyUnresolvedReferences
 | 
			
		||||
from six.moves.urllib.parse import quote_plus
 | 
			
		||||
import pytz
 | 
			
		||||
from collections import namedtuple
 | 
			
		||||
import requests
 | 
			
		||||
import datetime
 | 
			
		||||
import csv
 | 
			
		||||
from io import StringIO
 | 
			
		||||
from dateutil.parser import parse
 | 
			
		||||
 | 
			
		||||
from metrik.targets.mongo_target import MongoTarget
 | 
			
		||||
from metrik.tasks.base import MongoCreateTask
 | 
			
		||||
 | 
			
		||||
LiborRate = namedtuple('LiborRate', [
 | 
			
		||||
@ -62,7 +60,9 @@ class LiborRateTask(MongoCreateTask):
 | 
			
		||||
                # the *time* is correct, but very often the date gets screwed up.
 | 
			
		||||
                # When I download the CSV with Firefox I only see the times - when I
 | 
			
		||||
                # download with `requests`, I see both date (often incorrect) and time.
 | 
			
		||||
                logging.info('Received string for publication time: {}'.format(row['publication']))
 | 
			
		||||
                dt = parse(row['publication'])
 | 
			
		||||
                logging.info('Parsed datetime: {}'.format(dt))
 | 
			
		||||
                dt = dt.replace(year=date.year, month=date.month, day=date.day)
 | 
			
		||||
                globals()['publication'] = dt
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user