Skip to content

Commit

Permalink
Dont understand the error generated by the test which seems to not ha…
Browse files Browse the repository at this point in the history
…ppen locally, last attempt
  • Loading branch information
pclemow committed Aug 9, 2024
1 parent 01ea7fa commit 3010124
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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


Expand Down

0 comments on commit 3010124

Please sign in to comment.