From 1ce9be0e7c506ea96478c312eae84e3bc9664323 Mon Sep 17 00:00:00 2001 From: Bryn Pickering <17178478+brynpickering@users.noreply.github.com> Date: Tue, 19 Dec 2023 15:03:06 +0000 Subject: [PATCH] Try removing `:` from filename to fix windows error --- genet/output/geojson.py | 2 +- tests/test_output_geojson.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/genet/output/geojson.py b/genet/output/geojson.py index 26705ea7..3b5b75ff 100644 --- a/genet/output/geojson.py +++ b/genet/output/geojson.py @@ -131,7 +131,7 @@ def generate_standard_outputs_for_schedule( for h in [7, 8, 9, 13, 16, 17, 18]: save_geodataframe( df_all_modes_vph[df_all_modes_vph["hour"].dt.hour == h], - filename=f"vph_all_modes_within_{h - 1}:30-{h}:30", + filename=f"vph_all_modes_within_{h - 1}_30-{h}_30", output_dir=vph_dir, include_shp_files=include_shp_files, ) diff --git a/tests/test_output_geojson.py b/tests/test_output_geojson.py index bf4c60c9..4a90d9ce 100644 --- a/tests/test_output_geojson.py +++ b/tests/test_output_geojson.py @@ -397,7 +397,7 @@ def test_generating_standard_outputs(network, tmpdir): "vph_per_service.csv", "vehicles_per_hour_all_modes.geojson", "vph_per_stop_departing_from.csv", - "vph_all_modes_within_6:30-7:30.geojson", + "vph_all_modes_within_6_30-7_30.geojson", "vph_per_stop_arriving_at.csv", "shp_files", "vehicles_per_hour_bus.geojson", @@ -405,7 +405,7 @@ def test_generating_standard_outputs(network, tmpdir): } assert set(os.listdir(os.path.join(tmpdir, "schedule", "vehicles_per_hour", "shp_files"))) == { "vehicles_per_hour_all_modes.cpg", - "vph_all_modes_within_6:30-7:30.shx", + "vph_all_modes_within_6_30-7_30.shx", "vehicles_per_hour_rail.prj", "vehicles_per_hour_bus.shp", "vehicles_per_hour_bus.dbf", @@ -414,16 +414,16 @@ def test_generating_standard_outputs(network, tmpdir): "vehicles_per_hour_all_modes.prj", "vehicles_per_hour_bus.shx", "vehicles_per_hour_rail.dbf", - "vph_all_modes_within_6:30-7:30.dbf", + "vph_all_modes_within_6_30-7_30.dbf", "vehicles_per_hour_rail.cpg", - "vph_all_modes_within_6:30-7:30.shp", + "vph_all_modes_within_6_30-7_30.shp", "vehicles_per_hour_rail.shp", "vehicles_per_hour_all_modes.shx", "vehicles_per_hour_bus.cpg", "vehicles_per_hour_all_modes.shp", - "vph_all_modes_within_6:30-7:30.prj", + "vph_all_modes_within_6_30-7_30.prj", "vehicles_per_hour_all_modes.dbf", - "vph_all_modes_within_6:30-7:30.cpg", + "vph_all_modes_within_6_30-7_30.cpg", } assert set(os.listdir(os.path.join(tmpdir, "schedule", "subgraphs"))) == { "schedule_subgraph_links_bus.geojson",