From d4faf5658189ee2ec2ba9142a7cbb78de8a4d444 Mon Sep 17 00:00:00 2001 From: Alireza Aghamohammadi Date: Thu, 28 Dec 2023 19:08:01 +0330 Subject: [PATCH] Ready to publish v1.5.5 --- docs/changelog.rst | 10 ++++++++++ setup.cfg | 2 +- src/pysolorie/observer.py | 8 -------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index cfc1ee2..bf16d38 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,16 @@ Changelog ========= +Version 1.5.5 +------------- + +Release date: 2023-12-28 + +Fixed +^^^^^ +- Removed the logs of ``observer.py`` + + Version 1.5.4 ------------- diff --git a/setup.cfg b/setup.cfg index cb44c6c..ed293b4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pysolorie -version = 1.5.4 +version = 1.5.5 description = Orientation Analysis of Solar Panel long_description = file: README.md long_description_content_type = text/markdown diff --git a/src/pysolorie/observer.py b/src/pysolorie/observer.py index 8d3d5dd..bef7be0 100644 --- a/src/pysolorie/observer.py +++ b/src/pysolorie/observer.py @@ -16,7 +16,6 @@ from typing import Optional from .exceptions import MissingObserverLatitudeError -from .logger import logger_decorator from .sun_position import SunPosition @@ -77,7 +76,6 @@ def calculate_zenith_angle(self, day_of_year: int, solar_time: float) -> float: * math.cos(hour_angle) ) - @logger_decorator def calculate_sunrise_sunset(self, day_of_year: int) -> tuple: r""" Calculate the hour angle at sunrise and sunset. @@ -104,15 +102,9 @@ def calculate_sunrise_sunset(self, day_of_year: int) -> tuple: tan_product = -math.tan(observer_latitude) * math.tan(solar_declination) if tan_product > 1: - self.logger.info( # type: ignore - "In winter, there is no sunrise or sunset (Polar Night)" - ) return 0, 0 if tan_product < -1: - self.logger.info( # type: ignore - "In summer, the sun does not set (Midnight Sun)" - ) return -math.pi, math.pi hour_angle = math.acos(tan_product)