MCPcopy Create free account
hub / github.com/comaps/comaps / run_routing_quality_tool

Function run_routing_quality_tool

tools/python/routing/run_comparison.py:50–72  ·  view source on GitHub ↗
(*, omim, config_ini, old_versions, new_versions, data_from_routes_builder_tool)

Source from the content-addressed store, hash-verified

48
49
50def run_routing_quality_tool(*, omim, config_ini, old_versions, new_versions, data_from_routes_builder_tool):
51 args = {}
52 is_benchmark = config_ini.read_value_by_path(path=['TOOL', 'Benchmark'])
53 if is_benchmark:
54 args['benchmark_stat'] = ''
55
56 results_base_dir = config_ini.read_value_by_path(path=['PATHS', 'ResultsSaveDir'])
57
58 for old_version in old_versions:
59 for new_version in new_versions:
60 utils.log_with_stars(f'Compare {old_version["name"]} VS {new_version["name"]}')
61 old_branch_hash = utils.get_branch_hash_name(branch=old_version['branch'], hash=old_version['hash'])
62 old_version_task = data_from_routes_builder_tool[old_branch_hash]
63
64 new_branch_hash = utils.get_branch_hash_name(branch=new_version['branch'], hash=new_version['hash'])
65 new_version_task = data_from_routes_builder_tool[new_branch_hash]
66
67 args['mapsme_results'] = new_version_task['dump_path']
68 args['mapsme_old_results'] = old_version_task['dump_path']
69 args['save_results'] = os.path.join(results_base_dir, old_branch_hash + '__vs__' + new_branch_hash)
70
71 omim.run(binary='routing_quality_tool', args=args)
72 LOG.info(os.linesep, os.linesep)
73
74
75def main():

Callers 1

mainFunction · 0.85

Calls 3

read_value_by_pathMethod · 0.80
joinMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected