dsegerss/pyAirviro — pull request #3 by mjakob (2014-01-22 07:36:06+00:00)
Title: Source data look-ups in external services.

This pull request introduces **sourceLookup** - a script to look-up information about emission sources in external data services. For usage and information about the options, run sourceLookup -h.

The script itself is just a front end for a new pyAirviro.lookupservices sub-package that contains a framework for describing and using new look-up services. This sub-package has three vital components in the form of classes:

* __Service__

Each external data service is represented by this class. It contains the other two classes. It should be defined as an entry point in the pyAirviro.lookupservices group to be available to the sourceLookup script.
* __Fetcher__

This class is responsible for fetching information about a given source and return the raw data.

* __Parser__

This class is responsible for parsing the raw data returned by the __Fetcher__ and perform subsequent look-ups in it.

The script and the sub-package comes with tests with reasonable coverage. A single look-up service is shipped with this pull request: **IHS**. It uses *IHS Fairplay*'s ship register to update ship emission sources.