# Path: openaddr/process_one.py
# class SourceProblem (enum.Enum):
#     ''' Possible problems encountered in a source.
#     '''
#     skip_source = 'Source says to skip'
#     missing_conform = 'Source is missing a conform object'
#     unknown_conform_format = 'Unknown source conform format'
#     unknown_conform_protocol = 'Unknown source conform protocol'
#     download_source_failed = 'Could not download source data'
#     conform_source_failed = 'Could not conform source data'
#     no_coverage = 'Missing or incomplete coverage'
#     no_esri_token = 'Missing required ESRI token'
#     test_failed = 'An acceptance test failed'
#     no_addresses_found = 'Found no addresses in source data'
# 
#     # Old tag naming; replaced with "format" or "protocol"
#     unknown_conform_type = 'Unknown source conform type'


import logging; _L = logging.getLogger('openaddr.ci.objects')
import json, pickle, copy, time
from ..process_one import SourceProblem
    def __init__(self, json_blob):
        blob_dict = dict(json_blob or {})
        self.keys = blob_dict.keys()

        self.run_id = blob_dict.get('run id')
        self.source = blob_dict.get('source')
        self.cache = blob_dict.get('cache')
        self.sample = blob_dict.get('sample')
        self.geometry_type = blob_dict.get('geometry type')
        self.address_count = blob_dict.get('address count')
        self.version = blob_dict.get('version')
        self.fingerprint = blob_dict.get('fingerprint')
        self.cache_time = blob_dict.get('cache time')
        self.processed = blob_dict.get('processed')
        self.output = blob_dict.get('output')
        self.preview = blob_dict.get('preview')
        self.slippymap = blob_dict.get('slippymap')
        self.process_time = blob_dict.get('process time')
        self.process_hash = blob_dict.get('process hash')
        self.website = blob_dict.get('website')
        self.skipped = blob_dict.get('skipped')
        self.license = blob_dict.get('license')
        self.share_alike = blob_dict.get('share-alike')
        self.attribution_required = blob_dict.get('attribution required')
        self.attribution_name = blob_dict.get('attribution name')
        self.attribution_flag = blob_dict.get('attribution flag')
        self.code_version = blob_dict.get('code version')
        self.tests_passed = blob_dict.get('tests passed')

        raw_problem = blob_dict.get('source problem', None)

# Path: openaddr/process_one.py
# class SourceProblem (enum.Enum):
#     ''' Possible problems encountered in a source.
#     '''
#     skip_source = 'Source says to skip'
#     missing_conform = 'Source is missing a conform object'
#     unknown_conform_format = 'Unknown source conform format'
#     unknown_conform_protocol = 'Unknown source conform protocol'
#     download_source_failed = 'Could not download source data'
#     conform_source_failed = 'Could not conform source data'
#     no_coverage = 'Missing or incomplete coverage'
#     no_esri_token = 'Missing required ESRI token'
#     test_failed = 'An acceptance test failed'
#     no_addresses_found = 'Found no addresses in source data'
# 
#     # Old tag naming; replaced with "format" or "protocol"
#     unknown_conform_type = 'Unknown source conform type'


# Path: openaddr/ci/objects.py
import logging; _L = logging.getLogger('openaddr.ci.objects')
import json, pickle, copy, time
from ..process_one import SourceProblem

    def __init__(self, json_blob):
        blob_dict = dict(json_blob or {})
        self.keys = blob_dict.keys()

        self.run_id = blob_dict.get('run id')
        self.source = blob_dict.get('source')
        self.cache = blob_dict.get('cache')
        self.sample = blob_dict.get('sample')
        self.geometry_type = blob_dict.get('geometry type')
        self.address_count = blob_dict.get('address count')
        self.version = blob_dict.get('version')
        self.fingerprint = blob_dict.get('fingerprint')
        self.cache_time = blob_dict.get('cache time')
        self.processed = blob_dict.get('processed')
        self.output = blob_dict.get('output')
        self.preview = blob_dict.get('preview')
        self.slippymap = blob_dict.get('slippymap')
        self.process_time = blob_dict.get('process time')
        self.process_hash = blob_dict.get('process hash')
        self.website = blob_dict.get('website')
        self.skipped = blob_dict.get('skipped')
        self.license = blob_dict.get('license')
        self.share_alike = blob_dict.get('share-alike')
        self.attribution_required = blob_dict.get('attribution required')
        self.attribution_name = blob_dict.get('attribution name')
        self.attribution_flag = blob_dict.get('attribution flag')
        self.code_version = blob_dict.get('code version')
        self.tests_passed = blob_dict.get('tests passed')

        raw_problem = blob_dict.get('source problem', None)

        self.source_problem = None if (raw_problem is None) else SourceProblem(raw_problem)