kerykeion 5.0.0a10__py3-none-any.whl → 5.0.0a12__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 +4 -9
- kerykeion/aspects/__init__.py +2 -4
- kerykeion/aspects/aspects_factory.py +514 -0
- kerykeion/astrological_subject_factory.py +685 -79
- kerykeion/charts/draw_planets.py +584 -343
- kerykeion/charts/kerykeion_chart_svg.py +10 -16
- kerykeion/charts/templates/wheel_only.xml +1 -1
- kerykeion/composite_subject_factory.py +228 -9
- kerykeion/ephemeris_data_factory.py +431 -0
- kerykeion/fetch_geonames.py +27 -8
- kerykeion/house_comparison/house_comparison_factory.py +48 -15
- kerykeion/house_comparison/house_comparison_models.py +51 -13
- kerykeion/house_comparison/house_comparison_utils.py +35 -5
- kerykeion/kr_types/kerykeion_exception.py +6 -0
- kerykeion/kr_types/kr_models.py +82 -12
- kerykeion/planetary_return_factory.py +532 -32
- kerykeion/relationship_score_factory.py +98 -44
- kerykeion/report.py +7 -0
- kerykeion/sweph/sefstars.txt +1602 -0
- kerykeion/transits_time_range_factory.py +293 -0
- kerykeion/utilities.py +129 -67
- {kerykeion-5.0.0a10.dist-info → kerykeion-5.0.0a12.dist-info}/METADATA +49 -22
- kerykeion-5.0.0a12.dist-info/RECORD +50 -0
- kerykeion/aspects/natal_aspects_factory.py +0 -236
- kerykeion/aspects/synastry_aspects_factory.py +0 -234
- kerykeion/charts/draw_planets_v2.py +0 -648
- kerykeion/charts/draw_planets_v3.py +0 -679
- kerykeion/enums.py +0 -57
- kerykeion/ephemeris_data.py +0 -238
- kerykeion/transits_time_range.py +0 -128
- kerykeion-5.0.0a10.dist-info/RECORD +0 -53
- {kerykeion-5.0.0a10.dist-info → kerykeion-5.0.0a12.dist-info}/WHEEL +0 -0
- {kerykeion-5.0.0a10.dist-info → kerykeion-5.0.0a12.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,10 +1,48 @@
|
|
|
1
1
|
# -*- coding: utf-8 -*-
|
|
2
2
|
"""
|
|
3
|
-
|
|
3
|
+
Relationship Score Factory Module
|
|
4
|
+
|
|
5
|
+
This module calculates relationship scores between two astrological subjects using the
|
|
6
|
+
Ciro Discepolo method. It analyzes synastry aspects to generate numerical compatibility
|
|
7
|
+
scores with descriptive categories.
|
|
8
|
+
|
|
9
|
+
Key Features:
|
|
10
|
+
- Point-based scoring system using synastry aspects
|
|
11
|
+
- Configurable major/minor aspect filtering
|
|
12
|
+
- Orbital precision weighting
|
|
13
|
+
- Categorical score descriptions
|
|
14
|
+
|
|
15
|
+
Score Categories:
|
|
16
|
+
- 0-5: Minimal relationship
|
|
17
|
+
- 5-10: Medium relationship
|
|
18
|
+
- 10-15: Important relationship
|
|
19
|
+
- 15-20: Very important relationship
|
|
20
|
+
- 20-30: Exceptional relationship
|
|
21
|
+
- 30+: Rare exceptional relationship
|
|
22
|
+
|
|
23
|
+
Classes:
|
|
24
|
+
RelationshipScoreFactory: Main factory for calculating relationship scores
|
|
25
|
+
|
|
26
|
+
Example:
|
|
27
|
+
>>> from kerykeion import AstrologicalSubjectFactory
|
|
28
|
+
>>> from kerykeion.relationship_score_factory import RelationshipScoreFactory
|
|
29
|
+
>>>
|
|
30
|
+
>>> person1 = AstrologicalSubjectFactory.from_birth_data("John", 1990, 5, 15, 12, 0, "New York", "US")
|
|
31
|
+
>>> person2 = AstrologicalSubjectFactory.from_birth_data("Jane", 1988, 8, 22, 14, 30, "London", "GB")
|
|
32
|
+
>>> factory = RelationshipScoreFactory(person1, person2)
|
|
33
|
+
>>> score = factory.get_relationship_score()
|
|
34
|
+
>>> print(f"Score: {score.score_value} ({score.score_description})")
|
|
35
|
+
|
|
36
|
+
Reference:
|
|
37
|
+
Ciro Discepolo Method: http://www.cirodiscepolo.it/Articoli/Discepoloele.htm
|
|
38
|
+
|
|
39
|
+
Author: Giacomo Battaglia
|
|
40
|
+
Copyright: (C) 2025 Kerykeion Project
|
|
41
|
+
License: AGPL-3.0
|
|
4
42
|
"""
|
|
5
43
|
|
|
6
44
|
from kerykeion import AstrologicalSubjectFactory
|
|
7
|
-
from kerykeion.aspects
|
|
45
|
+
from kerykeion.aspects import AspectsFactory
|
|
8
46
|
import logging
|
|
9
47
|
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, RelationshipScoreAspectModel, RelationshipScoreModel
|
|
10
48
|
from kerykeion.kr_types.kr_literals import RelationshipScoreDescription
|
|
@@ -22,21 +60,26 @@ VENUS_MARS_ASPECT_POINTS = 4
|
|
|
22
60
|
|
|
23
61
|
class RelationshipScoreFactory:
|
|
24
62
|
"""
|
|
25
|
-
Calculates
|
|
63
|
+
Calculates relationship scores between two subjects using the Ciro Discepolo method.
|
|
26
64
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- 5 to 10: Medium relationship
|
|
30
|
-
- 10 to 15: Important relationship
|
|
31
|
-
- 15 to 20: Very important relationship
|
|
32
|
-
- 20 to 35: Exceptional relationship
|
|
33
|
-
- 30 and above: Rare Exceptional relationship
|
|
65
|
+
The scoring system evaluates synastry aspects between planetary positions to generate
|
|
66
|
+
numerical compatibility scores with categorical descriptions.
|
|
34
67
|
|
|
35
|
-
|
|
68
|
+
Score Ranges:
|
|
69
|
+
- 0-5: Minimal relationship
|
|
70
|
+
- 5-10: Medium relationship
|
|
71
|
+
- 10-15: Important relationship
|
|
72
|
+
- 15-20: Very important relationship
|
|
73
|
+
- 20-30: Exceptional relationship
|
|
74
|
+
- 30+: Rare exceptional relationship
|
|
36
75
|
|
|
37
76
|
Args:
|
|
38
|
-
first_subject (AstrologicalSubjectModel): First subject
|
|
39
|
-
second_subject (AstrologicalSubjectModel): Second subject
|
|
77
|
+
first_subject (AstrologicalSubjectModel): First astrological subject
|
|
78
|
+
second_subject (AstrologicalSubjectModel): Second astrological subject
|
|
79
|
+
use_only_major_aspects (bool, optional): Filter to major aspects only. Defaults to True.
|
|
80
|
+
|
|
81
|
+
Reference:
|
|
82
|
+
http://www.cirodiscepolo.it/Articoli/Discepoloele.htm
|
|
40
83
|
"""
|
|
41
84
|
|
|
42
85
|
SCORE_MAPPING = [
|
|
@@ -64,11 +107,14 @@ class RelationshipScoreFactory:
|
|
|
64
107
|
self.relationship_score_description: RelationshipScoreDescription = "Minimal"
|
|
65
108
|
self.is_destiny_sign = True
|
|
66
109
|
self.relationship_score_aspects: list[RelationshipScoreAspectModel] = []
|
|
67
|
-
self._synastry_aspects =
|
|
110
|
+
self._synastry_aspects = AspectsFactory.dual_chart_aspects(self.first_subject, self.second_subject).all_aspects
|
|
68
111
|
|
|
69
112
|
def _evaluate_destiny_sign(self):
|
|
70
113
|
"""
|
|
71
|
-
|
|
114
|
+
Checks if subjects share the same sun sign quality and adds points.
|
|
115
|
+
|
|
116
|
+
Adds 5 points if both subjects have sun signs with matching quality
|
|
117
|
+
(cardinal, fixed, or mutable).
|
|
72
118
|
"""
|
|
73
119
|
if self.first_subject.sun["quality"] == self.second_subject.sun["quality"]: # type: ignore
|
|
74
120
|
self.is_destiny_sign = True
|
|
@@ -77,11 +123,11 @@ class RelationshipScoreFactory:
|
|
|
77
123
|
|
|
78
124
|
def _evaluate_aspect(self, aspect, points):
|
|
79
125
|
"""
|
|
80
|
-
|
|
126
|
+
Processes an aspect and adds points to the total score.
|
|
81
127
|
|
|
82
128
|
Args:
|
|
83
|
-
aspect (dict): Aspect
|
|
84
|
-
points (int): Points to add
|
|
129
|
+
aspect (dict): Aspect data containing planetary positions and geometry
|
|
130
|
+
points (int): Points to add to the total score
|
|
85
131
|
"""
|
|
86
132
|
if self.use_only_major_aspects and aspect["aspect"] not in self.MAJOR_ASPECTS:
|
|
87
133
|
return
|
|
@@ -99,12 +145,12 @@ class RelationshipScoreFactory:
|
|
|
99
145
|
|
|
100
146
|
def _evaluate_sun_sun_main_aspect(self, aspect):
|
|
101
147
|
"""
|
|
102
|
-
Evaluates Sun-Sun
|
|
103
|
-
|
|
104
|
-
|
|
148
|
+
Evaluates Sun-Sun conjunction, opposition, or square aspects.
|
|
149
|
+
|
|
150
|
+
Adds 8 points for standard orbs, 11 points for tight orbs (≤2°).
|
|
105
151
|
|
|
106
152
|
Args:
|
|
107
|
-
aspect (dict): Aspect
|
|
153
|
+
aspect (dict): Aspect data
|
|
108
154
|
"""
|
|
109
155
|
if aspect["p1_name"] == "Sun" and aspect["p2_name"] == "Sun" and aspect["aspect"] in {"conjunction", "opposition", "square"}:
|
|
110
156
|
points = MAJOR_ASPECT_POINTS_HIGH_PRECISION if aspect["orbit"] <= HIGH_PRECISION_ORBIT_THRESHOLD else MAJOR_ASPECT_POINTS_STANDARD
|
|
@@ -112,12 +158,12 @@ class RelationshipScoreFactory:
|
|
|
112
158
|
|
|
113
159
|
def _evaluate_sun_moon_conjunction(self, aspect):
|
|
114
160
|
"""
|
|
115
|
-
Evaluates Sun-Moon
|
|
116
|
-
|
|
117
|
-
|
|
161
|
+
Evaluates Sun-Moon conjunction aspects.
|
|
162
|
+
|
|
163
|
+
Adds 8 points for standard orbs, 11 points for tight orbs (≤2°).
|
|
118
164
|
|
|
119
165
|
Args:
|
|
120
|
-
aspect (dict): Aspect
|
|
166
|
+
aspect (dict): Aspect data
|
|
121
167
|
"""
|
|
122
168
|
if {aspect["p1_name"], aspect["p2_name"]} == {"Moon", "Sun"} and aspect["aspect"] == "conjunction":
|
|
123
169
|
points = MAJOR_ASPECT_POINTS_HIGH_PRECISION if aspect["orbit"] <= HIGH_PRECISION_ORBIT_THRESHOLD else MAJOR_ASPECT_POINTS_STANDARD
|
|
@@ -125,11 +171,12 @@ class RelationshipScoreFactory:
|
|
|
125
171
|
|
|
126
172
|
def _evaluate_sun_sun_other_aspects(self, aspect):
|
|
127
173
|
"""
|
|
128
|
-
Evaluates Sun-Sun aspects
|
|
129
|
-
|
|
174
|
+
Evaluates Sun-Sun aspects other than conjunction, opposition, or square.
|
|
175
|
+
|
|
176
|
+
Adds 4 points for any qualifying aspect.
|
|
130
177
|
|
|
131
178
|
Args:
|
|
132
|
-
aspect (dict): Aspect
|
|
179
|
+
aspect (dict): Aspect data
|
|
133
180
|
"""
|
|
134
181
|
if aspect["p1_name"] == "Sun" and aspect["p2_name"] == "Sun" and aspect["aspect"] not in {"conjunction", "opposition", "square"}:
|
|
135
182
|
points = MINOR_ASPECT_POINTS
|
|
@@ -137,11 +184,12 @@ class RelationshipScoreFactory:
|
|
|
137
184
|
|
|
138
185
|
def _evaluate_sun_moon_other_aspects(self, aspect):
|
|
139
186
|
"""
|
|
140
|
-
Evaluates Sun-Moon aspects
|
|
141
|
-
|
|
187
|
+
Evaluates Sun-Moon aspects other than conjunctions.
|
|
188
|
+
|
|
189
|
+
Adds 4 points for any qualifying aspect.
|
|
142
190
|
|
|
143
191
|
Args:
|
|
144
|
-
aspect (dict): Aspect
|
|
192
|
+
aspect (dict): Aspect data
|
|
145
193
|
"""
|
|
146
194
|
if {aspect["p1_name"], aspect["p2_name"]} == {"Moon", "Sun"} and aspect["aspect"] != "conjunction":
|
|
147
195
|
points = MINOR_ASPECT_POINTS
|
|
@@ -149,11 +197,12 @@ class RelationshipScoreFactory:
|
|
|
149
197
|
|
|
150
198
|
def _evaluate_sun_ascendant_aspect(self, aspect):
|
|
151
199
|
"""
|
|
152
|
-
Evaluates Sun-Ascendant aspects
|
|
153
|
-
|
|
200
|
+
Evaluates Sun-Ascendant aspects.
|
|
201
|
+
|
|
202
|
+
Adds 4 points for any aspect between Sun and Ascendant.
|
|
154
203
|
|
|
155
204
|
Args:
|
|
156
|
-
aspect (dict): Aspect
|
|
205
|
+
aspect (dict): Aspect data
|
|
157
206
|
"""
|
|
158
207
|
if {aspect["p1_name"], aspect["p2_name"]} == {"Sun", "Ascendant"}:
|
|
159
208
|
points = SUN_ASCENDANT_ASPECT_POINTS
|
|
@@ -161,11 +210,12 @@ class RelationshipScoreFactory:
|
|
|
161
210
|
|
|
162
211
|
def _evaluate_moon_ascendant_aspect(self, aspect):
|
|
163
212
|
"""
|
|
164
|
-
Evaluates Moon-Ascendant aspects
|
|
165
|
-
|
|
213
|
+
Evaluates Moon-Ascendant aspects.
|
|
214
|
+
|
|
215
|
+
Adds 4 points for any aspect between Moon and Ascendant.
|
|
166
216
|
|
|
167
217
|
Args:
|
|
168
|
-
aspect (dict): Aspect
|
|
218
|
+
aspect (dict): Aspect data
|
|
169
219
|
"""
|
|
170
220
|
if {aspect["p1_name"], aspect["p2_name"]} == {"Moon", "Ascendant"}:
|
|
171
221
|
points = MOON_ASCENDANT_ASPECT_POINTS
|
|
@@ -173,11 +223,12 @@ class RelationshipScoreFactory:
|
|
|
173
223
|
|
|
174
224
|
def _evaluate_venus_mars_aspect(self, aspect):
|
|
175
225
|
"""
|
|
176
|
-
Evaluates Venus-Mars aspects
|
|
177
|
-
|
|
226
|
+
Evaluates Venus-Mars aspects.
|
|
227
|
+
|
|
228
|
+
Adds 4 points for any aspect between Venus and Mars.
|
|
178
229
|
|
|
179
230
|
Args:
|
|
180
|
-
aspect (dict): Aspect
|
|
231
|
+
aspect (dict): Aspect data
|
|
181
232
|
"""
|
|
182
233
|
if {aspect["p1_name"], aspect["p2_name"]} == {"Venus", "Mars"}:
|
|
183
234
|
points = VENUS_MARS_ASPECT_POINTS
|
|
@@ -185,7 +236,9 @@ class RelationshipScoreFactory:
|
|
|
185
236
|
|
|
186
237
|
def _evaluate_relationship_score_description(self):
|
|
187
238
|
"""
|
|
188
|
-
|
|
239
|
+
Determines the categorical description based on the numerical score.
|
|
240
|
+
|
|
241
|
+
Maps the total score to predefined description ranges.
|
|
189
242
|
"""
|
|
190
243
|
for description, threshold in self.SCORE_MAPPING:
|
|
191
244
|
if self.score_value < threshold:
|
|
@@ -194,10 +247,11 @@ class RelationshipScoreFactory:
|
|
|
194
247
|
|
|
195
248
|
def get_relationship_score(self):
|
|
196
249
|
"""
|
|
197
|
-
Calculates the relationship score
|
|
250
|
+
Calculates the complete relationship score using all evaluation methods.
|
|
198
251
|
|
|
199
252
|
Returns:
|
|
200
|
-
RelationshipScoreModel:
|
|
253
|
+
RelationshipScoreModel: Score object containing numerical value, description,
|
|
254
|
+
destiny sign status, contributing aspects, and subject data.
|
|
201
255
|
"""
|
|
202
256
|
self._evaluate_destiny_sign()
|
|
203
257
|
|
kerykeion/report.py
CHANGED
|
@@ -14,6 +14,12 @@ class Report:
|
|
|
14
14
|
houses_table: str
|
|
15
15
|
|
|
16
16
|
def __init__(self, instance: AstrologicalSubjectModel):
|
|
17
|
+
"""
|
|
18
|
+
Initialize a new Report instance.
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
instance: The astrological subject model to create a report for.
|
|
22
|
+
"""
|
|
17
23
|
self.instance = instance
|
|
18
24
|
|
|
19
25
|
self.get_report_title()
|
|
@@ -22,6 +28,7 @@ class Report:
|
|
|
22
28
|
self.get_houses_table()
|
|
23
29
|
|
|
24
30
|
def get_report_title(self) -> None:
|
|
31
|
+
"""Generate the report title based on the subject's name."""
|
|
25
32
|
self.report_title = f"\n+- Kerykeion report for {self.instance.name} -+"
|
|
26
33
|
|
|
27
34
|
def get_data_table(self) -> None:
|