From 301012405f2f4d191d019e1c9eac845dd83f5ae4 Mon Sep 17 00:00:00 2001 From: pclemow Date: Fri, 9 Aug 2024 16:17:36 +0100 Subject: [PATCH] Dont understand the error generated by the test which seems to not happen locally, last attempt --- app/svg.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/svg.py b/app/svg.py index 45896e9..aa0145f 100644 --- a/app/svg.py +++ b/app/svg.py @@ -38,17 +38,17 @@ def __init__(self, txt: str) -> None: # type: ignore # noqa self.url = f"data:image/svg+xml;base64,{encoded.decode()}" -"""Load SVGs""" +"""Load SVGs and Gridlington Datafile""" with open(Path(__file__).parent / "map.svg", "rt", encoding="utf-8") as f: svg_map = SVG(f.read()) with open(Path(__file__).parent / "sld.svg", "rt", encoding="utf-8") as f: svg_sld = SVG(f.read()) -""" Load the Gridlington JSON data """ with open(Path(__file__).parent / "GridlingtonData.json", "rt", encoding="utf-8") as f: Gridlington = json.load(f) + def write_agents_sld( centre_x: float, centre_y: float, @@ -193,8 +193,6 @@ def get_agent_map_coordinates(df: pd.DataFrame) -> tuple[list[float], list[float x_coordinates.append(poly_c[0] * svg_map.width) y_coordinates.append(poly_c[1] * svg_map.width) - # x_coordinates = np.random.uniform(0, svg_map.width, 1000).tolist() - # y_coordinates = np.random.uniform(0, svg_map.height, 1000).tolist() return x_coordinates, y_coordinates