From db5a1109817d4064c8c12998bb9e5b1cc392d1a9 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Mon, 25 Dec 2023 20:44:25 +0200 Subject: [PATCH] update dependency info --- main.py | 28 ++++++++++++++++++++-------- plots.pdf | Bin 22419 -> 22419 bytes pyproject.toml | 9 +++++---- requirements.txt | 2 +- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/main.py b/main.py index 0f57563..a5d252f 100755 --- a/main.py +++ b/main.py @@ -1,5 +1,16 @@ #!/usr/bin/env python +""" +Author: Kristiāns Francis Cagulis, kc22015 +Date: 25.12.2023. +Github: https://github.com/kristoferssolo/LU-Data-Visualisation +Dependencies: matplotlib, numpy, pandas, loguru, openpyxl + +This script generates two plots from Excel files and saves them to a PDF file. +Excel files can be stored in the same directory as this script or in a subdirectory called "data". +""" + + import platform import subprocess from pathlib import Path @@ -11,14 +22,6 @@ from loguru import logger from matplotlib.backends.backend_pdf import PdfPages -logger.add( - Path("logs", "data.log"), - format="{time} | {level} | {message}", - level="INFO", - rotation="1 MB", - compression="zip", -) - BASE_PATH = Path(__file__).parent WIND_GUSTS_FILENAME = "vejaAtrumsBrazmas.xlsx" WIND_SPEED_FILENAME = "vejaAtrumsFaktiskais.xlsx" @@ -29,6 +32,15 @@ BLUE = "#1f77b4" ORANGE = "#ff7f0e" BLACK = "#000000" +# Setup logger +logger.add( + BASE_PATH.joinpath("logs", "data.log"), + format="{time} | {level} | {message}", + level="INFO", + rotation="1 MB", + compression="zip", +) + def read_data(filename: str) -> pd.DataFrame: """ diff --git a/plots.pdf b/plots.pdf index 7af32c994b8bcb6014336d4a7d82ab4cb483fb08..713703f497a85c3f1568d4f9086438efb888173f 100644 GIT binary patch delta 19 bcmbQdo^kSe#tkO|S&S`>4K|+%JkAOLP#Oon delta 19 bcmbQdo^kSe#tkO|S&S@<%r~D2JkAOLP%H<- diff --git a/pyproject.toml b/pyproject.toml index b8dfbc2..c23f186 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,10 +7,11 @@ readme = "README.md" requires-python = ">=3.11" license = { text = "MIT" } dependencies = [ - "openpyxl==3.1.2", - "loguru==0.7.2", - "matplotlib==3.8.2", - "pandas==2.1.4", + "openpyxl==3.1.2", + "loguru==0.7.2", + "numpy==1.26.2", + "matplotlib==3.8.2", + "pandas==2.1.4", ] [tool.mypy] diff --git a/requirements.txt b/requirements.txt index 0009c58..5f52693 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -attrs>=23.1.0 loguru>=0.7.2 matplotlib>=3.8.2 +numpy>=1.26.2 openpyxl>=3.1.2 pandas>=2.1.4