HHS / ckanext-datajson

Custom CKAN extension for Healthdata.gov
http://hub.healthdata.gov/data.json
19 stars 72 forks source link

Initialization Requires HTTPS access to project-open-data.cio.gov #19

Open medined opened 8 years ago

medined commented 8 years ago

For security reasons, I don't want software that I install to reach out to remote web sites during the installation or initialization process. In release v1.1, there is a file called ckanext/datajson/datajsonvalidator.py. This file has the following code starting at line 87:

omb_burueau_codes = set()
for row in csv.DictReader(urllib.urlopen("https://project-open-data.cio.gov/data/omb_bureau_codes.csv")):
    omb_burueau_codes.add(row["Agency Code"] + ":" + row["Bureau Code"])

Can this code be changed to use a local file, perhaps specified using an environment variable? The HTTPS fetch can be moved into the installation instructions. Letting this file be pulled from a local file system should improve testability as well.

As a side node, omb_burueau_codes seems to be misspelled.