From e8014f2e3aa8404bda5765b78ed607d91c1e9d24 Mon Sep 17 00:00:00 2001 From: Samuel Guillemet Date: Thu, 8 Feb 2024 04:56:22 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Run=20isort=20on=20the=20pre=20p?= =?UTF-8?q?rocessing=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pre-processing/pre_processing/constant.py | 1 + .../pre-processing/pre_processing/data_agregation/helpers.py | 1 + .../pre-processing/pre_processing/data_agregation/reader.py | 1 + .../pre-processing/pre_processing/data_completion/generation.py | 1 + .../pre-processing/pre_processing/dataframe_extraction/day.py | 1 + .../pre-processing/pre_processing/dataframe_extraction/hour.py | 1 + .../pre-processing/pre_processing/dataframe_extraction/month.py | 1 + .../pre-processing/pre_processing/dataframe_extraction/year.py | 1 + components/pre-processing/pre_processing/kafka/admin.py | 1 + components/pre-processing/pre_processing/kafka/avro.py | 1 + components/pre-processing/pre_processing/kafka/data_pipeline.py | 1 + components/pre-processing/pre_processing/kafka/producer.py | 1 + components/pre-processing/pre_processing/main.py | 1 + components/pre-processing/pyproject.toml | 2 +- 14 files changed, 14 insertions(+), 1 deletion(-) diff --git a/components/pre-processing/pre_processing/constant.py b/components/pre-processing/pre_processing/constant.py index 12152e0f..1df57d21 100644 --- a/components/pre-processing/pre_processing/constant.py +++ b/components/pre-processing/pre_processing/constant.py @@ -1,4 +1,5 @@ import numpy as np + from pre_processing.utils.loader import get_data_path DATA_PATH = get_data_path() diff --git a/components/pre-processing/pre_processing/data_agregation/helpers.py b/components/pre-processing/pre_processing/data_agregation/helpers.py index beef7f1e..5edd2e67 100644 --- a/components/pre-processing/pre_processing/data_agregation/helpers.py +++ b/components/pre-processing/pre_processing/data_agregation/helpers.py @@ -1,4 +1,5 @@ import pandas as pd + from pre_processing.constant import CSV_COLUMNS, DATA_PATH from pre_processing.data_completion.helpers import ( add_ticker, diff --git a/components/pre-processing/pre_processing/data_agregation/reader.py b/components/pre-processing/pre_processing/data_agregation/reader.py index 6f02fa71..1af874ee 100644 --- a/components/pre-processing/pre_processing/data_agregation/reader.py +++ b/components/pre-processing/pre_processing/data_agregation/reader.py @@ -4,6 +4,7 @@ from typing import IO, Iterator, List, Tuple import pandas as pd + from pre_processing.constant import DATA_PATH, TARGET_DATE_REGEX from pre_processing.data_agregation.find_date import extract_full_day_from_file from pre_processing.data_agregation.helpers import generate_dataframe diff --git a/components/pre-processing/pre_processing/data_completion/generation.py b/components/pre-processing/pre_processing/data_completion/generation.py index fc64dfef..5a745aca 100644 --- a/components/pre-processing/pre_processing/data_completion/generation.py +++ b/components/pre-processing/pre_processing/data_completion/generation.py @@ -2,6 +2,7 @@ import numpy as np import pandas as pd + from pre_processing.data_completion.helpers import fast_round, generate_segments from pre_processing.decorators import performance_timer_decorator diff --git a/components/pre-processing/pre_processing/dataframe_extraction/day.py b/components/pre-processing/pre_processing/dataframe_extraction/day.py index fe04d2f8..8a60e884 100644 --- a/components/pre-processing/pre_processing/dataframe_extraction/day.py +++ b/components/pre-processing/pre_processing/dataframe_extraction/day.py @@ -1,6 +1,7 @@ import datetime import pandas as pd + from pre_processing.data_completion.generation import complete_data diff --git a/components/pre-processing/pre_processing/dataframe_extraction/hour.py b/components/pre-processing/pre_processing/dataframe_extraction/hour.py index 16a9b871..4bfec8b0 100644 --- a/components/pre-processing/pre_processing/dataframe_extraction/hour.py +++ b/components/pre-processing/pre_processing/dataframe_extraction/hour.py @@ -1,6 +1,7 @@ from typing import Generator import pandas as pd + from pre_processing.data_completion.generation import complete_data diff --git a/components/pre-processing/pre_processing/dataframe_extraction/month.py b/components/pre-processing/pre_processing/dataframe_extraction/month.py index 9bf6a8d9..e0f968bc 100644 --- a/components/pre-processing/pre_processing/dataframe_extraction/month.py +++ b/components/pre-processing/pre_processing/dataframe_extraction/month.py @@ -1,4 +1,5 @@ import pandas as pd + from pre_processing.data_completion.generation import complete_data from pre_processing.dataframe_extraction import day diff --git a/components/pre-processing/pre_processing/dataframe_extraction/year.py b/components/pre-processing/pre_processing/dataframe_extraction/year.py index 6f716080..1bb9b459 100644 --- a/components/pre-processing/pre_processing/dataframe_extraction/year.py +++ b/components/pre-processing/pre_processing/dataframe_extraction/year.py @@ -1,4 +1,5 @@ import pandas as pd + from pre_processing.data_completion.generation import complete_data from pre_processing.dataframe_extraction import day diff --git a/components/pre-processing/pre_processing/kafka/admin.py b/components/pre-processing/pre_processing/kafka/admin.py index a262c882..8a8414b7 100644 --- a/components/pre-processing/pre_processing/kafka/admin.py +++ b/components/pre-processing/pre_processing/kafka/admin.py @@ -2,6 +2,7 @@ from confluent_kafka.admin import AdminClient as _AdminClient from confluent_kafka.admin import NewTopic + from pre_processing.constant import MARKET_DATA_PARTIONS logger = logging.getLogger("pre_processing.kafka.admin") diff --git a/components/pre-processing/pre_processing/kafka/avro.py b/components/pre-processing/pre_processing/kafka/avro.py index a6f45c8a..25931a09 100644 --- a/components/pre-processing/pre_processing/kafka/avro.py +++ b/components/pre-processing/pre_processing/kafka/avro.py @@ -1,6 +1,7 @@ import logging from confluent_kafka.schema_registry import Schema, SchemaRegistryClient + from pre_processing.utils.loader import get_avro_schema, get_kafka_config logger = logging.getLogger("pre_processing.kafka.avro") diff --git a/components/pre-processing/pre_processing/kafka/data_pipeline.py b/components/pre-processing/pre_processing/kafka/data_pipeline.py index 2da2fa87..1ac1161c 100644 --- a/components/pre-processing/pre_processing/kafka/data_pipeline.py +++ b/components/pre-processing/pre_processing/kafka/data_pipeline.py @@ -8,6 +8,7 @@ from typing import Dict, Generator, List, cast import pandas as pd + from pre_processing.constant import MARKET_DATA_PARTIONS from pre_processing.dataframe_extraction.hour import complete_a_day_hour_by_hour from pre_processing.decorators import performance_timer_decorator diff --git a/components/pre-processing/pre_processing/kafka/producer.py b/components/pre-processing/pre_processing/kafka/producer.py index 8cb623c2..0e0f5570 100644 --- a/components/pre-processing/pre_processing/kafka/producer.py +++ b/components/pre-processing/pre_processing/kafka/producer.py @@ -3,6 +3,7 @@ from confluent_kafka import SerializingProducer from confluent_kafka.schema_registry.avro import AvroSerializer + from pre_processing.kafka.avro import AvroService logger = logging.getLogger("pre_processing.kafka.producer") diff --git a/components/pre-processing/pre_processing/main.py b/components/pre-processing/pre_processing/main.py index c2894a53..633cb20c 100644 --- a/components/pre-processing/pre_processing/main.py +++ b/components/pre-processing/pre_processing/main.py @@ -8,6 +8,7 @@ import pandas as pd from confluent_kafka.schema_registry.error import SchemaRegistryError + from pre_processing.constant import DATA_PATH, StockChartType from pre_processing.data_agregation.helpers import save_date_data from pre_processing.data_agregation.reader import gather_data diff --git a/components/pre-processing/pyproject.toml b/components/pre-processing/pyproject.toml index 98b6d2f9..173c5700 100644 --- a/components/pre-processing/pyproject.toml +++ b/components/pre-processing/pyproject.toml @@ -10,7 +10,7 @@ packages = [{ include = "pre_processing" }] pre-processing = "pre_processing.main:main" [tool.poetry.dependencies] -python = ">=3.11" +python = ">=3.10" matplotlib = "^3.8.0" pandas = "^2.1.1" numpy = "^1.26.1"