diff --git a/label_maker/label.py b/label_maker/label.py index b8fc552..b491ad6 100644 --- a/label_maker/label.py +++ b/label_maker/label.py @@ -1,6 +1,7 @@ # pylint: disable=unused-argument,too-many-nested-blocks """Create label data from OSM QA tiles for specified classes""" +import sys from os import makedirs, path as op from subprocess import run, Popen, PIPE import json @@ -76,7 +77,7 @@ def make_labels(dest_folder, zoom, country, classes, ml_type, bounding_box, spar print('Retiling QA Tiles to zoom level {} (takes a bit)'.format(zoom)) ps = Popen(['tippecanoe-decode', '-c', '-f', mbtiles_file], stdout=PIPE) stream_filter_fpath = op.join(op.dirname(label_maker.__file__), 'stream_filter.py') - run(['python', stream_filter_fpath, json.dumps(bounding_box)], + run([sys.executable, stream_filter_fpath, json.dumps(bounding_box)], stdin=ps.stdout, stdout=open(filtered_geo, 'w')) ps.wait() run(['tippecanoe', '--no-feature-limit', '--no-tile-size-limit'] + fast_parse + diff --git a/requirements-dev.txt b/requirements-dev.txt index d1a6b31..6626221 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,5 @@ -astroid>=1.6.0 isort>=4.2.15 -pylint==1.8.1 +pylint==1.9.1 Sphinx==1.8.0 sphinx-autobuild==0.7.1 sphinxcontrib-fulltoc==1.2.0