pylunar 0.9.0__py3-none-any.whl → 0.10.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pylunar/lunar_feature_container.py +1 -1
- pylunar/moon_info.py +14 -12
- pylunar/py.typed +0 -0
- {pylunar-0.9.0.dist-info → pylunar-0.10.0.dist-info}/METADATA +15 -14
- pylunar-0.10.0.dist-info/RECORD +15 -0
- {pylunar-0.9.0.dist-info → pylunar-0.10.0.dist-info}/WHEEL +1 -1
- {pylunar-0.9.0.dist-info → pylunar-0.10.0.dist-info/licenses}/LICENSE +1 -1
- pylunar-0.9.0.dist-info/RECORD +0 -14
- {pylunar-0.9.0.dist-info → pylunar-0.10.0.dist-info/licenses}/AUTHORS.rst +0 -0
- {pylunar-0.9.0.dist-info → pylunar-0.10.0.dist-info}/top_level.txt +0 -0
@@ -81,7 +81,7 @@ class LunarFeatureContainer:
|
|
81
81
|
self.features = collections.OrderedDict()
|
82
82
|
|
83
83
|
cur = self.conn.cursor()
|
84
|
-
sql = f'select * from Features where Lunar_Code = "{self.club_name}" or
|
84
|
+
sql = f'select * from Features where Lunar_Code = "{self.club_name}" or Lunar_Code = "Both"'
|
85
85
|
if limit is not None:
|
86
86
|
sql += f" limit {limit}"
|
87
87
|
cur.execute(sql)
|
pylunar/moon_info.py
CHANGED
@@ -14,13 +14,13 @@ from __future__ import annotations
|
|
14
14
|
|
15
15
|
__all__ = ["MoonInfo"]
|
16
16
|
|
17
|
-
from datetime import datetime
|
17
|
+
from datetime import datetime, timezone
|
18
18
|
from enum import Enum
|
19
19
|
import math
|
20
20
|
from operator import itemgetter
|
21
|
+
import zoneinfo
|
21
22
|
|
22
23
|
import ephem
|
23
|
-
import pytz
|
24
24
|
|
25
25
|
from .helpers import mjd_to_date_tuple, tuple_to_string
|
26
26
|
from .lunar_feature import LunarFeature
|
@@ -495,13 +495,13 @@ class MoonInfo:
|
|
495
495
|
"""
|
496
496
|
return math.degrees(self.moon.ra)
|
497
497
|
|
498
|
-
def rise_set_times(self,
|
498
|
+
def rise_set_times(self, timezone_name: str) -> MoonPhases:
|
499
499
|
"""Calculate the rise, set and transit times in the local time system.
|
500
500
|
|
501
501
|
Parameters
|
502
502
|
----------
|
503
|
-
|
504
|
-
The
|
503
|
+
timezone_name : str
|
504
|
+
The timezone_name identifier for the calculations.
|
505
505
|
|
506
506
|
Returns
|
507
507
|
-------
|
@@ -509,11 +509,11 @@ class MoonInfo:
|
|
509
509
|
Set of rise, set, and transit times in the local time system. If
|
510
510
|
event does not happen, 'Does not xxx' is tuple value.
|
511
511
|
"""
|
512
|
-
|
512
|
+
tz: zoneinfo.ZoneInfo | timezone
|
513
513
|
try:
|
514
|
-
tz =
|
515
|
-
except
|
516
|
-
tz = utc
|
514
|
+
tz = zoneinfo.ZoneInfo(timezone_name)
|
515
|
+
except zoneinfo.ZoneInfoNotFoundError:
|
516
|
+
tz = timezone.utc
|
517
517
|
|
518
518
|
func_map = {"rise": "rising", "transit": "transit", "set": "setting"}
|
519
519
|
|
@@ -524,20 +524,22 @@ class MoonInfo:
|
|
524
524
|
self.observer.pressure = 0
|
525
525
|
self.observer.horizon = "-0:34"
|
526
526
|
|
527
|
-
current_date_utc = datetime(
|
527
|
+
current_date_utc = datetime(
|
528
|
+
*mjd_to_date_tuple(self.observer.date, round_off=True), tzinfo=timezone.utc
|
529
|
+
) # type: ignore
|
528
530
|
current_date = current_date_utc.astimezone(tz)
|
529
531
|
current_day = current_date.day
|
530
532
|
times = {}
|
531
533
|
does_not = None
|
532
534
|
for time_type in ("rise", "transit", "set"):
|
533
535
|
mjd_time = getattr(self.observer, "{}_{}".format("next", func_map[time_type]))(self.moon)
|
534
|
-
utc_time = datetime(*mjd_to_date_tuple(mjd_time, round_off=True), tzinfo=utc) # type: ignore
|
536
|
+
utc_time = datetime(*mjd_to_date_tuple(mjd_time, round_off=True), tzinfo=timezone.utc) # type: ignore
|
535
537
|
local_date = utc_time.astimezone(tz)
|
536
538
|
if local_date.day == current_day:
|
537
539
|
times[time_type] = local_date
|
538
540
|
else:
|
539
541
|
mjd_time = getattr(self.observer, "{}_{}".format("previous", func_map[time_type]))(self.moon)
|
540
|
-
utc_time = datetime(*mjd_to_date_tuple(mjd_time, round_off=True), tzinfo=utc) # type: ignore
|
542
|
+
utc_time = datetime(*mjd_to_date_tuple(mjd_time, round_off=True), tzinfo=timezone.utc) # type: ignore
|
541
543
|
local_date = utc_time.astimezone(tz)
|
542
544
|
if local_date.day == current_day:
|
543
545
|
times[time_type] = local_date
|
pylunar/py.typed
ADDED
File without changes
|
@@ -1,13 +1,13 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: pylunar
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.10.0
|
4
4
|
Summary: Information for completing the Astronomical League's Lunar and Lunar II observing programs.
|
5
5
|
Author-email: Michael Reuter <mareuternh@gmail.com>
|
6
|
+
License-Expression: BSD-3-Clause
|
6
7
|
Project-URL: Documentation, http://pylunar.readthedocs.io
|
7
8
|
Project-URL: Repository, https://github.com/mareuter/pylunar
|
8
9
|
Classifier: Development Status :: 4 - Beta
|
9
10
|
Classifier: Intended Audience :: Developers
|
10
|
-
Classifier: License :: OSI Approved :: BSD License
|
11
11
|
Classifier: Natural Language :: English
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
13
13
|
Classifier: Programming Language :: Python :: 3.9
|
@@ -18,25 +18,26 @@ Classifier: Programming Language :: Python :: 3.13
|
|
18
18
|
Description-Content-Type: text/x-rst
|
19
19
|
License-File: LICENSE
|
20
20
|
License-File: AUTHORS.rst
|
21
|
-
Requires-Dist: ephem==4.
|
22
|
-
Requires-Dist: importlib-resources==6.
|
23
|
-
Requires-Dist: typing-extensions==4.
|
24
|
-
Requires-Dist: pytz==2024.2
|
21
|
+
Requires-Dist: ephem==4.2
|
22
|
+
Requires-Dist: importlib-resources==6.5.2; python_version < "3.10"
|
23
|
+
Requires-Dist: typing-extensions==4.13.2; python_version < "3.10"
|
25
24
|
Provides-Extra: dev
|
26
25
|
Requires-Dist: pylunar[build,docs,lint,test]; extra == "dev"
|
27
|
-
Requires-Dist: scriv==1.
|
28
|
-
Requires-Dist: tox==4.
|
26
|
+
Requires-Dist: scriv==1.6.2; extra == "dev"
|
27
|
+
Requires-Dist: tox==4.25.0; extra == "dev"
|
29
28
|
Provides-Extra: test
|
30
|
-
Requires-Dist: coverage[toml]==7.
|
31
|
-
Requires-Dist: pytest==8.3.
|
29
|
+
Requires-Dist: coverage[toml]==7.8.0; extra == "test"
|
30
|
+
Requires-Dist: pytest==8.3.5; extra == "test"
|
32
31
|
Provides-Extra: lint
|
33
|
-
Requires-Dist: pre-commit==4.0
|
32
|
+
Requires-Dist: pre-commit==4.2.0; extra == "lint"
|
34
33
|
Provides-Extra: build
|
35
34
|
Requires-Dist: build==1.2.2.post1; extra == "build"
|
36
|
-
Requires-Dist: twine==
|
35
|
+
Requires-Dist: twine==6.1.0; extra == "build"
|
37
36
|
Provides-Extra: docs
|
38
|
-
Requires-Dist: sphinx~=7.
|
37
|
+
Requires-Dist: sphinx~=7.4; python_version < "3.11" and extra == "docs"
|
38
|
+
Requires-Dist: sphinx~=8.2; python_version >= "3.11" and extra == "docs"
|
39
39
|
Requires-Dist: sphinx_rtd_theme==3.0.2; extra == "docs"
|
40
|
+
Dynamic: license-file
|
40
41
|
|
41
42
|
=============================
|
42
43
|
Python Lunar
|
@@ -0,0 +1,15 @@
|
|
1
|
+
pylunar/__init__.py,sha256=1HgvGZdShUOeanMLMf2vNzdtyvcyAGtjvsytGxbaW00,1116
|
2
|
+
pylunar/altitude_dict.py,sha256=x0nsR9ZeyyEl10tvSDXSqfUx_4q2hmwckWzEmpjoE7Q,1558
|
3
|
+
pylunar/helpers.py,sha256=UgEFvBGGZxTBaKx16-CjOO8hkqPA_GLRZN8SOgshZFs,1327
|
4
|
+
pylunar/lunar_feature.py,sha256=cqNFA7ED-u13H1rayo029GrQfPR3g1cYL-m_Q0zYNuQ,5532
|
5
|
+
pylunar/lunar_feature_container.py,sha256=RuDFrjjsE5tKZ41YmMORggobWIc8qdCpjYaIjE7cb3o,2816
|
6
|
+
pylunar/moon_info.py,sha256=DttqChvhltmDCGlurNc-eqWVROYlRU4Aj86rgkGn1jg,20952
|
7
|
+
pylunar/pkg_types.py,sha256=o5LVdgosUo9Vy6OS2Hi1HkVcgUStlPV-AnEYimyxlIo,972
|
8
|
+
pylunar/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
|
+
pylunar/data/lunar.db,sha256=y2u5wR_DpHjPYH7fuR-T_q0nbPzN1GuP8_OXorjVr14,28672
|
10
|
+
pylunar-0.10.0.dist-info/licenses/AUTHORS.rst,sha256=mqGQzrJPFGm44DZxZFs0d080QDWXdtfFlv1i_fdJerg,332
|
11
|
+
pylunar-0.10.0.dist-info/licenses/LICENSE,sha256=Zwd1CheD0-t0GamZx7hdZaYt3ETG8ox6kVcN9AIZd0A,1479
|
12
|
+
pylunar-0.10.0.dist-info/METADATA,sha256=7ES6T3Jr4m9WtjkR_EhIxAsUBUMblpJfuvp6ECoca2g,3140
|
13
|
+
pylunar-0.10.0.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
14
|
+
pylunar-0.10.0.dist-info/top_level.txt,sha256=vEQZCgYlUuoq6D4q99Kj5fSpNs2Mo-jW8vKV3dnpI-U,8
|
15
|
+
pylunar-0.10.0.dist-info/RECORD,,
|
pylunar-0.9.0.dist-info/RECORD
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
pylunar/__init__.py,sha256=1HgvGZdShUOeanMLMf2vNzdtyvcyAGtjvsytGxbaW00,1116
|
2
|
-
pylunar/altitude_dict.py,sha256=x0nsR9ZeyyEl10tvSDXSqfUx_4q2hmwckWzEmpjoE7Q,1558
|
3
|
-
pylunar/helpers.py,sha256=UgEFvBGGZxTBaKx16-CjOO8hkqPA_GLRZN8SOgshZFs,1327
|
4
|
-
pylunar/lunar_feature.py,sha256=cqNFA7ED-u13H1rayo029GrQfPR3g1cYL-m_Q0zYNuQ,5532
|
5
|
-
pylunar/lunar_feature_container.py,sha256=ci5MXPLqKhghh3k9HCti5csvkohfu3GV9LHnI6rLio0,2819
|
6
|
-
pylunar/moon_info.py,sha256=n9sMgk8lDM18_D6hbC8AG0I9yQ7-FfwwQccah-LrqCs,20833
|
7
|
-
pylunar/pkg_types.py,sha256=o5LVdgosUo9Vy6OS2Hi1HkVcgUStlPV-AnEYimyxlIo,972
|
8
|
-
pylunar/data/lunar.db,sha256=y2u5wR_DpHjPYH7fuR-T_q0nbPzN1GuP8_OXorjVr14,28672
|
9
|
-
pylunar-0.9.0.dist-info/AUTHORS.rst,sha256=mqGQzrJPFGm44DZxZFs0d080QDWXdtfFlv1i_fdJerg,332
|
10
|
-
pylunar-0.9.0.dist-info/LICENSE,sha256=EF_CKfNhkKjEynpn9Msb6HaGNIBN9VfeGyrJFJQ5FYk,1479
|
11
|
-
pylunar-0.9.0.dist-info/METADATA,sha256=2QqOXzrBsu6onsZzuMbM3ePz8PJZGaGg-JzO_OzEKIo,3064
|
12
|
-
pylunar-0.9.0.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
13
|
-
pylunar-0.9.0.dist-info/top_level.txt,sha256=vEQZCgYlUuoq6D4q99Kj5fSpNs2Mo-jW8vKV3dnpI-U,8
|
14
|
-
pylunar-0.9.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|