# HG changeset patch # User Jeff Hammel # Date 1498428234 25200 # Node ID 4583d0d9331adbb08fc184db41441ac1c2822d53 # Parent 21095c9006e530fda8772b62cb222941c3de9a38 stub command line entry for gridding neighbors diff -r 21095c9006e5 -r 4583d0d9331a globalneighbors/grid.py --- a/globalneighbors/grid.py Sun Jun 25 14:55:53 2017 -0700 +++ b/globalneighbors/grid.py Sun Jun 25 15:03:54 2017 -0700 @@ -1,4 +1,13 @@ +#!/usr/bin/env python + +""" +grid locations, for speed and fidelity +""" + import math +import sys +from .cli import CitiesParser +from .locations import locations class LatLonGrid(object): @@ -71,4 +80,16 @@ def __init__(self, locations): raise NotImplementedError('TODO') -def main( +def main(args=sys.argv[1:]): + """CLI""" + + # parse command line + parser = CitiesParser(description=__doc__) + options = parser.parse_args(args) + + # read locations + city_locations = locations(parser.read_cities()) + +if __name__ == '__main__': + main() + diff -r 21095c9006e5 -r 4583d0d9331a setup.py --- a/setup.py Sun Jun 25 14:55:53 2017 -0700 +++ b/setup.py Sun Jun 25 15:03:54 2017 -0700 @@ -22,6 +22,7 @@ find-neighbors = globalneighbors.distance:main global-neighbors = globalneighbors.main:main global-web = globalneighbors.web:main + gridded-neighbors = globalneighbors.grid:main """ kw['install_requires'] = dependencies except ImportError: