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.

Files changed (76) hide show
  1. kerykeion/__init__.py +56 -11
  2. kerykeion/aspects/__init__.py +7 -4
  3. kerykeion/aspects/aspects_factory.py +568 -0
  4. kerykeion/aspects/aspects_utils.py +86 -13
  5. kerykeion/astrological_subject_factory.py +1901 -0
  6. kerykeion/backword.py +820 -0
  7. kerykeion/chart_data_factory.py +552 -0
  8. kerykeion/charts/__init__.py +2 -2
  9. kerykeion/charts/chart_drawer.py +2794 -0
  10. kerykeion/charts/charts_utils.py +1066 -309
  11. kerykeion/charts/draw_planets.py +602 -351
  12. kerykeion/charts/templates/aspect_grid_only.xml +337 -193
  13. kerykeion/charts/templates/chart.xml +441 -240
  14. kerykeion/charts/templates/wheel_only.xml +365 -211
  15. kerykeion/charts/themes/black-and-white.css +148 -0
  16. kerykeion/charts/themes/classic.css +107 -76
  17. kerykeion/charts/themes/dark-high-contrast.css +145 -107
  18. kerykeion/charts/themes/dark.css +146 -107
  19. kerykeion/charts/themes/light.css +146 -103
  20. kerykeion/charts/themes/strawberry.css +158 -0
  21. kerykeion/composite_subject_factory.py +408 -0
  22. kerykeion/ephemeris_data_factory.py +443 -0
  23. kerykeion/fetch_geonames.py +81 -21
  24. kerykeion/house_comparison/__init__.py +6 -0
  25. kerykeion/house_comparison/house_comparison_factory.py +103 -0
  26. kerykeion/house_comparison/house_comparison_utils.py +126 -0
  27. kerykeion/kr_types/__init__.py +66 -6
  28. kerykeion/kr_types/chart_template_model.py +20 -0
  29. kerykeion/kr_types/kerykeion_exception.py +15 -9
  30. kerykeion/kr_types/kr_literals.py +14 -106
  31. kerykeion/kr_types/kr_models.py +14 -179
  32. kerykeion/kr_types/settings_models.py +15 -152
  33. kerykeion/planetary_return_factory.py +805 -0
  34. kerykeion/relationship_score_factory.py +301 -0
  35. kerykeion/report.py +750 -65
  36. kerykeion/schemas/__init__.py +106 -0
  37. kerykeion/schemas/chart_template_model.py +367 -0
  38. kerykeion/schemas/kerykeion_exception.py +20 -0
  39. kerykeion/schemas/kr_literals.py +181 -0
  40. kerykeion/schemas/kr_models.py +603 -0
  41. kerykeion/schemas/settings_models.py +188 -0
  42. kerykeion/settings/__init__.py +20 -1
  43. kerykeion/settings/chart_defaults.py +444 -0
  44. kerykeion/settings/config_constants.py +152 -0
  45. kerykeion/settings/kerykeion_settings.py +36 -61
  46. kerykeion/settings/translation_strings.py +1499 -0
  47. kerykeion/settings/translations.py +74 -0
  48. kerykeion/sweph/ast136/s136108s.se1 +0 -0
  49. kerykeion/sweph/ast136/s136199s.se1 +0 -0
  50. kerykeion/sweph/ast136/s136472s.se1 +0 -0
  51. kerykeion/sweph/ast28/se28978s.se1 +0 -0
  52. kerykeion/sweph/ast50/se50000s.se1 +0 -0
  53. kerykeion/sweph/ast90/se90377s.se1 +0 -0
  54. kerykeion/sweph/ast90/se90482s.se1 +0 -0
  55. kerykeion/sweph/sefstars.txt +1602 -0
  56. kerykeion/transits_time_range_factory.py +302 -0
  57. kerykeion/utilities.py +626 -125
  58. kerykeion-5.1.9.dist-info/METADATA +1793 -0
  59. kerykeion-5.1.9.dist-info/RECORD +63 -0
  60. {kerykeion-4.18.3.dist-info → kerykeion-5.1.9.dist-info}/WHEEL +1 -1
  61. kerykeion/aspects/natal_aspects.py +0 -143
  62. kerykeion/aspects/synastry_aspects.py +0 -113
  63. kerykeion/astrological_subject.py +0 -818
  64. kerykeion/charts/kerykeion_chart_svg.py +0 -894
  65. kerykeion/enums.py +0 -51
  66. kerykeion/ephemeris_data.py +0 -178
  67. kerykeion/kr_types/chart_types.py +0 -88
  68. kerykeion/relationship_score/__init__.py +0 -2
  69. kerykeion/relationship_score/relationship_score.py +0 -175
  70. kerykeion/relationship_score/relationship_score_factory.py +0 -275
  71. kerykeion/settings/kr.config.json +0 -721
  72. kerykeion-4.18.3.dist-info/LICENSE +0 -661
  73. kerykeion-4.18.3.dist-info/METADATA +0 -396
  74. kerykeion-4.18.3.dist-info/RECORD +0 -42
  75. kerykeion-4.18.3.dist-info/entry_points.txt +0 -3
  76. /LICENSE → /kerykeion-5.1.9.dist-info/licenses/LICENSE +0 -0
@@ -1,275 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- """
3
- This is part of Kerykeion (C) 2024 Giacomo Battaglia
4
- """
5
-
6
- from kerykeion import AstrologicalSubject
7
- from kerykeion.aspects.synastry_aspects import SynastryAspects
8
- import logging
9
- from pathlib import Path
10
- from typing import Union
11
- from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, RelationshipScoreAspectModel, RelationshipScoreModel
12
- from kerykeion.kr_types.kr_literals import RelationshipScoreDescription
13
-
14
-
15
- class RelationshipScoreFactory:
16
- """
17
- Calculates the relevance of the relationship between two subjects using the Ciro Discepolo method.
18
-
19
- Results:
20
- - 0 to 5: Minimal relationship
21
- - 5 to 10: Medium relationship
22
- - 10 to 15: Important relationship
23
- - 15 to 20: Very important relationship
24
- - 20 to 35: Exceptional relationship
25
- - 30 and above: Rare Exceptional relationship
26
-
27
- Documentation: http://www.cirodiscepolo.it/Articoli/Discepoloele.htm
28
-
29
- Args:
30
- first_subject (Union[AstrologicalSubject, AstrologicalSubjectModel]): First subject instance
31
- second_subject (Union[AstrologicalSubject, AstrologicalSubjectModel]): Second subject instance
32
- """
33
-
34
- SCORE_MAPPING = [
35
- ("Minimal", 5),
36
- ("Medium", 10),
37
- ("Important", 15),
38
- ("Very Important", 20),
39
- ("Exceptional", 30),
40
- ("Rare Exceptional", float("inf")),
41
- ]
42
-
43
- def __init__(
44
- self,
45
- first_subject: Union[AstrologicalSubject, AstrologicalSubjectModel],
46
- second_subject: Union[AstrologicalSubject, AstrologicalSubjectModel],
47
- use_only_major_aspects: bool = True,
48
- ):
49
- if isinstance(first_subject, AstrologicalSubject):
50
- self.first_subject = first_subject.model()
51
- if isinstance(second_subject, AstrologicalSubject):
52
- self.second_subject = second_subject.model()
53
-
54
- self.use_only_major_aspects = use_only_major_aspects
55
-
56
- self.score_value = 0
57
- self.relationship_score_description: RelationshipScoreDescription = "Minimal"
58
- self.is_destiny_sign = True
59
- self.relationship_score_aspects: list[RelationshipScoreAspectModel] = []
60
- self._synastry_aspects = SynastryAspects(self.first_subject, self.second_subject).all_aspects
61
-
62
- def _evaluate_destiny_sign(self):
63
- """
64
- Evaluates if the subjects share the same sun sign quality and adds points if true.
65
- """
66
- if self.first_subject.sun["quality"] == self.second_subject.sun["quality"]:
67
- self.is_destiny_sign = True
68
- self.score_value += 5
69
- logging.debug(f"Destiny sign found, adding 5 points, total score: {self.score_value}")
70
-
71
- def _evaluate_aspect(self, aspect, points):
72
- """
73
- Evaluates an aspect and adds points to the score.
74
-
75
- Args:
76
- aspect (dict): Aspect information.
77
- points (int): Points to add.
78
- """
79
- if self.use_only_major_aspects and not aspect["is_major"]:
80
- return
81
-
82
- self.score_value += points
83
- self.relationship_score_aspects.append(
84
- RelationshipScoreAspectModel(
85
- p1_name=aspect["p1_name"],
86
- p2_name=aspect["p2_name"],
87
- aspect=aspect["aspect"],
88
- orbit=aspect["orbit"],
89
- )
90
- )
91
- logging.debug(f"{aspect['p1_name']}-{aspect['p2_name']} aspect: {aspect['aspect']} with orbit {aspect['orbit']} degrees, adding {points} points, total score: {self.score_value}, total aspects: {len(self.relationship_score_aspects)}")
92
-
93
- def _evaluate_sun_sun_main_aspect(self, aspect):
94
- """
95
- Evaluates Sun-Sun main aspects and adds points accordingly:
96
- - 8 points for conjunction/opposition/square
97
- - 11 points if the aspect's orbit is <= 2 degrees
98
-
99
- Args:
100
- aspect (dict): Aspect information.
101
- """
102
- if aspect["p1_name"] == "Sun" and aspect["p2_name"] == "Sun" and aspect["aspect"] in {"conjunction", "opposition", "square"}:
103
- points = 11 if aspect["orbit"] <= 2 else 8
104
- self._evaluate_aspect(aspect, points)
105
-
106
- def _evaluate_sun_moon_conjunction(self, aspect):
107
- """
108
- Evaluates Sun-Moon conjunctions and adds points accordingly:
109
- - 8 points for conjunction
110
- - 11 points if the aspect's orbit is <= 2 degrees
111
-
112
- Args:
113
- aspect (dict): Aspect information.
114
- """
115
- if {aspect["p1_name"], aspect["p2_name"]} == {"Moon", "Sun"} and aspect["aspect"] == "conjunction":
116
- points = 11 if aspect["orbit"] <= 2 else 8
117
- self._evaluate_aspect(aspect, points)
118
-
119
- def _evaluate_sun_sun_other_aspects(self, aspect):
120
- """
121
- Evaluates Sun-Sun aspects that are not conjunctions and adds points accordingly:
122
- - 4 points for other aspects
123
-
124
- Args:
125
- aspect (dict): Aspect information.
126
- """
127
- if aspect["p1_name"] == "Sun" and aspect["p2_name"] == "Sun" and aspect["aspect"] not in {"conjunction", "opposition", "square"}:
128
- points = 4
129
- self._evaluate_aspect(aspect, points)
130
-
131
- def _evaluate_sun_moon_other_aspects(self, aspect):
132
- """
133
- Evaluates Sun-Moon aspects that are not conjunctions and adds points accordingly:
134
- - 4 points for other aspects
135
-
136
- Args:
137
- aspect (dict): Aspect information.
138
- """
139
- if {aspect["p1_name"], aspect["p2_name"]} == {"Moon", "Sun"} and aspect["aspect"] != "conjunction":
140
- points = 4
141
- self._evaluate_aspect(aspect, points)
142
-
143
- def _evaluate_sun_ascendant_aspect(self, aspect):
144
- """
145
- Evaluates Sun-Ascendant aspects and adds points accordingly:
146
- - 4 points for any aspect
147
-
148
- Args:
149
- aspect (dict): Aspect information.
150
- """
151
- if {aspect["p1_name"], aspect["p2_name"]} == {"Sun", "First_House"}:
152
- points = 4
153
- self._evaluate_aspect(aspect, points)
154
-
155
- def _evaluate_moon_ascendant_aspect(self, aspect):
156
- """
157
- Evaluates Moon-Ascendant aspects and adds points accordingly:
158
- - 4 points for any aspect
159
-
160
- Args:
161
- aspect (dict): Aspect information.
162
- """
163
- if {aspect["p1_name"], aspect["p2_name"]} == {"Moon", "First_House"}:
164
- points = 4
165
- self._evaluate_aspect(aspect, points)
166
-
167
- def _evaluate_venus_mars_aspect(self, aspect):
168
- """
169
- Evaluates Venus-Mars aspects and adds points accordingly:
170
- - 4 points for any aspect
171
-
172
- Args:
173
- aspect (dict): Aspect information.
174
- """
175
- if {aspect["p1_name"], aspect["p2_name"]} == {"Venus", "Mars"}:
176
- points = 4
177
- self._evaluate_aspect(aspect, points)
178
-
179
- def _evaluate_relationship_score_description(self):
180
- """
181
- Evaluates the relationship score description based on the total score.
182
- """
183
- for description, threshold in self.SCORE_MAPPING:
184
- if self.score_value < threshold:
185
- self.relationship_score_description = description
186
- break
187
-
188
- def get_relationship_score(self):
189
- """
190
- Calculates the relationship score based on synastry aspects.
191
-
192
- Returns:
193
- RelationshipScoreModel: The calculated relationship score.
194
- """
195
- self._evaluate_destiny_sign()
196
-
197
- for aspect in self._synastry_aspects:
198
- self._evaluate_sun_sun_main_aspect(aspect)
199
- self._evaluate_sun_moon_conjunction(aspect)
200
- self._evaluate_sun_moon_other_aspects(aspect)
201
- self._evaluate_sun_sun_other_aspects(aspect)
202
- self._evaluate_sun_ascendant_aspect(aspect)
203
- self._evaluate_moon_ascendant_aspect(aspect)
204
- self._evaluate_venus_mars_aspect(aspect)
205
-
206
- self._evaluate_relationship_score_description()
207
-
208
- return RelationshipScoreModel(
209
- score_value=self.score_value,
210
- score_description=self.relationship_score_description,
211
- is_destiny_sign=self.is_destiny_sign,
212
- aspects=self.relationship_score_aspects,
213
- subjects=[self.first_subject, self.second_subject],
214
- )
215
-
216
-
217
- if __name__ == "__main__":
218
- from kerykeion.utilities import setup_logging
219
-
220
- setup_logging(level="critical")
221
-
222
- john = AstrologicalSubject("John", 1940, 10, 9, 18, 30, "Liverpool", "UK")
223
- yoko = AstrologicalSubject("Yoko", 1933, 2, 18, 20, 30, "Tokyo", "JP")
224
-
225
- relationship_score_factory = RelationshipScoreFactory(john, yoko)
226
- relationship_score = relationship_score_factory.get_relationship_score()
227
-
228
- print("John and Yoko relationship score:")
229
- print(relationship_score.score_value)
230
- print(relationship_score.score_description)
231
- print(relationship_score.is_destiny_sign)
232
- print(len(relationship_score.aspects))
233
- print(len(relationship_score_factory._synastry_aspects))
234
-
235
- print("------------------->")
236
- freud = AstrologicalSubject("Freud", 1856, 5, 6, 18, 30, "Freiberg", "DE")
237
- jung = AstrologicalSubject("Jung", 1875, 7, 26, 18, 30, "Kesswil", "CH")
238
-
239
- relationship_score_factory = RelationshipScoreFactory(freud, jung)
240
- relationship_score = relationship_score_factory.get_relationship_score()
241
-
242
- print("Freud and Jung relationship score:")
243
- print(relationship_score.score_value)
244
- print(relationship_score.score_description)
245
- print(relationship_score.is_destiny_sign)
246
- print(len(relationship_score.aspects))
247
- print(len(relationship_score_factory._synastry_aspects))
248
-
249
- print("------------------->")
250
- richart_burton = AstrologicalSubject("Richard Burton", 1925, 11, 10, 15, 00, "Pontrhydyfen", "UK")
251
- liz_taylor = AstrologicalSubject("Elizabeth Taylor", 1932, 2, 27, 2, 30, "London", "UK")
252
-
253
- relationship_score_factory = RelationshipScoreFactory(richart_burton, liz_taylor)
254
- relationship_score = relationship_score_factory.get_relationship_score()
255
-
256
- print("Richard Burton and Elizabeth Taylor relationship score:")
257
- print(relationship_score.score_value)
258
- print(relationship_score.score_description)
259
- print(relationship_score.is_destiny_sign)
260
- print(len(relationship_score.aspects))
261
- print(len(relationship_score_factory._synastry_aspects))
262
-
263
- print("------------------->")
264
- dario_fo = AstrologicalSubject("Dario Fo", 1926, 3, 24, 12, 25, "Sangiano", "IT")
265
- franca_rame = AstrologicalSubject("Franca Rame", 1929, 7, 18, 12, 25, "Parabiago", "IT")
266
-
267
- relationship_score_factory = RelationshipScoreFactory(dario_fo, franca_rame)
268
- relationship_score = relationship_score_factory.get_relationship_score()
269
-
270
- print("Dario Fo and Franca Rame relationship score:")
271
- print(relationship_score.score_value)
272
- print(relationship_score.score_description)
273
- print(relationship_score.is_destiny_sign)
274
- print(len(relationship_score.aspects))
275
- print(len(relationship_score_factory._synastry_aspects))