Mercurial > hg > GlobalNeighbors
changeset 16:4583d0d9331a
stub command line entry for gridding neighbors
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 25 Jun 2017 15:03:54 -0700 |
parents | 21095c9006e5 |
children | 6aaf70296c5a |
files | globalneighbors/grid.py setup.py |
diffstat | 2 files changed, 23 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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() +
--- 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: