kerykeion 4.26.2__py3-none-any.whl → 5.0.0__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 (77) hide show
  1. kerykeion/__init__.py +54 -11
  2. kerykeion/aspects/__init__.py +5 -2
  3. kerykeion/aspects/aspects_factory.py +569 -0
  4. kerykeion/aspects/aspects_utils.py +81 -8
  5. kerykeion/astrological_subject_factory.py +1897 -0
  6. kerykeion/backword.py +773 -0
  7. kerykeion/chart_data_factory.py +549 -0
  8. kerykeion/charts/chart_drawer.py +2601 -0
  9. kerykeion/charts/charts_utils.py +948 -177
  10. kerykeion/charts/draw_planets.py +602 -351
  11. kerykeion/charts/templates/aspect_grid_only.xml +328 -202
  12. kerykeion/charts/templates/chart.xml +432 -272
  13. kerykeion/charts/templates/wheel_only.xml +350 -214
  14. kerykeion/charts/themes/black-and-white.css +148 -0
  15. kerykeion/charts/themes/classic.css +107 -76
  16. kerykeion/charts/themes/dark-high-contrast.css +145 -107
  17. kerykeion/charts/themes/dark.css +146 -107
  18. kerykeion/charts/themes/light.css +146 -103
  19. kerykeion/charts/themes/strawberry.css +158 -0
  20. kerykeion/composite_subject_factory.py +253 -51
  21. kerykeion/ephemeris_data_factory.py +434 -0
  22. kerykeion/fetch_geonames.py +27 -8
  23. kerykeion/house_comparison/__init__.py +6 -0
  24. kerykeion/house_comparison/house_comparison_factory.py +103 -0
  25. kerykeion/house_comparison/house_comparison_utils.py +126 -0
  26. kerykeion/kr_types/__init__.py +66 -6
  27. kerykeion/kr_types/chart_template_model.py +20 -0
  28. kerykeion/kr_types/kerykeion_exception.py +15 -9
  29. kerykeion/kr_types/kr_literals.py +14 -132
  30. kerykeion/kr_types/kr_models.py +14 -318
  31. kerykeion/kr_types/settings_models.py +15 -203
  32. kerykeion/planetary_return_factory.py +805 -0
  33. kerykeion/relationship_score_factory.py +301 -0
  34. kerykeion/report.py +751 -64
  35. kerykeion/schemas/__init__.py +106 -0
  36. kerykeion/schemas/chart_template_model.py +367 -0
  37. kerykeion/schemas/kerykeion_exception.py +20 -0
  38. kerykeion/schemas/kr_literals.py +181 -0
  39. kerykeion/schemas/kr_models.py +605 -0
  40. kerykeion/schemas/settings_models.py +180 -0
  41. kerykeion/settings/__init__.py +20 -1
  42. kerykeion/settings/chart_defaults.py +444 -0
  43. kerykeion/settings/config_constants.py +117 -12
  44. kerykeion/settings/kerykeion_settings.py +31 -73
  45. kerykeion/settings/translation_strings.py +1479 -0
  46. kerykeion/settings/translations.py +74 -0
  47. kerykeion/sweph/ast136/s136108s.se1 +0 -0
  48. kerykeion/sweph/ast136/s136199s.se1 +0 -0
  49. kerykeion/sweph/ast136/s136472s.se1 +0 -0
  50. kerykeion/sweph/ast28/se28978s.se1 +0 -0
  51. kerykeion/sweph/ast50/se50000s.se1 +0 -0
  52. kerykeion/sweph/ast90/se90377s.se1 +0 -0
  53. kerykeion/sweph/ast90/se90482s.se1 +0 -0
  54. kerykeion/sweph/sefstars.txt +1602 -0
  55. kerykeion/transits_time_range_factory.py +302 -0
  56. kerykeion/utilities.py +393 -114
  57. kerykeion-5.0.0.dist-info/METADATA +1176 -0
  58. kerykeion-5.0.0.dist-info/RECORD +63 -0
  59. {kerykeion-4.26.2.dist-info → kerykeion-5.0.0.dist-info}/WHEEL +1 -1
  60. kerykeion/aspects/natal_aspects.py +0 -172
  61. kerykeion/aspects/synastry_aspects.py +0 -124
  62. kerykeion/aspects/transits_time_range.py +0 -41
  63. kerykeion/astrological_subject.py +0 -841
  64. kerykeion/charts/kerykeion_chart_svg.py +0 -1219
  65. kerykeion/enums.py +0 -57
  66. kerykeion/ephemeris_data.py +0 -242
  67. kerykeion/kr_types/chart_types.py +0 -95
  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 -230
  71. kerykeion/settings/kr.config.json +0 -1258
  72. kerykeion/transits_time_range.py +0 -124
  73. kerykeion-4.26.2.dist-info/LICENSE +0 -661
  74. kerykeion-4.26.2.dist-info/METADATA +0 -629
  75. kerykeion-4.26.2.dist-info/RECORD +0 -46
  76. kerykeion-4.26.2.dist-info/entry_points.txt +0 -3
  77. /LICENSE → /kerykeion-5.0.0.dist-info/licenses/LICENSE +0 -0
@@ -1,230 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- """
3
- This is part of Kerykeion (C) 2025 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
- MAJOR_ASPECTS = {"conjunction", "opposition", "square", "trine", "sextile"}
44
-
45
- def __init__(
46
- self,
47
- first_subject: Union[AstrologicalSubject, AstrologicalSubjectModel],
48
- second_subject: Union[AstrologicalSubject, AstrologicalSubjectModel],
49
- use_only_major_aspects: bool = True,
50
- ):
51
- if isinstance(first_subject, AstrologicalSubject):
52
- self.first_subject = first_subject.model()
53
- if isinstance(second_subject, AstrologicalSubject):
54
- self.second_subject = second_subject.model()
55
-
56
- self.use_only_major_aspects = use_only_major_aspects
57
-
58
- self.score_value = 0
59
- self.relationship_score_description: RelationshipScoreDescription = "Minimal"
60
- self.is_destiny_sign = True
61
- self.relationship_score_aspects: list[RelationshipScoreAspectModel] = []
62
- self._synastry_aspects = SynastryAspects(self.first_subject, self.second_subject).all_aspects
63
-
64
- def _evaluate_destiny_sign(self):
65
- """
66
- Evaluates if the subjects share the same sun sign quality and adds points if true.
67
- """
68
- if self.first_subject.sun["quality"] == self.second_subject.sun["quality"]:
69
- self.is_destiny_sign = True
70
- self.score_value += 5
71
- logging.debug(f"Destiny sign found, adding 5 points, total score: {self.score_value}")
72
-
73
- def _evaluate_aspect(self, aspect, points):
74
- """
75
- Evaluates an aspect and adds points to the score.
76
-
77
- Args:
78
- aspect (dict): Aspect information.
79
- points (int): Points to add.
80
- """
81
- if self.use_only_major_aspects and aspect["aspect"] not in self.MAJOR_ASPECTS:
82
- return
83
-
84
- self.score_value += points
85
- self.relationship_score_aspects.append(
86
- RelationshipScoreAspectModel(
87
- p1_name=aspect["p1_name"],
88
- p2_name=aspect["p2_name"],
89
- aspect=aspect["aspect"],
90
- orbit=aspect["orbit"],
91
- )
92
- )
93
- 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)}")
94
-
95
- def _evaluate_sun_sun_main_aspect(self, aspect):
96
- """
97
- Evaluates Sun-Sun main aspects and adds points accordingly:
98
- - 8 points for conjunction/opposition/square
99
- - 11 points if the aspect's orbit is <= 2 degrees
100
-
101
- Args:
102
- aspect (dict): Aspect information.
103
- """
104
- if aspect["p1_name"] == "Sun" and aspect["p2_name"] == "Sun" and aspect["aspect"] in {"conjunction", "opposition", "square"}:
105
- points = 11 if aspect["orbit"] <= 2 else 8
106
- self._evaluate_aspect(aspect, points)
107
-
108
- def _evaluate_sun_moon_conjunction(self, aspect):
109
- """
110
- Evaluates Sun-Moon conjunctions and adds points accordingly:
111
- - 8 points for conjunction
112
- - 11 points if the aspect's orbit is <= 2 degrees
113
-
114
- Args:
115
- aspect (dict): Aspect information.
116
- """
117
- if {aspect["p1_name"], aspect["p2_name"]} == {"Moon", "Sun"} and aspect["aspect"] == "conjunction":
118
- points = 11 if aspect["orbit"] <= 2 else 8
119
- self._evaluate_aspect(aspect, points)
120
-
121
- def _evaluate_sun_sun_other_aspects(self, aspect):
122
- """
123
- Evaluates Sun-Sun aspects that are not conjunctions and adds points accordingly:
124
- - 4 points for other aspects
125
-
126
- Args:
127
- aspect (dict): Aspect information.
128
- """
129
- if aspect["p1_name"] == "Sun" and aspect["p2_name"] == "Sun" and aspect["aspect"] not in {"conjunction", "opposition", "square"}:
130
- points = 4
131
- self._evaluate_aspect(aspect, points)
132
-
133
- def _evaluate_sun_moon_other_aspects(self, aspect):
134
- """
135
- Evaluates Sun-Moon aspects that are not conjunctions and adds points accordingly:
136
- - 4 points for other aspects
137
-
138
- Args:
139
- aspect (dict): Aspect information.
140
- """
141
- if {aspect["p1_name"], aspect["p2_name"]} == {"Moon", "Sun"} and aspect["aspect"] != "conjunction":
142
- points = 4
143
- self._evaluate_aspect(aspect, points)
144
-
145
- def _evaluate_sun_ascendant_aspect(self, aspect):
146
- """
147
- Evaluates Sun-Ascendant aspects and adds points accordingly:
148
- - 4 points for any aspect
149
-
150
- Args:
151
- aspect (dict): Aspect information.
152
- """
153
- if {aspect["p1_name"], aspect["p2_name"]} == {"Sun", "Ascendant"}:
154
- points = 4
155
- self._evaluate_aspect(aspect, points)
156
-
157
- def _evaluate_moon_ascendant_aspect(self, aspect):
158
- """
159
- Evaluates Moon-Ascendant aspects and adds points accordingly:
160
- - 4 points for any aspect
161
-
162
- Args:
163
- aspect (dict): Aspect information.
164
- """
165
- if {aspect["p1_name"], aspect["p2_name"]} == {"Moon", "Ascendant"}:
166
- points = 4
167
- self._evaluate_aspect(aspect, points)
168
-
169
- def _evaluate_venus_mars_aspect(self, aspect):
170
- """
171
- Evaluates Venus-Mars aspects and adds points accordingly:
172
- - 4 points for any aspect
173
-
174
- Args:
175
- aspect (dict): Aspect information.
176
- """
177
- if {aspect["p1_name"], aspect["p2_name"]} == {"Venus", "Mars"}:
178
- points = 4
179
- self._evaluate_aspect(aspect, points)
180
-
181
- def _evaluate_relationship_score_description(self):
182
- """
183
- Evaluates the relationship score description based on the total score.
184
- """
185
- for description, threshold in self.SCORE_MAPPING:
186
- if self.score_value < threshold:
187
- self.relationship_score_description = description
188
- break
189
-
190
- def get_relationship_score(self):
191
- """
192
- Calculates the relationship score based on synastry aspects.
193
-
194
- Returns:
195
- RelationshipScoreModel: The calculated relationship score.
196
- """
197
- self._evaluate_destiny_sign()
198
-
199
- for aspect in self._synastry_aspects:
200
- self._evaluate_sun_sun_main_aspect(aspect)
201
- self._evaluate_sun_moon_conjunction(aspect)
202
- self._evaluate_sun_moon_other_aspects(aspect)
203
- self._evaluate_sun_sun_other_aspects(aspect)
204
- self._evaluate_sun_ascendant_aspect(aspect)
205
- self._evaluate_moon_ascendant_aspect(aspect)
206
- self._evaluate_venus_mars_aspect(aspect)
207
-
208
- self._evaluate_relationship_score_description()
209
-
210
- return RelationshipScoreModel(
211
- score_value=self.score_value,
212
- score_description=self.relationship_score_description,
213
- is_destiny_sign=self.is_destiny_sign,
214
- aspects=self.relationship_score_aspects,
215
- subjects=[self.first_subject, self.second_subject],
216
- )
217
-
218
-
219
- if __name__ == "__main__":
220
- from kerykeion.utilities import setup_logging
221
-
222
- setup_logging(level="critical")
223
-
224
- giacomo = AstrologicalSubject("Giacomo", 1993, 6, 10, 12, 15, "Montichiari", "IT")
225
- yoko = AstrologicalSubject("Susie Cox", 1949, 6, 17, 9, 40, "Tucson", "US")
226
-
227
- factory = RelationshipScoreFactory(giacomo, yoko)
228
- score = factory.get_relationship_score()
229
- print(score)
230
-