kerykeion 4.2.1__py3-none-any.whl → 4.2.2__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/aspects/__init__.py +1 -1
- kerykeion/aspects/aspects_utils.py +1 -20
- kerykeion/aspects/natal_aspects.py +27 -24
- kerykeion/aspects/synastry_aspects.py +29 -23
- kerykeion/utilities.py +17 -2
- {kerykeion-4.2.1.dist-info → kerykeion-4.2.2.dist-info}/METADATA +1 -1
- {kerykeion-4.2.1.dist-info → kerykeion-4.2.2.dist-info}/RECORD +10 -10
- {kerykeion-4.2.1.dist-info → kerykeion-4.2.2.dist-info}/LICENSE +0 -0
- {kerykeion-4.2.1.dist-info → kerykeion-4.2.2.dist-info}/WHEEL +0 -0
- {kerykeion-4.2.1.dist-info → kerykeion-4.2.2.dist-info}/entry_points.txt +0 -0
kerykeion/aspects/__init__.py
CHANGED
|
@@ -163,23 +163,4 @@ def planet_id_decoder(planets_settings: dict, name: str):
|
|
|
163
163
|
for planet in planets_settings:
|
|
164
164
|
if planet["name"] == str_name:
|
|
165
165
|
result = planet["id"]
|
|
166
|
-
return result
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
def filter_by_settings(planets_settings: dict, init_point_list: list):
|
|
170
|
-
"""
|
|
171
|
-
Creates a list of all the desired
|
|
172
|
-
points filtering by the settings.
|
|
173
|
-
"""
|
|
174
|
-
|
|
175
|
-
set_points_name = []
|
|
176
|
-
for p in planets_settings:
|
|
177
|
-
if p["is_active"]:
|
|
178
|
-
set_points_name.append(p["name"])
|
|
179
|
-
|
|
180
|
-
point_list = []
|
|
181
|
-
for l in init_point_list:
|
|
182
|
-
if l["name"] in set_points_name:
|
|
183
|
-
point_list.append(l)
|
|
184
|
-
|
|
185
|
-
return point_list
|
|
166
|
+
return result
|
|
@@ -9,11 +9,18 @@ from logging import getLogger, basicConfig
|
|
|
9
9
|
from typing import Union
|
|
10
10
|
from kerykeion.settings.kerykeion_settings import get_settings
|
|
11
11
|
from dataclasses import dataclass
|
|
12
|
-
from kerykeion.aspects.aspects_utils import
|
|
12
|
+
from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points
|
|
13
|
+
from kerykeion.utilities import get_active_points_list
|
|
13
14
|
|
|
14
15
|
logger = getLogger(__name__)
|
|
15
16
|
basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level="INFO")
|
|
16
17
|
|
|
18
|
+
AXES_LIST = [
|
|
19
|
+
"First_House",
|
|
20
|
+
"Tenth_House",
|
|
21
|
+
"Seventh_House",
|
|
22
|
+
"Fourth_House",
|
|
23
|
+
]
|
|
17
24
|
|
|
18
25
|
@dataclass
|
|
19
26
|
class NatalAspects:
|
|
@@ -27,13 +34,11 @@ class NatalAspects:
|
|
|
27
34
|
_relevant_aspects: Union[list, None] = None
|
|
28
35
|
|
|
29
36
|
def __post_init__(self):
|
|
30
|
-
settings = get_settings(self.new_settings_file)
|
|
37
|
+
self.settings = get_settings(self.new_settings_file)
|
|
31
38
|
|
|
32
|
-
self.
|
|
33
|
-
|
|
34
|
-
self.
|
|
35
|
-
self.aspects_settings = settings["aspects"]
|
|
36
|
-
self.axes_orbit_settings = settings["general_settings"]["axes_orbit"]
|
|
39
|
+
self.celestial_points = self.settings["celestial_points"]
|
|
40
|
+
self.aspects_settings = self.settings["aspects"]
|
|
41
|
+
self.axes_orbit_settings = self.settings["general_settings"]["axes_orbit"]
|
|
37
42
|
|
|
38
43
|
@property
|
|
39
44
|
def all_aspects(self):
|
|
@@ -46,33 +51,36 @@ class NatalAspects:
|
|
|
46
51
|
if self._all_aspects is not None:
|
|
47
52
|
return self._all_aspects
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
active_points_list = get_active_points_list(self.user, self.settings)
|
|
50
55
|
|
|
51
56
|
self.all_aspects_list = []
|
|
52
57
|
|
|
53
|
-
for first in range(len(
|
|
58
|
+
for first in range(len(active_points_list)):
|
|
54
59
|
# Generates the aspects list without repetitions
|
|
55
|
-
for second in range(first + 1, len(
|
|
60
|
+
for second in range(first + 1, len(active_points_list)):
|
|
56
61
|
verdict, name, orbit, aspect_degrees, color, aid, diff = get_aspect_from_two_points(
|
|
57
|
-
self.aspects_settings,
|
|
62
|
+
self.aspects_settings, active_points_list[first]["abs_pos"], active_points_list[second]["abs_pos"]
|
|
58
63
|
)
|
|
59
64
|
|
|
60
65
|
if verdict == True:
|
|
61
66
|
d_asp = {
|
|
62
|
-
"p1_name":
|
|
63
|
-
"p1_abs_pos":
|
|
64
|
-
"p2_name":
|
|
65
|
-
"p2_abs_pos":
|
|
67
|
+
"p1_name": active_points_list[first]["name"],
|
|
68
|
+
"p1_abs_pos": active_points_list[first]["abs_pos"],
|
|
69
|
+
"p2_name": active_points_list[second]["name"],
|
|
70
|
+
"p2_abs_pos": active_points_list[second]["abs_pos"],
|
|
66
71
|
"aspect": name,
|
|
67
72
|
"orbit": orbit,
|
|
68
73
|
"aspect_degrees": aspect_degrees,
|
|
69
74
|
"color": color,
|
|
70
75
|
"aid": aid,
|
|
71
76
|
"diff": diff,
|
|
72
|
-
"p1": planet_id_decoder(
|
|
77
|
+
"p1": planet_id_decoder(
|
|
78
|
+
self.celestial_points,
|
|
79
|
+
active_points_list[first]["name"]
|
|
80
|
+
),
|
|
73
81
|
"p2": planet_id_decoder(
|
|
74
|
-
self.
|
|
75
|
-
|
|
82
|
+
self.celestial_points,
|
|
83
|
+
active_points_list[second]["name"],
|
|
76
84
|
),
|
|
77
85
|
}
|
|
78
86
|
|
|
@@ -101,12 +109,7 @@ class NatalAspects:
|
|
|
101
109
|
if self.aspects_settings[a["aid"]]["is_active"] == True:
|
|
102
110
|
aspects_filtered.append(a)
|
|
103
111
|
|
|
104
|
-
axes_list =
|
|
105
|
-
"First_House",
|
|
106
|
-
"Tenth_House",
|
|
107
|
-
"Seventh_House",
|
|
108
|
-
"Fourth_House",
|
|
109
|
-
]
|
|
112
|
+
axes_list = AXES_LIST
|
|
110
113
|
counter = 0
|
|
111
114
|
|
|
112
115
|
aspects_list_subtract = []
|
|
@@ -9,7 +9,8 @@ from typing import Union
|
|
|
9
9
|
|
|
10
10
|
from kerykeion.aspects.natal_aspects import NatalAspects
|
|
11
11
|
from kerykeion.settings.kerykeion_settings import get_settings
|
|
12
|
-
from kerykeion.aspects.aspects_utils import
|
|
12
|
+
from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points
|
|
13
|
+
from kerykeion.utilities import get_active_points_list
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
class SynastryAspects(NatalAspects):
|
|
@@ -23,22 +24,24 @@ class SynastryAspects(NatalAspects):
|
|
|
23
24
|
kr_object_two: AstrologicalSubject,
|
|
24
25
|
new_settings_file: Union[Path, None] = None,
|
|
25
26
|
):
|
|
27
|
+
# Subjects
|
|
26
28
|
self.first_user = kr_object_one
|
|
27
29
|
self.second_user = kr_object_two
|
|
28
|
-
|
|
30
|
+
|
|
31
|
+
# Settings
|
|
29
32
|
self.new_settings_file = new_settings_file
|
|
33
|
+
self.settings = get_settings(self.new_settings_file)
|
|
34
|
+
|
|
35
|
+
self.celestial_points = self.settings["celestial_points"]
|
|
36
|
+
self.aspects_settings = self.settings["aspects"]
|
|
37
|
+
self.axes_orbit_settings = self.settings["general_settings"]["axes_orbit"]
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
self.second_init_point_list = self.second_user.planets_list + self.second_user.houses_list
|
|
33
|
-
|
|
39
|
+
# Private variables of the aspects
|
|
34
40
|
self._all_aspects: Union[list, None] = None
|
|
35
41
|
self._relevant_aspects: Union[list, None] = None
|
|
36
42
|
|
|
37
|
-
settings = get_settings(self.new_settings_file)
|
|
38
43
|
|
|
39
|
-
|
|
40
|
-
self.aspects_settings = settings["aspects"]
|
|
41
|
-
self.axes_orbit_settings = settings["general_settings"]["axes_orbit"]
|
|
44
|
+
|
|
42
45
|
|
|
43
46
|
@property
|
|
44
47
|
def all_aspects(self):
|
|
@@ -50,36 +53,39 @@ class SynastryAspects(NatalAspects):
|
|
|
50
53
|
|
|
51
54
|
if self._all_aspects is not None:
|
|
52
55
|
return self._all_aspects
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
|
|
57
|
+
# Celestial Points Lists
|
|
58
|
+
first_active_points_list = get_active_points_list(self.first_user, self.settings)
|
|
59
|
+
second_active_points_list = get_active_points_list(self.second_user, self.settings)
|
|
57
60
|
|
|
58
61
|
self.all_aspects_list = []
|
|
59
62
|
|
|
60
|
-
for first in range(len(
|
|
63
|
+
for first in range(len(first_active_points_list)):
|
|
61
64
|
# Generates the aspects list whitout repetitions
|
|
62
|
-
for second in range(len(
|
|
65
|
+
for second in range(len(second_active_points_list)):
|
|
63
66
|
verdict, name, orbit, aspect_degrees, color, aid, diff = get_aspect_from_two_points(
|
|
64
|
-
self.aspects_settings,
|
|
67
|
+
self.aspects_settings, first_active_points_list[first]["abs_pos"], second_active_points_list[second]["abs_pos"]
|
|
65
68
|
)
|
|
66
69
|
|
|
67
70
|
if verdict == True:
|
|
68
71
|
d_asp = {
|
|
69
|
-
"p1_name":
|
|
70
|
-
"p1_abs_pos":
|
|
71
|
-
"p2_name":
|
|
72
|
-
"p2_abs_pos":
|
|
72
|
+
"p1_name": first_active_points_list[first]["name"],
|
|
73
|
+
"p1_abs_pos": first_active_points_list[first]["abs_pos"],
|
|
74
|
+
"p2_name": second_active_points_list[second]["name"],
|
|
75
|
+
"p2_abs_pos": second_active_points_list[second]["abs_pos"],
|
|
73
76
|
"aspect": name,
|
|
74
77
|
"orbit": orbit,
|
|
75
78
|
"aspect_degrees": aspect_degrees,
|
|
76
79
|
"color": color,
|
|
77
80
|
"aid": aid,
|
|
78
81
|
"diff": diff,
|
|
79
|
-
"p1": planet_id_decoder(
|
|
82
|
+
"p1": planet_id_decoder(
|
|
83
|
+
self.settings.celestial_points,
|
|
84
|
+
first_active_points_list[first]["name"]
|
|
85
|
+
),
|
|
80
86
|
"p2": planet_id_decoder(
|
|
81
|
-
self.
|
|
82
|
-
|
|
87
|
+
self.settings.celestial_points,
|
|
88
|
+
second_active_points_list[second]["name"],
|
|
83
89
|
),
|
|
84
90
|
}
|
|
85
91
|
|
kerykeion/utilities.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
from kerykeion.kr_types import KerykeionPointModel, KerykeionException
|
|
2
|
-
from pathlib import Path
|
|
1
|
+
from kerykeion.kr_types import KerykeionPointModel, KerykeionException, KerykeionSettingsModel, AstrologicalSubjectModel
|
|
3
2
|
from typing import Union, Literal
|
|
4
3
|
from logging import getLogger
|
|
5
4
|
|
|
@@ -206,3 +205,19 @@ def calculate_position(
|
|
|
206
205
|
|
|
207
206
|
return KerykeionPointModel(**dictionary)
|
|
208
207
|
|
|
208
|
+
def get_active_points_list(subject: AstrologicalSubjectModel, settings: Union[KerykeionSettingsModel, dict]) -> list:
|
|
209
|
+
"""
|
|
210
|
+
Given an astrological subject and the settings, return a list of the active points.
|
|
211
|
+
Args:
|
|
212
|
+
subject (AstrologicalSubject): The astrological subject to get the active points from.
|
|
213
|
+
settings (Union[KerykeionSettingsModel, dict]): Settings model o dictionary.
|
|
214
|
+
|
|
215
|
+
Returns:
|
|
216
|
+
list: List of the active points.
|
|
217
|
+
"""
|
|
218
|
+
point_list = []
|
|
219
|
+
for planet in settings["celestial_points"]:
|
|
220
|
+
if planet["is_active"] == True:
|
|
221
|
+
point_list.append(subject[planet["name"].lower()])
|
|
222
|
+
|
|
223
|
+
return point_list
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
2
2
|
kerykeion/__init__.py,sha256=UpftP5JxYSfeRAAmXbRas1XGw4V6dNA-FllcFbKlCbo,3874
|
|
3
|
-
kerykeion/aspects/__init__.py,sha256=
|
|
4
|
-
kerykeion/aspects/aspects_utils.py,sha256=
|
|
5
|
-
kerykeion/aspects/natal_aspects.py,sha256=
|
|
6
|
-
kerykeion/aspects/synastry_aspects.py,sha256=
|
|
3
|
+
kerykeion/aspects/__init__.py,sha256=8uOTYtcMwyDBbDjIoz8wvWtdcgdU-86yQeM3EVLwnIA,293
|
|
4
|
+
kerykeion/aspects/aspects_utils.py,sha256=0jNSXp_sQ3zPpL4uM0iFRixA9q-4m0KZdQ6BhuIyegE,5077
|
|
5
|
+
kerykeion/aspects/natal_aspects.py,sha256=OcdmvrwuvP26eruGHASKHxj2n8L7VwxvMPnrr55Zffg,5020
|
|
6
|
+
kerykeion/aspects/synastry_aspects.py,sha256=MU_UYrFZsSya6TapISi9y-9xxDFfZ3yTj1xsfJs2MJI,3909
|
|
7
7
|
kerykeion/astrological_subject.py,sha256=whHWS0MUQorKlAVNbvfiaxFrzMeVAASMLESDFfm454I,23853
|
|
8
8
|
kerykeion/charts/__init__.py,sha256=3WzR2n9dr6MDzjTbEQOYpXSFlhfMfga5YWNsPawdbRw,127
|
|
9
9
|
kerykeion/charts/charts_utils.py,sha256=qQMXu5XZCCjvyqL62fzh4JnKLzd_G6u9pcMk6f1DpIc,3197
|
|
@@ -23,9 +23,9 @@ kerykeion/settings/kerykeion_settings.py,sha256=_EO6izQRXaKvTBx0B_YhuhQcCHV7jpvb
|
|
|
23
23
|
kerykeion/settings/kr.config.json,sha256=1Yhv9RGHom5U9e-JZZRWVfT2Ubllz2WrckdwadDWfyg,12282
|
|
24
24
|
kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
|
|
25
25
|
kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
|
|
26
|
-
kerykeion/utilities.py,sha256=
|
|
27
|
-
kerykeion-4.2.
|
|
28
|
-
kerykeion-4.2.
|
|
29
|
-
kerykeion-4.2.
|
|
30
|
-
kerykeion-4.2.
|
|
31
|
-
kerykeion-4.2.
|
|
26
|
+
kerykeion/utilities.py,sha256=JDTBKKoxPxC1NmDOew_5GLZAoEm46TX7YQyJw728VkQ,6392
|
|
27
|
+
kerykeion-4.2.2.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
28
|
+
kerykeion-4.2.2.dist-info/METADATA,sha256=NbyCS9jwyPzPa3UF3tUctPsHU8Kq-cJP1GyteKYMo2M,9409
|
|
29
|
+
kerykeion-4.2.2.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
30
|
+
kerykeion-4.2.2.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
|
|
31
|
+
kerykeion-4.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|