Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
kstopa committed Mar 7, 2024
2 parents 6e907a9 + 211754f commit 5f80545
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@
long_description = f.read()

setup(name='suntime',
version='1.3.0',
version='1.3.1',
description='Simple sunset and sunrise time calculation python library',
long_description=long_description,
long_description_content_type='text/markdown',
author='Krzysztof Stopa',
url='https://github.com/SatAgro/suntime',
copyright='Copyright 2024 SatAgro',
Expand Down
2 changes: 0 additions & 2 deletions suntime/suntime.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,8 @@ def get_sun_timedelta(self, at_date, time_zone, is_rise_time=True, zenith=90.8):

# 7c. rounding and impose range bounds
UT = round(UT, 2)
print("UT 1 {}".format(UT))
if is_rise_time:
UT = self._force_range(UT, 24)
print(UT)

# 8. return timedelta
return timedelta(hours=UT)
Expand Down
3 changes: 0 additions & 3 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,9 @@ def setUp(self):

def test_get_sunrise_time(self):
# Sunrise in Tokyo
print("TOKYO")
expected_sunrise = datetime(2024, 3, 11, 20, 57, 36, tzinfo=tz.UTC)
utc_sunrise = self.sun.get_sunrise_time(datetime(2024, 3, 11))
print(utc_sunrise)
local_sunrise = self.sun.get_local_sunrise_time(datetime(2024, 3, 11), tz.gettz('Asia/Tokyo'))
print(local_sunrise)
self.assertEqual(utc_sunrise, expected_sunrise)
# self.assertEqual(local_sunrise, expected_sunrise)

Expand Down

0 comments on commit 5f80545

Please sign in to comment.