Skip to content

Commit

Permalink
Ready to publish v1.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
aaghamohammadi committed Dec 28, 2023
1 parent f5283f5 commit d4faf56
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
10 changes: 10 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
@@ -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
-------------

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 0 additions & 8 deletions src/pysolorie/observer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from typing import Optional

from .exceptions import MissingObserverLatitudeError
from .logger import logger_decorator
from .sun_position import SunPosition


Expand Down Expand Up @@ -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.
Expand All @@ -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)
Expand Down

0 comments on commit d4faf56

Please sign in to comment.