From 498d38453055a7eb4ed3de58e800cb9e03f028a7 Mon Sep 17 00:00:00 2001 From: Alexandre Cirilo <38657258+alxdrcirilo@users.noreply.github.com> Date: Sat, 17 Aug 2024 09:24:56 +0100 Subject: [PATCH] fix: circular imports in plot subpackage (#3) --- apple_health_parser/plot/__init__.py | 2 ++ apple_health_parser/scripts/main.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apple_health_parser/plot/__init__.py b/apple_health_parser/plot/__init__.py index e69de29..f24238a 100644 --- a/apple_health_parser/plot/__init__.py +++ b/apple_health_parser/plot/__init__.py @@ -0,0 +1,2 @@ +from .overviews import Overview +from .plots import Plot diff --git a/apple_health_parser/scripts/main.py b/apple_health_parser/scripts/main.py index 0f5dbce..56f14f9 100644 --- a/apple_health_parser/scripts/main.py +++ b/apple_health_parser/scripts/main.py @@ -1,7 +1,6 @@ import click -from apple_health_parser.plot.overviews import ActivityOverview -from apple_health_parser.plot.plots import Plot +from apple_health_parser.plot import Overview, Plot from apple_health_parser.utils.logging import logger from apple_health_parser.utils.parser import Parser @@ -34,7 +33,7 @@ def main(zip_file: str) -> None: "HKQuantityTypeIdentifierAppleStandTime", ] data = parser.get_flag_records(flag=flags) - overview = ActivityOverview(data=data, year=2024, source=source) + overview = Overview(data=data, overview_type="activity", year=2024, source=source) overview.plot(show=True, save=True, format="svg")