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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aetherfield
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: AetherField runtime ephemeris
5
5
  Author: WitchMithras
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "aetherfield"
7
- version = "0.2.3"
7
+ version = "0.2.4"
8
8
  description = "AetherField runtime ephemeris"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -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
- try:
976
- import urllib.request
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
- # 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)
978
+ with urllib.request.urlopen(REMOTE_URL, timeout=5) as response:
979
+ data = json.load(response)
985
980
 
986
- #return data
987
- except Exception:
988
- pass
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aetherfield
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: AetherField runtime ephemeris
5
5
  Author: WitchMithras
6
6
  License: MIT
File without changes
File without changes
File without changes