aetherfield 0.2.3__tar.gz → 0.2.4__tar.gz
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.
- {aetherfield-0.2.3/src/aetherfield.egg-info → aetherfield-0.2.4}/PKG-INFO +1 -1
- {aetherfield-0.2.3 → aetherfield-0.2.4}/pyproject.toml +1 -1
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield/__init__.py +3 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield/core.py +14 -14
- {aetherfield-0.2.3 → aetherfield-0.2.4/src/aetherfield.egg-info}/PKG-INFO +1 -1
- {aetherfield-0.2.3 → aetherfield-0.2.4}/LICENSE +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/README.md +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/setup.cfg +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield/cli/benchmark.py +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield/cli/calibrate_all.py +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield/cli/compare.py +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield/iplocal.py +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield.egg-info/SOURCES.txt +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield.egg-info/dependency_links.txt +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield.egg-info/entry_points.txt +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield.egg-info/requires.txt +0 -0
- {aetherfield-0.2.3 → aetherfield-0.2.4}/src/aetherfield.egg-info/top_level.txt +0 -0
|
@@ -36,8 +36,11 @@ from .core import (
|
|
|
36
36
|
__all__ = [
|
|
37
37
|
"OBLIQUITY_DEG",
|
|
38
38
|
"aether_longitude",
|
|
39
|
+
"aether_longitude_mt",
|
|
40
|
+
"aetherium_longitude_mt",
|
|
39
41
|
"aether_sign",
|
|
40
42
|
"aether_alignments",
|
|
43
|
+
"aether_alignments_mt",
|
|
41
44
|
"moon_phase",
|
|
42
45
|
"ecliptic_to_equatorial",
|
|
43
46
|
"sunrise_sunset",
|
|
@@ -962,7 +962,7 @@ class AetherField:
|
|
|
962
962
|
if not os.getenv("AETHER_CAL_FILE", False):
|
|
963
963
|
CACHE_PATH = os.path.join(os.path.expanduser("~"), ".cache", "aetherfield", "aetherfield_calibration.json")
|
|
964
964
|
REMOTE_URL = "https://pythoness.duckdns.org/v1/aether/calibration/file"
|
|
965
|
-
|
|
965
|
+
data = None
|
|
966
966
|
# 1. Local cache
|
|
967
967
|
if os.path.exists(CACHE_PATH):
|
|
968
968
|
try:
|
|
@@ -970,23 +970,23 @@ class AetherField:
|
|
|
970
970
|
data = json.load(f)
|
|
971
971
|
except Exception:
|
|
972
972
|
pass
|
|
973
|
-
|
|
973
|
+
if not data:
|
|
974
974
|
# 2. Remote fetch
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
with urllib.request.urlopen(REMOTE_URL, timeout=5) as response:
|
|
979
|
-
data = json.load(response)
|
|
975
|
+
try:
|
|
976
|
+
import urllib.request
|
|
980
977
|
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
with open(CACHE_PATH, "w", encoding="utf-8") as f:
|
|
984
|
-
json.dump(data, f)
|
|
978
|
+
with urllib.request.urlopen(REMOTE_URL, timeout=5) as response:
|
|
979
|
+
data = json.load(response)
|
|
985
980
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
981
|
+
# 4. Save to cache
|
|
982
|
+
os.makedirs(os.path.dirname(CACHE_PATH), exist_ok=True)
|
|
983
|
+
with open(CACHE_PATH, "w", encoding="utf-8") as f:
|
|
984
|
+
json.dump(data, f)
|
|
989
985
|
|
|
986
|
+
#return data
|
|
987
|
+
except Exception:
|
|
988
|
+
with open(path, 'r', encoding='utf-8') as f:
|
|
989
|
+
data = json.load(f)
|
|
990
990
|
else:
|
|
991
991
|
|
|
992
992
|
with open(path, 'r', encoding='utf-8') as f:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|