parameterize routing step to work with custom data paths
This commit is contained in:
parent
e3abf4b373
commit
ca5619976f
2 changed files with 11 additions and 6 deletions
|
|
@ -84,9 +84,12 @@ def detect_floorplan(ctx: click.core.Context):
|
|||
|
||||
|
||||
@cli.command()
|
||||
def routing():
|
||||
click.echo('Running routing')
|
||||
routing_module.calculate_route()
|
||||
@click.pass_context
|
||||
def routing(ctx: click.core.Context):
|
||||
data_dir = ctx.obj['data_dir']
|
||||
click.echo(f'Running routing for listings in {data_dir}')
|
||||
listing_paths = sorted(list(pathlib.Path(data_dir).glob("*/listing.json")))
|
||||
routing_module.calculate_route(listing_paths)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue