kerykeion 5.0.0a9__py3-none-any.whl → 5.1.8__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 +50 -9
- kerykeion/aspects/__init__.py +5 -2
- kerykeion/aspects/aspects_factory.py +568 -0
- kerykeion/aspects/aspects_utils.py +78 -11
- kerykeion/astrological_subject_factory.py +1032 -275
- kerykeion/backword.py +820 -0
- kerykeion/chart_data_factory.py +552 -0
- kerykeion/charts/chart_drawer.py +2661 -0
- kerykeion/charts/charts_utils.py +652 -399
- kerykeion/charts/draw_planets.py +603 -353
- kerykeion/charts/templates/aspect_grid_only.xml +326 -198
- kerykeion/charts/templates/chart.xml +306 -256
- kerykeion/charts/templates/wheel_only.xml +330 -200
- kerykeion/charts/themes/black-and-white.css +148 -0
- kerykeion/charts/themes/classic.css +11 -0
- kerykeion/charts/themes/dark-high-contrast.css +11 -0
- kerykeion/charts/themes/dark.css +11 -0
- kerykeion/charts/themes/light.css +11 -0
- kerykeion/charts/themes/strawberry.css +10 -0
- kerykeion/composite_subject_factory.py +232 -13
- kerykeion/ephemeris_data_factory.py +443 -0
- kerykeion/fetch_geonames.py +78 -21
- kerykeion/house_comparison/__init__.py +4 -1
- kerykeion/house_comparison/house_comparison_factory.py +52 -19
- kerykeion/house_comparison/house_comparison_utils.py +37 -9
- 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 -160
- kerykeion/kr_types/kr_models.py +14 -291
- kerykeion/kr_types/settings_models.py +15 -167
- kerykeion/planetary_return_factory.py +545 -40
- kerykeion/relationship_score_factory.py +137 -63
- kerykeion/report.py +749 -64
- 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 +88 -12
- kerykeion/settings/kerykeion_settings.py +32 -75
- 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 +289 -204
- kerykeion-5.1.8.dist-info/METADATA +1793 -0
- kerykeion-5.1.8.dist-info/RECORD +63 -0
- kerykeion/aspects/natal_aspects.py +0 -181
- kerykeion/aspects/synastry_aspects.py +0 -141
- kerykeion/aspects/transits_time_range.py +0 -41
- kerykeion/charts/draw_planets_v2.py +0 -649
- kerykeion/charts/draw_planets_v3.py +0 -679
- kerykeion/charts/kerykeion_chart_svg.py +0 -2038
- kerykeion/enums.py +0 -57
- kerykeion/ephemeris_data.py +0 -238
- kerykeion/house_comparison/house_comparison_models.py +0 -38
- kerykeion/kr_types/chart_types.py +0 -106
- kerykeion/settings/kr.config.json +0 -1304
- kerykeion/settings/legacy/__init__.py +0 -0
- kerykeion/settings/legacy/legacy_celestial_points_settings.py +0 -299
- kerykeion/settings/legacy/legacy_chart_aspects_settings.py +0 -71
- kerykeion/settings/legacy/legacy_color_settings.py +0 -42
- kerykeion/transits_time_range.py +0 -128
- kerykeion-5.0.0a9.dist-info/METADATA +0 -636
- kerykeion-5.0.0a9.dist-info/RECORD +0 -55
- kerykeion-5.0.0a9.dist-info/entry_points.txt +0 -2
- {kerykeion-5.0.0a9.dist-info → kerykeion-5.1.8.dist-info}/WHEEL +0 -0
- {kerykeion-5.0.0a9.dist-info → kerykeion-5.1.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from kerykeion.
|
|
2
|
-
from kerykeion.
|
|
1
|
+
from kerykeion.schemas.kr_literals import AstrologicalPoint
|
|
2
|
+
from kerykeion.schemas.kr_models import ActiveAspect
|
|
3
3
|
from typing import List
|
|
4
4
|
|
|
5
5
|
|
|
@@ -14,10 +14,10 @@ DEFAULT_ACTIVE_POINTS: List[AstrologicalPoint] = [
|
|
|
14
14
|
"Uranus",
|
|
15
15
|
"Neptune",
|
|
16
16
|
"Pluto",
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
17
|
+
# "Mean_North_Lunar_Node",
|
|
18
|
+
"True_North_Lunar_Node",
|
|
19
|
+
# "Mean_South_Lunar_Node",
|
|
20
|
+
"True_South_Lunar_Node",
|
|
21
21
|
"Chiron",
|
|
22
22
|
"Mean_Lilith",
|
|
23
23
|
# "True_Lilith",
|
|
@@ -38,8 +38,8 @@ DEFAULT_ACTIVE_POINTS: List[AstrologicalPoint] = [
|
|
|
38
38
|
# "Spica",
|
|
39
39
|
"Ascendant",
|
|
40
40
|
"Medium_Coeli",
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
"Descendant",
|
|
42
|
+
"Imum_Coeli",
|
|
43
43
|
# "Vertex",
|
|
44
44
|
# "Anti_Vertex",
|
|
45
45
|
# "Pars_Fortunae",
|
|
@@ -49,7 +49,56 @@ DEFAULT_ACTIVE_POINTS: List[AstrologicalPoint] = [
|
|
|
49
49
|
]
|
|
50
50
|
"""
|
|
51
51
|
Default list of active points in the charts or aspects calculations.
|
|
52
|
-
The full list of points is available in the `
|
|
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.
|
|
53
102
|
"""
|
|
54
103
|
|
|
55
104
|
DEFAULT_ACTIVE_ASPECTS: List[ActiveAspect] = [
|
|
@@ -67,10 +116,37 @@ DEFAULT_ACTIVE_ASPECTS: List[ActiveAspect] = [
|
|
|
67
116
|
]
|
|
68
117
|
"""
|
|
69
118
|
Default list of active aspects in the aspects calculations.
|
|
70
|
-
The full list of aspects is available in the `
|
|
119
|
+
The full list of aspects is available in the `schemas.kr_literals.AspectName` literal.
|
|
71
120
|
"""
|
|
72
121
|
|
|
73
|
-
|
|
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
|
+
]
|
|
74
150
|
"""
|
|
75
|
-
|
|
151
|
+
List of active aspects with their orbs according to Ciro Discepolo's affinity scoring methodology.
|
|
76
152
|
"""
|
|
@@ -1,94 +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
|
-
import functools
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
def get_settings(new_settings_file: Union[Path, None, KerykeionSettingsModel, dict] = None) -> KerykeionSettingsModel:
|
|
16
|
-
"""
|
|
17
|
-
This function is used to get the settings dict from the settings file.
|
|
18
|
-
If no settings file is passed as argument, or the file is not found, it will fallback to:
|
|
19
|
-
- The system wide config file, located in ~/.config/kerykeion/kr.config.json
|
|
20
|
-
- The default config file, located in the package folder
|
|
21
|
-
|
|
22
|
-
Args:
|
|
23
|
-
new_settings_file (Union[Path, None], optional): The path of the settings file. Defaults to None.
|
|
24
|
-
|
|
25
|
-
Returns:
|
|
26
|
-
Dict: The settings dict
|
|
27
|
-
"""
|
|
2
|
+
Utilities for loading Kerykeion configuration settings from Python sources.
|
|
28
3
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return new_settings_file
|
|
33
|
-
|
|
34
|
-
# Config path we passed as argument
|
|
35
|
-
if new_settings_file is not None:
|
|
36
|
-
settings_file = new_settings_file
|
|
37
|
-
|
|
38
|
-
if not settings_file.exists():
|
|
39
|
-
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
|
+
"""
|
|
40
7
|
|
|
41
|
-
|
|
42
|
-
else:
|
|
43
|
-
home_folder = Path.home()
|
|
44
|
-
settings_file = home_folder / ".config" / "kerykeion" / "kr.config.json"
|
|
8
|
+
from __future__ import annotations
|
|
45
9
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
settings_file = Path(__file__).parent / "kr.config.json"
|
|
10
|
+
from copy import deepcopy
|
|
11
|
+
from typing import Any, Mapping, Optional, cast
|
|
49
12
|
|
|
50
|
-
|
|
51
|
-
settings_dict = load_settings_file(settings_file)
|
|
13
|
+
from .translation_strings import LANGUAGE_SETTINGS
|
|
52
14
|
|
|
53
|
-
|
|
15
|
+
SettingsSource = Optional[Mapping[str, Any]]
|
|
54
16
|
|
|
55
17
|
|
|
56
|
-
|
|
57
|
-
def merge_settings(settings: KerykeionSettingsModel, new_settings: Dict) -> KerykeionSettingsModel:
|
|
18
|
+
def load_settings_mapping(settings_source: Optional[SettingsSource] = None) -> Mapping[str, Any]:
|
|
58
19
|
"""
|
|
59
|
-
|
|
60
|
-
it's useful to add new settings to the config file without breaking the old ones.
|
|
20
|
+
Resolve the configuration mapping from the provided source.
|
|
61
21
|
|
|
62
22
|
Args:
|
|
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.
|
|
65
26
|
|
|
66
27
|
Returns:
|
|
67
|
-
|
|
68
|
-
"""
|
|
69
|
-
new_settings_dict = settings.model_dump() | new_settings
|
|
70
|
-
return KerykeionSettingsModel(**new_settings_dict)
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
@functools.lru_cache
|
|
74
|
-
def load_settings_file(settings_file_path: str) -> dict:
|
|
28
|
+
Mapping[str, Any]: The resolved configuration dictionary.
|
|
75
29
|
"""
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Args:
|
|
79
|
-
settings_file (Path): The path of the settings file
|
|
30
|
+
language_settings = deepcopy(LANGUAGE_SETTINGS)
|
|
80
31
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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)
|
|
86
37
|
|
|
87
|
-
return
|
|
38
|
+
return {"language_settings": language_settings}
|
|
88
39
|
|
|
89
40
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
|
93
49
|
|
|
94
|
-
|
|
50
|
+
# Keep the public surface area explicit for downstream imports.
|
|
51
|
+
__all__ = ["SettingsSource", "load_settings_mapping", "LANGUAGE_SETTINGS"]
|