kerykeion 4.18.3__py3-none-any.whl → 5.1.9__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.
Potentially problematic release.
This version of kerykeion might be problematic. Click here for more details.
- kerykeion/__init__.py +56 -11
- kerykeion/aspects/__init__.py +7 -4
- kerykeion/aspects/aspects_factory.py +568 -0
- kerykeion/aspects/aspects_utils.py +86 -13
- kerykeion/astrological_subject_factory.py +1901 -0
- kerykeion/backword.py +820 -0
- kerykeion/chart_data_factory.py +552 -0
- kerykeion/charts/__init__.py +2 -2
- kerykeion/charts/chart_drawer.py +2794 -0
- kerykeion/charts/charts_utils.py +1066 -309
- kerykeion/charts/draw_planets.py +602 -351
- kerykeion/charts/templates/aspect_grid_only.xml +337 -193
- kerykeion/charts/templates/chart.xml +441 -240
- kerykeion/charts/templates/wheel_only.xml +365 -211
- kerykeion/charts/themes/black-and-white.css +148 -0
- kerykeion/charts/themes/classic.css +107 -76
- kerykeion/charts/themes/dark-high-contrast.css +145 -107
- kerykeion/charts/themes/dark.css +146 -107
- kerykeion/charts/themes/light.css +146 -103
- kerykeion/charts/themes/strawberry.css +158 -0
- kerykeion/composite_subject_factory.py +408 -0
- kerykeion/ephemeris_data_factory.py +443 -0
- kerykeion/fetch_geonames.py +81 -21
- kerykeion/house_comparison/__init__.py +6 -0
- kerykeion/house_comparison/house_comparison_factory.py +103 -0
- kerykeion/house_comparison/house_comparison_utils.py +126 -0
- kerykeion/kr_types/__init__.py +66 -6
- kerykeion/kr_types/chart_template_model.py +20 -0
- kerykeion/kr_types/kerykeion_exception.py +15 -9
- kerykeion/kr_types/kr_literals.py +14 -106
- kerykeion/kr_types/kr_models.py +14 -179
- kerykeion/kr_types/settings_models.py +15 -152
- kerykeion/planetary_return_factory.py +805 -0
- kerykeion/relationship_score_factory.py +301 -0
- kerykeion/report.py +750 -65
- kerykeion/schemas/__init__.py +106 -0
- kerykeion/schemas/chart_template_model.py +367 -0
- kerykeion/schemas/kerykeion_exception.py +20 -0
- kerykeion/schemas/kr_literals.py +181 -0
- kerykeion/schemas/kr_models.py +603 -0
- kerykeion/schemas/settings_models.py +188 -0
- kerykeion/settings/__init__.py +20 -1
- kerykeion/settings/chart_defaults.py +444 -0
- kerykeion/settings/config_constants.py +152 -0
- kerykeion/settings/kerykeion_settings.py +36 -61
- kerykeion/settings/translation_strings.py +1499 -0
- kerykeion/settings/translations.py +74 -0
- kerykeion/sweph/ast136/s136108s.se1 +0 -0
- kerykeion/sweph/ast136/s136199s.se1 +0 -0
- kerykeion/sweph/ast136/s136472s.se1 +0 -0
- kerykeion/sweph/ast28/se28978s.se1 +0 -0
- kerykeion/sweph/ast50/se50000s.se1 +0 -0
- kerykeion/sweph/ast90/se90377s.se1 +0 -0
- kerykeion/sweph/ast90/se90482s.se1 +0 -0
- kerykeion/sweph/sefstars.txt +1602 -0
- kerykeion/transits_time_range_factory.py +302 -0
- kerykeion/utilities.py +626 -125
- kerykeion-5.1.9.dist-info/METADATA +1793 -0
- kerykeion-5.1.9.dist-info/RECORD +63 -0
- {kerykeion-4.18.3.dist-info → kerykeion-5.1.9.dist-info}/WHEEL +1 -1
- kerykeion/aspects/natal_aspects.py +0 -143
- kerykeion/aspects/synastry_aspects.py +0 -113
- kerykeion/astrological_subject.py +0 -818
- kerykeion/charts/kerykeion_chart_svg.py +0 -894
- kerykeion/enums.py +0 -51
- kerykeion/ephemeris_data.py +0 -178
- kerykeion/kr_types/chart_types.py +0 -88
- kerykeion/relationship_score/__init__.py +0 -2
- kerykeion/relationship_score/relationship_score.py +0 -175
- kerykeion/relationship_score/relationship_score_factory.py +0 -275
- kerykeion/settings/kr.config.json +0 -721
- kerykeion-4.18.3.dist-info/LICENSE +0 -661
- kerykeion-4.18.3.dist-info/METADATA +0 -396
- kerykeion-4.18.3.dist-info/RECORD +0 -42
- kerykeion-4.18.3.dist-info/entry_points.txt +0 -3
- /LICENSE → /kerykeion-5.1.9.dist-info/licenses/LICENSE +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
from kerykeion.schemas.kr_literals import AstrologicalPoint
|
|
2
|
+
from kerykeion.schemas.kr_models import ActiveAspect
|
|
3
|
+
from typing import List
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
DEFAULT_ACTIVE_POINTS: List[AstrologicalPoint] = [
|
|
7
|
+
"Sun",
|
|
8
|
+
"Moon",
|
|
9
|
+
"Mercury",
|
|
10
|
+
"Venus",
|
|
11
|
+
"Mars",
|
|
12
|
+
"Jupiter",
|
|
13
|
+
"Saturn",
|
|
14
|
+
"Uranus",
|
|
15
|
+
"Neptune",
|
|
16
|
+
"Pluto",
|
|
17
|
+
# "Mean_North_Lunar_Node",
|
|
18
|
+
"True_North_Lunar_Node",
|
|
19
|
+
# "Mean_South_Lunar_Node",
|
|
20
|
+
"True_South_Lunar_Node",
|
|
21
|
+
"Chiron",
|
|
22
|
+
"Mean_Lilith",
|
|
23
|
+
# "True_Lilith",
|
|
24
|
+
# "Earth",
|
|
25
|
+
# "Pholus",
|
|
26
|
+
# "Ceres",
|
|
27
|
+
# "Pallas",
|
|
28
|
+
# "Juno",
|
|
29
|
+
# "Vesta",
|
|
30
|
+
# "Eris",
|
|
31
|
+
# "Sedna",
|
|
32
|
+
# "Haumea",
|
|
33
|
+
# "Makemake",
|
|
34
|
+
# "Ixion",
|
|
35
|
+
# "Orcus",
|
|
36
|
+
# "Quaoar",
|
|
37
|
+
# "Regulus",
|
|
38
|
+
# "Spica",
|
|
39
|
+
"Ascendant",
|
|
40
|
+
"Medium_Coeli",
|
|
41
|
+
"Descendant",
|
|
42
|
+
"Imum_Coeli",
|
|
43
|
+
# "Vertex",
|
|
44
|
+
# "Anti_Vertex",
|
|
45
|
+
# "Pars_Fortunae",
|
|
46
|
+
# "Pars_Spiritus",
|
|
47
|
+
# "Pars_Amoris",
|
|
48
|
+
# "Pars_Fidei"
|
|
49
|
+
]
|
|
50
|
+
"""
|
|
51
|
+
Default list of active points in the charts or aspects calculations.
|
|
52
|
+
The full list of points is available in the `schemas.kr_literals.AstrologicalPoint` literal.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
ALL_ACTIVE_POINTS: List[AstrologicalPoint] = [
|
|
56
|
+
"Sun",
|
|
57
|
+
"Moon",
|
|
58
|
+
"Mercury",
|
|
59
|
+
"Venus",
|
|
60
|
+
"Mars",
|
|
61
|
+
"Jupiter",
|
|
62
|
+
"Saturn",
|
|
63
|
+
"Uranus",
|
|
64
|
+
"Neptune",
|
|
65
|
+
"Pluto",
|
|
66
|
+
"Mean_North_Lunar_Node",
|
|
67
|
+
"True_North_Lunar_Node",
|
|
68
|
+
"Mean_South_Lunar_Node",
|
|
69
|
+
"True_South_Lunar_Node",
|
|
70
|
+
"Chiron",
|
|
71
|
+
"Mean_Lilith",
|
|
72
|
+
"True_Lilith",
|
|
73
|
+
"Earth",
|
|
74
|
+
"Pholus",
|
|
75
|
+
"Ceres",
|
|
76
|
+
"Pallas",
|
|
77
|
+
"Juno",
|
|
78
|
+
"Vesta",
|
|
79
|
+
"Eris",
|
|
80
|
+
"Sedna",
|
|
81
|
+
"Haumea",
|
|
82
|
+
"Makemake",
|
|
83
|
+
"Ixion",
|
|
84
|
+
"Orcus",
|
|
85
|
+
"Quaoar",
|
|
86
|
+
"Regulus",
|
|
87
|
+
"Spica",
|
|
88
|
+
"Ascendant",
|
|
89
|
+
"Medium_Coeli",
|
|
90
|
+
"Descendant",
|
|
91
|
+
"Imum_Coeli",
|
|
92
|
+
"Vertex",
|
|
93
|
+
"Anti_Vertex",
|
|
94
|
+
"Pars_Fortunae",
|
|
95
|
+
"Pars_Spiritus",
|
|
96
|
+
"Pars_Amoris",
|
|
97
|
+
"Pars_Fidei"
|
|
98
|
+
]
|
|
99
|
+
"""
|
|
100
|
+
Full list of active points in the charts or aspects calculations.
|
|
101
|
+
The full list of points is available in the `schemas.kr_literals.AstrologicalPoint` literal.
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
DEFAULT_ACTIVE_ASPECTS: List[ActiveAspect] = [
|
|
105
|
+
{"name": "conjunction", "orb": 10},
|
|
106
|
+
{"name": "opposition", "orb": 10},
|
|
107
|
+
{"name": "trine", "orb": 8},
|
|
108
|
+
{"name": "sextile", "orb": 6},
|
|
109
|
+
{"name": "square", "orb": 5},
|
|
110
|
+
{"name": "quintile", "orb": 1},
|
|
111
|
+
# {"name": "semi-sextile", "orb": 1},
|
|
112
|
+
# {"name": "semi-square", "orb": 1},
|
|
113
|
+
# {"name": "sesquiquadrate", "orb": 1},
|
|
114
|
+
# {"name": "biquintile", "orb": 1},
|
|
115
|
+
# {"name": "quincunx", "orb": 1},
|
|
116
|
+
]
|
|
117
|
+
"""
|
|
118
|
+
Default list of active aspects in the aspects calculations.
|
|
119
|
+
The full list of aspects is available in the `schemas.kr_literals.AspectName` literal.
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
ALL_ACTIVE_ASPECTS: List[ActiveAspect] = [
|
|
123
|
+
{"name": "conjunction", "orb": 10},
|
|
124
|
+
{"name": "opposition", "orb": 10},
|
|
125
|
+
{"name": "trine", "orb": 8},
|
|
126
|
+
{"name": "sextile", "orb": 6},
|
|
127
|
+
{"name": "square", "orb": 5},
|
|
128
|
+
{"name": "quintile", "orb": 1},
|
|
129
|
+
{"name": "semi-sextile", "orb": 1},
|
|
130
|
+
{"name": "semi-square", "orb": 1},
|
|
131
|
+
{"name": "sesquiquadrate", "orb": 1},
|
|
132
|
+
{"name": "biquintile", "orb": 1},
|
|
133
|
+
{"name": "quincunx", "orb": 1},
|
|
134
|
+
]
|
|
135
|
+
"""
|
|
136
|
+
Full list of active aspects in the charts or aspects calculations.
|
|
137
|
+
The full list of aspects is available in the `schemas.kr_literals.AspectName` literal.
|
|
138
|
+
"""
|
|
139
|
+
|
|
140
|
+
DISCEPOLO_SCORE_ACTIVE_ASPECTS: List[ActiveAspect] = [
|
|
141
|
+
{"name": "conjunction", "orb": 8},
|
|
142
|
+
{"name": "semi-sextile", "orb": 2},
|
|
143
|
+
{"name": "semi-square", "orb": 2},
|
|
144
|
+
{"name": "sextile", "orb": 4},
|
|
145
|
+
{"name": "square", "orb": 5},
|
|
146
|
+
{"name": "trine", "orb": 7},
|
|
147
|
+
{"name": "sesquiquadrate", "orb": 2},
|
|
148
|
+
{"name": "opposition", "orb": 8},
|
|
149
|
+
]
|
|
150
|
+
"""
|
|
151
|
+
List of active aspects with their orbs according to Ciro Discepolo's affinity scoring methodology.
|
|
152
|
+
"""
|
|
@@ -1,76 +1,51 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
1
|
"""
|
|
3
|
-
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
from json import load
|
|
8
|
-
import logging
|
|
9
|
-
from pathlib import Path
|
|
10
|
-
from typing import Dict, Union
|
|
11
|
-
from kerykeion.kr_types import KerykeionSettingsModel
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
def get_settings(new_settings_file: Union[Path, None, KerykeionSettingsModel, dict] = None) -> KerykeionSettingsModel:
|
|
15
|
-
"""
|
|
16
|
-
This function is used to get the settings dict from the settings file.
|
|
17
|
-
If no settings file is passed as argument, or the file is not found, it will fallback to:
|
|
18
|
-
- The system wide config file, located in ~/.config/kerykeion/kr.config.json
|
|
19
|
-
- The default config file, located in the package folder
|
|
20
|
-
|
|
21
|
-
Args:
|
|
22
|
-
new_settings_file (Union[Path, None], optional): The path of the settings file. Defaults to None.
|
|
23
|
-
|
|
24
|
-
Returns:
|
|
25
|
-
Dict: The settings dict
|
|
26
|
-
"""
|
|
27
|
-
|
|
28
|
-
if isinstance(new_settings_file, dict):
|
|
29
|
-
return KerykeionSettingsModel(**new_settings_file)
|
|
30
|
-
elif isinstance(new_settings_file, KerykeionSettingsModel):
|
|
31
|
-
return new_settings_file
|
|
2
|
+
Utilities for loading Kerykeion configuration settings from Python sources.
|
|
32
3
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
if not settings_file.exists():
|
|
38
|
-
raise FileNotFoundError(f"File {settings_file} does not exist")
|
|
4
|
+
The translation strings are now stored directly in :mod:`translation_strings`,
|
|
5
|
+
so the loader simply wraps those dictionaries (or any user-provided overrides).
|
|
6
|
+
"""
|
|
39
7
|
|
|
40
|
-
|
|
41
|
-
else:
|
|
42
|
-
home_folder = Path.home()
|
|
43
|
-
settings_file = home_folder / ".config" / "kerykeion" / "kr.config.json"
|
|
8
|
+
from __future__ import annotations
|
|
44
9
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
settings_file = Path(__file__).parent / "kr.config.json"
|
|
10
|
+
from copy import deepcopy
|
|
11
|
+
from typing import Any, Mapping, Optional, cast
|
|
48
12
|
|
|
49
|
-
|
|
50
|
-
with open(settings_file, "r", encoding="utf8") as f:
|
|
51
|
-
settings_dict = load(f)
|
|
13
|
+
from .translation_strings import LANGUAGE_SETTINGS
|
|
52
14
|
|
|
53
|
-
|
|
15
|
+
SettingsSource = Optional[Mapping[str, Any]]
|
|
54
16
|
|
|
55
17
|
|
|
56
|
-
def
|
|
18
|
+
def load_settings_mapping(settings_source: Optional[SettingsSource] = None) -> Mapping[str, Any]:
|
|
57
19
|
"""
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
20
|
+
Resolve the configuration mapping from the provided source.
|
|
21
|
+
|
|
61
22
|
Args:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
23
|
+
settings_source (Mapping | None): Optional overrides for the bundled
|
|
24
|
+
language settings. When provided, keys and nested dictionaries are
|
|
25
|
+
merged on top of the default values.
|
|
26
|
+
|
|
65
27
|
Returns:
|
|
66
|
-
|
|
28
|
+
Mapping[str, Any]: The resolved configuration dictionary.
|
|
67
29
|
"""
|
|
68
|
-
|
|
69
|
-
|
|
30
|
+
language_settings = deepcopy(LANGUAGE_SETTINGS)
|
|
31
|
+
|
|
32
|
+
if settings_source:
|
|
33
|
+
overrides = cast(Mapping[str, Any], settings_source)
|
|
34
|
+
if "language_settings" in overrides:
|
|
35
|
+
overrides = cast(Mapping[str, Any], overrides["language_settings"])
|
|
36
|
+
language_settings = _deep_merge(language_settings, overrides)
|
|
37
|
+
|
|
38
|
+
return {"language_settings": language_settings}
|
|
70
39
|
|
|
71
40
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
41
|
+
def _deep_merge(base: Mapping[str, Any], overrides: Mapping[str, Any]) -> dict[str, Any]:
|
|
42
|
+
merged: dict[str, Any] = {key: deepcopy(value) for key, value in base.items()}
|
|
43
|
+
for key, value in overrides.items():
|
|
44
|
+
if key in merged and isinstance(merged[key], Mapping) and isinstance(value, Mapping):
|
|
45
|
+
merged[key] = _deep_merge(cast(Mapping[str, Any], merged[key]), cast(Mapping[str, Any], value))
|
|
46
|
+
else:
|
|
47
|
+
merged[key] = deepcopy(value)
|
|
48
|
+
return merged
|
|
75
49
|
|
|
76
|
-
|
|
50
|
+
# Keep the public surface area explicit for downstream imports.
|
|
51
|
+
__all__ = ["SettingsSource", "load_settings_mapping", "LANGUAGE_SETTINGS"]
|