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
@@ -0,0 +1,63 @@
1
+ kerykeion/__init__.py,sha256=7gI_kWXhsmEK4SvNV6CkRmI0yjA3r7EO8UfQc_44UZU,1963
2
+ kerykeion/astrological_subject_factory.py,sha256=KaNuPSgVOgAva9z83fTuCpvIfEm3hsJro-z_mFPU1Q4,94604
3
+ kerykeion/backword.py,sha256=B4hBXpQvNcDStcJmJE8jhDnLajstkIUWjfc19J_3T1g,32530
4
+ kerykeion/chart_data_factory.py,sha256=ud0qjGT45NJyJAkd_Xrb3Zq2qU2QVAyU6MvidR0jeqQ,25024
5
+ kerykeion/composite_subject_factory.py,sha256=eUtjThDlYr6SQsEi02_CgO1kEMUMYgQGzR5rX91GEwY,17120
6
+ kerykeion/ephemeris_data_factory.py,sha256=uwEhVqqkB56HbxKueMAvSAbEKkYTJ9GH3mVLDNxIQnc,20358
7
+ kerykeion/fetch_geonames.py,sha256=SPI4fSvD59C-IVpaoeOHuD7_kjGbTLo2fypO2x57-p4,5432
8
+ kerykeion/planetary_return_factory.py,sha256=bIVPqa2gs7hYHi8aaMfVr4U99xWZk3LmYqZI9KG6ACo,37572
9
+ kerykeion/relationship_score_factory.py,sha256=RmrjPt_sXmKagEaEd76jvLe9a2T-yoxCROztvZDPCrs,11400
10
+ kerykeion/report.py,sha256=Bv8OOl-HG87pm7RM_SzhblTfvdc_n2C91PkJi7iHAXo,31513
11
+ kerykeion/transits_time_range_factory.py,sha256=3sjCv5RHVpascV_t-suBCUf2iGFfOMYpeAfsQobRk00,13943
12
+ kerykeion/utilities.py,sha256=LKljXx0HSjlT5pspvG4VIY1po_xG1dLGNNfEWg0G5Fs,24391
13
+ kerykeion/aspects/__init__.py,sha256=csJmxvLdBu-bHuW676f3dpY__Qyc6LwRyrpWVTh3n1A,287
14
+ kerykeion/aspects/aspects_factory.py,sha256=KQkeCBGFDfGH_pv44QlqVZnNb1fDNqpTY6uPQUhYcXM,24403
15
+ kerykeion/aspects/aspects_utils.py,sha256=00-MMLEGChpceab8sHKB1_qg6EG4ycTG2u2vYZcyLmQ,5784
16
+ kerykeion/charts/__init__.py,sha256=i9NMZ7LdkllPlqQSi1or9gTobHbROGDKmJhBDO4R0mA,128
17
+ kerykeion/charts/chart_drawer.py,sha256=G-HksIE5Y-d5Qa29zJA9lyTlLcODIPBm9j-oynYIyK0,122120
18
+ kerykeion/charts/charts_utils.py,sha256=JzPnbZJnH4lrIENb5saRtbHn_GbyaElXVBwKdyP90Dg,70110
19
+ kerykeion/charts/draw_planets.py,sha256=tIj3FeLLomVSbCaZUxfw_qBEB3pxi4EIEhqaeTgTyTY,29061
20
+ kerykeion/charts/templates/aspect_grid_only.xml,sha256=v3QtNMjk-kBdUTfB0r6thg--Ta_tNFdRQCzdk5PAycY,86429
21
+ kerykeion/charts/templates/chart.xml,sha256=oUI9hV--4rdsVFqZJ8ChpgC2ZgfnqlL2Tl2vco1vlOc,92095
22
+ kerykeion/charts/templates/wheel_only.xml,sha256=05k2KiVMP-5NW0e8PZrTX-VPn5x-SaNzEYPgU1_OKa0,87775
23
+ kerykeion/charts/themes/black-and-white.css,sha256=IIoy9wyB4znrvPvmallKmgDW4HMJPywTv5IZsolaEp4,6543
24
+ kerykeion/charts/themes/classic.css,sha256=xvBiI4DtY5fMaA7ilxGl26VEDY1VzkOTWm1XOs9n-ec,5158
25
+ kerykeion/charts/themes/dark-high-contrast.css,sha256=EbmK9sM_ksJ5Fx36cb91nSvSsqC6mzjkRXCpwNTHfCE,8260
26
+ kerykeion/charts/themes/dark.css,sha256=gub44WABpHseNNaWu4lVmtvDthgrRCvEVaobcd-UrMY,8335
27
+ kerykeion/charts/themes/light.css,sha256=WEX_uKPArTjignVwvuAHqqWIbNiCheQ9Y7MgK0HJjAM,8344
28
+ kerykeion/charts/themes/strawberry.css,sha256=pFrST9xDRiej-YXh7P_snOr46DUcKjw--5d2MrlashY,9001
29
+ kerykeion/house_comparison/__init__.py,sha256=dnSVpx_pKylYUeaTGxHsSlN15HqQS6eJHpDQOrIvrpY,107
30
+ kerykeion/house_comparison/house_comparison_factory.py,sha256=YkA7itvkyIcKEf8Ffi53on-gGhsHi_Oeu9Gm4N9aHQs,4588
31
+ kerykeion/house_comparison/house_comparison_utils.py,sha256=vzME6Aw5njCXu6BmPLuhgfEVDI00qfQI7MPH-YujO1g,5071
32
+ kerykeion/kr_types/__init__.py,sha256=qu6A0wjQEkBgCGAyTRl2srHvq6LOiBlNsrlEcVomx78,1990
33
+ kerykeion/kr_types/chart_template_model.py,sha256=k4WhL3sKAa8iCTsvlH4dFdOBByLIkgT7Y1MHBuYem1Q,733
34
+ kerykeion/kr_types/kerykeion_exception.py,sha256=_Jjd-5DuBA4qBG58ob5Lhe9HANrXCaihMagD0icPZc0,726
35
+ kerykeion/kr_types/kr_literals.py,sha256=_yZ-mtuomVxa1sMpxemA6T30PGVPMdGxbF_K2jmWfTo,670
36
+ kerykeion/kr_types/kr_models.py,sha256=-cesGCN8-CjmPSqCH6CMnc0hDA_87g4zflEHxiKi1QY,656
37
+ kerykeion/kr_types/settings_models.py,sha256=xtpsrhjmhdowDSBeQ7TEMR53-uEEspCoXKCLnq18nDo,698
38
+ kerykeion/schemas/__init__.py,sha256=EcwbnoYPKLq3m7n5s2cEZ8UyWpxdmHXbvM23hLNBNBI,2376
39
+ kerykeion/schemas/chart_template_model.py,sha256=fQ_EZ8ccOgNd4gXu5KilF1dUH9B2RVCDLHc09YkYLyY,8978
40
+ kerykeion/schemas/kerykeion_exception.py,sha256=vTYdwj_mL-Q-MqHJvEzzBXxQ5YI2kAwUC6ImoWxMKXc,454
41
+ kerykeion/schemas/kr_literals.py,sha256=p0lm598ut0GyeT-sRzWNcp5BFk9-FdYme4XjEUFJ3cA,5656
42
+ kerykeion/schemas/kr_models.py,sha256=C8Xo4uPxMfCUbKOBopKrbI8bSZzWVXImYsOJEZIlBjQ,22159
43
+ kerykeion/schemas/settings_models.py,sha256=NlOW9T7T5kD5Dzna1UOdb7XPQeQnzMOu0y4-ApERxPw,17619
44
+ kerykeion/settings/__init__.py,sha256=IJUqkYTpvmbKecVeCbsiL1qU_4xWc78u4OrvN_T3ZAI,624
45
+ kerykeion/settings/chart_defaults.py,sha256=TSm2hXCxym3I7XpIqIMBLWM253Z0dCGbhPi2MpWbD_0,12490
46
+ kerykeion/settings/config_constants.py,sha256=D1PApNT7Zldlv8QINmaKnyLovY5UJ2FsAqHNTTPd5ps,3717
47
+ kerykeion/settings/kerykeion_settings.py,sha256=Aoi_9SeHlgmTaopMdC4Ojb9V0kw-iKZKqJopZBiTikM,1884
48
+ kerykeion/settings/translation_strings.py,sha256=UYxiZT5aiNZ4tpQuTauIlXwMm3tzfz6QE9DPNVtlHdo,56412
49
+ kerykeion/settings/translations.py,sha256=A_Zwr-ujvxBLvE4a87-28pM3KifdUaAvsR3XvMZNg0s,2377
50
+ kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
51
+ kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
52
+ kerykeion/sweph/sefstars.txt,sha256=GLDcr75bckB3PauiwDijJfWz_EFj9h4Kf06Sq9T1F8Y,136618
53
+ kerykeion/sweph/ast136/s136108s.se1,sha256=eSDfBurMBVnawSnZZgwHUrwqeAZYlKPLH1NNtq0ep7I,19489
54
+ kerykeion/sweph/ast136/s136199s.se1,sha256=eNBaQGxAmnqeAgE_C-cpsX4BTgPYR4_H9HRkI9QHMPA,14514
55
+ kerykeion/sweph/ast136/s136472s.se1,sha256=TjBnDMtPWdBzbOHn9Mju5C2i-Kfg1dT7kQaeVuGOoi8,19454
56
+ kerykeion/sweph/ast28/se28978s.se1,sha256=nU2Qp-ELc_tzFnRc1QT6uVueWXEipvhYDgfQRX1TAC4,16227
57
+ kerykeion/sweph/ast50/se50000s.se1,sha256=9jTrPlIrZMOBWC9cNgwzcfz0KBHdXFZoY9-NZ_HtECo,15748
58
+ kerykeion/sweph/ast90/se90377s.se1,sha256=bto2x4LtBv8b1ej1XhVFYq-kfHO9cczbKV9U1f9UVu4,10288
59
+ kerykeion/sweph/ast90/se90482s.se1,sha256=uHxz6bP4K8zgtQFrlWFwxrYfmqm5kXxsg6OYhAIUbAA,16173
60
+ kerykeion-5.0.0.dist-info/METADATA,sha256=q-yyT9L9gdHF7X5-5Hk8Nz-4oTKju5or1MzxQWQPBw0,44508
61
+ kerykeion-5.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
62
+ kerykeion-5.0.0.dist-info/licenses/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
63
+ kerykeion-5.0.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.1
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,172 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- """
3
- This is part of Kerykeion (C) 2025 Giacomo Battaglia
4
- """
5
-
6
- from pathlib import Path
7
- from kerykeion import AstrologicalSubject
8
- from kerykeion.kr_types import CompositeSubjectModel
9
- import logging
10
- from typing import Union, List
11
- from kerykeion.settings.kerykeion_settings import get_settings
12
- from dataclasses import dataclass, field
13
- from functools import cached_property
14
- from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points, get_active_points_list
15
- from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, AspectModel, ActiveAspect
16
- from kerykeion.kr_types.kr_literals import AxialCusps, Planet
17
- from kerykeion.kr_types.settings_models import KerykeionSettingsModel
18
- from kerykeion.settings.config_constants import DEFAULT_ACTIVE_POINTS, DEFAULT_ACTIVE_ASPECTS
19
-
20
-
21
-
22
- AXES_LIST = [
23
- "Ascendant",
24
- "Medium_Coeli",
25
- "Descendant",
26
- "Imum_Coeli",
27
- ]
28
-
29
-
30
- @dataclass
31
- class NatalAspects:
32
- """
33
- Generates an object with all the aspects of a birthcart.
34
- """
35
-
36
- user: Union[AstrologicalSubject, AstrologicalSubjectModel, CompositeSubjectModel]
37
- new_settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None
38
- active_points: List[Union[AxialCusps, Planet]] = field(default_factory=lambda: DEFAULT_ACTIVE_POINTS)
39
- active_aspects: List[ActiveAspect] = field(default_factory=lambda: DEFAULT_ACTIVE_ASPECTS)
40
-
41
- def __post_init__(self):
42
- self.settings = get_settings(self.new_settings_file)
43
-
44
- self.celestial_points = self.settings.celestial_points
45
- self.aspects_settings = self.settings.aspects
46
- self.axes_orbit_settings = self.settings.general_settings.axes_orbit
47
- self.active_points = self.active_points
48
-
49
- @cached_property
50
- def all_aspects(self):
51
- """
52
- Return all the aspects of the points in the natal chart in a dictionary,
53
- first all the individual aspects of each planet, second the aspects
54
- without repetitions.
55
- """
56
-
57
- active_points_list = get_active_points_list(self.user, self.settings, self.active_points)
58
-
59
- # ---> TODO: Clean this up
60
- filtered_settings = []
61
- for a in self.aspects_settings:
62
- for aspect in self.active_aspects:
63
- if a["name"] == aspect["name"]:
64
- a["orb"] = aspect["orb"] # Assign the aspect's orb
65
- filtered_settings.append(a)
66
- break # Exit the inner loop once a match is found
67
- self.aspects_settings = filtered_settings
68
- # <--- TODO: Clean this up
69
-
70
- self.all_aspects_list = []
71
- for first in range(len(active_points_list)):
72
- # Generates the aspects list without repetitions
73
- for second in range(first + 1, len(active_points_list)):
74
- # AC/DC, MC/IC and North/South nodes are always in opposition
75
- opposite_pairs = {
76
- ("Ascendant", "Descendant"),
77
- ("Descendant", "Ascendant"),
78
- ("Medium_Coeli", "Imum_Coeli"),
79
- ("Imum_Coeli", "Medium_Coeli"),
80
- ("True_Node", "True_South_Node"),
81
- ("Mean_Node", "Mean_South_Node"),
82
- ("True_South_Node", "True_Node"),
83
- ("Mean_South_Node", "Mean_Node"),
84
- }
85
- if (active_points_list[first]["name"], active_points_list[second]["name"]) in opposite_pairs:
86
- continue
87
-
88
- aspect = get_aspect_from_two_points(
89
- self.aspects_settings,
90
- active_points_list[first]["abs_pos"],
91
- active_points_list[second]["abs_pos"]
92
- )
93
-
94
- verdict = aspect["verdict"]
95
- name = aspect["name"]
96
- orbit = aspect["orbit"]
97
- aspect_degrees = aspect["aspect_degrees"]
98
- diff = aspect["diff"]
99
-
100
- if verdict == True:
101
- aspect_model = AspectModel(
102
- p1_name=active_points_list[first]["name"],
103
- p1_owner=self.user.name,
104
- p1_abs_pos=active_points_list[first]["abs_pos"],
105
- p2_name=active_points_list[second]["name"],
106
- p2_owner=self.user.name,
107
- p2_abs_pos=active_points_list[second]["abs_pos"],
108
- aspect=name,
109
- orbit=orbit,
110
- aspect_degrees=aspect_degrees,
111
- diff=diff,
112
- p1=planet_id_decoder(self.celestial_points, active_points_list[first]["name"]),
113
- p2=planet_id_decoder(self.celestial_points, active_points_list[second]["name"]),
114
- )
115
- self.all_aspects_list.append(aspect_model)
116
-
117
- return self.all_aspects_list
118
-
119
- @cached_property
120
- def relevant_aspects(self):
121
- """
122
- Filters the aspects list with the desired points, in this case
123
- the most important are hardcoded.
124
- Set the list with set_points and creating a list with the names
125
- or the numbers of the houses.
126
- The relevant aspects are the ones that are set as looping in the available_aspects list.
127
- """
128
-
129
- logging.debug("Relevant aspects not already calculated, calculating now...")
130
- self.all_aspects
131
-
132
- axes_list = AXES_LIST
133
- counter = 0
134
-
135
- # Remove aspects where the orbits exceed the maximum orb thresholds specified in the settings
136
- # (specified usually in kr.config.json file)
137
- aspects_filtered = self.all_aspects
138
- aspects_list_subtract = []
139
- for a in aspects_filtered:
140
- counter += 1
141
- name_p1 = str(a["p1_name"])
142
- name_p2 = str(a["p2_name"])
143
-
144
- if name_p1 in axes_list:
145
- if abs(a["orbit"]) >= self.axes_orbit_settings:
146
- aspects_list_subtract.append(a)
147
-
148
- elif name_p2 in axes_list:
149
- if abs(a["orbit"]) >= self.axes_orbit_settings:
150
- aspects_list_subtract.append(a)
151
-
152
- self.aspects = [item for item in aspects_filtered if item not in aspects_list_subtract]
153
-
154
- return self.aspects
155
-
156
-
157
- if __name__ == "__main__":
158
- from kerykeion.utilities import setup_logging
159
-
160
- setup_logging(level="debug")
161
-
162
- johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
163
-
164
- # All aspects as a list of dictionaries
165
- aspects = NatalAspects(johnny)
166
- #print([a.model_dump() for a in aspects.all_aspects])
167
-
168
- print("\n")
169
-
170
- # Relevant aspects as a list of dictionaries
171
- aspects = NatalAspects(johnny)
172
- print([a.model_dump() for a in aspects.relevant_aspects])
@@ -1,124 +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 pathlib import Path
8
- from typing import Union
9
- from functools import cached_property
10
-
11
- from kerykeion.aspects.natal_aspects import NatalAspects
12
- from kerykeion.settings.kerykeion_settings import get_settings
13
- from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points, get_active_points_list
14
- from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, AspectModel, ActiveAspect
15
- from kerykeion.kr_types.settings_models import KerykeionSettingsModel
16
- from kerykeion.settings.config_constants import DEFAULT_ACTIVE_POINTS, DEFAULT_ACTIVE_ASPECTS
17
- from kerykeion.kr_types.kr_literals import AxialCusps, Planet
18
- from typing import Union, List
19
-
20
-
21
- class SynastryAspects(NatalAspects):
22
- """
23
- Generates an object with all the aspects between two persons.
24
- """
25
-
26
- def __init__(
27
- self,
28
- kr_object_one: Union[AstrologicalSubject, AstrologicalSubjectModel],
29
- kr_object_two: Union[AstrologicalSubject, AstrologicalSubjectModel],
30
- new_settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None,
31
- active_points: list[Union[AxialCusps, Planet]] = DEFAULT_ACTIVE_POINTS,
32
- active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
33
- ):
34
- # Subjects
35
- self.first_user = kr_object_one
36
- self.second_user = kr_object_two
37
-
38
- # Settings
39
- self.new_settings_file = new_settings_file
40
- self.settings = get_settings(self.new_settings_file)
41
-
42
- self.celestial_points = self.settings.celestial_points
43
- self.aspects_settings = self.settings.aspects
44
- self.axes_orbit_settings = self.settings.general_settings.axes_orbit
45
- self.active_points = active_points
46
- self.active_aspects = active_aspects
47
-
48
- # Private variables of the aspects
49
- self._all_aspects: Union[list, None] = None
50
- self._relevant_aspects: Union[list, None] = None
51
-
52
- @cached_property
53
- def all_aspects(self):
54
- """
55
- Return all the aspects of the points in the natal chart in a dictionary,
56
- first all the individual aspects of each planet, second the aspects
57
- whiteout repetitions.
58
- """
59
-
60
- if self._all_aspects is not None:
61
- return self._all_aspects
62
-
63
- # Celestial Points Lists
64
- first_active_points_list = get_active_points_list(self.first_user, self.settings, self.active_points)
65
- second_active_points_list = get_active_points_list(self.second_user, self.settings, self.active_points)
66
-
67
- # ---> TODO: Clean this up
68
- filtered_settings = []
69
- for a in self.aspects_settings:
70
- for aspect in self.active_aspects:
71
- if a["name"] == aspect["name"]:
72
- a["orb"] = aspect["orb"] # Assign the aspect's orb
73
- filtered_settings.append(a)
74
- self.aspects_settings = filtered_settings
75
- # <--- TODO: Clean this up
76
-
77
- self.all_aspects_list = []
78
- for first in range(len(first_active_points_list)):
79
- # Generates the aspects list whitout repetitions
80
- for second in range(len(second_active_points_list)):
81
- aspect = get_aspect_from_two_points(
82
- self.aspects_settings,
83
- first_active_points_list[first]["abs_pos"],
84
- second_active_points_list[second]["abs_pos"],
85
- )
86
-
87
- verdict = aspect["verdict"]
88
- name = aspect["name"]
89
- orbit = aspect["orbit"]
90
- aspect_degrees = aspect["aspect_degrees"]
91
- diff = aspect["diff"]
92
-
93
- if verdict == True:
94
- aspect_model = AspectModel(
95
- p1_name=first_active_points_list[first]["name"],
96
- p1_owner=self.first_user.name,
97
- p1_abs_pos=first_active_points_list[first]["abs_pos"],
98
- p2_name=second_active_points_list[second]["name"],
99
- p2_owner=self.second_user.name,
100
- p2_abs_pos=second_active_points_list[second]["abs_pos"],
101
- aspect=name,
102
- orbit=orbit,
103
- aspect_degrees=aspect_degrees,
104
- diff=diff,
105
- p1=planet_id_decoder(self.celestial_points, first_active_points_list[first]["name"]),
106
- p2=planet_id_decoder(self.celestial_points, second_active_points_list[second]["name"]),
107
- )
108
- self.all_aspects_list.append(aspect_model)
109
-
110
- return self.all_aspects_list
111
-
112
-
113
- if __name__ == "__main__":
114
- from kerykeion.utilities import setup_logging
115
-
116
- setup_logging(level="debug")
117
-
118
- john = AstrologicalSubject("John", 1940, 10, 9, 10, 30, "Liverpool", "GB")
119
- yoko = AstrologicalSubject("Yoko", 1933, 2, 18, 10, 30, "Tokyo", "JP")
120
-
121
- synastry_aspects = SynastryAspects(john, yoko)
122
-
123
- # All aspects as a list of dictionaries
124
- print([aspect.dict() for aspect in synastry_aspects.all_aspects])
@@ -1,41 +0,0 @@
1
- from datetime import datetime, timedelta
2
- from kerykeion import (
3
- TransitsTimeRangeFactory,
4
- EphemerisDataFactory,
5
- AstrologicalSubject,
6
- )
7
-
8
- # Create a natal chart for the subject
9
- person = AstrologicalSubject(
10
- "Johnny Depp", 1963, 6, 9, 20, 15, "Owensboro", "US"
11
- )
12
-
13
- # Define the time period for transit calculation
14
- start_date = datetime.now()
15
- end_date = datetime.now() + timedelta(days=30)
16
-
17
- # Create ephemeris data for the specified time period
18
- ephemeris_factory = EphemerisDataFactory(
19
- start_datetime=start_date,
20
- end_datetime=end_date,
21
- step_type="days",
22
- step=1,
23
- lat=person.lat,
24
- lng=person.lng,
25
- tz_str=person.tz_str,
26
- )
27
-
28
- ephemeris_data_points = ephemeris_factory.get_ephemeris_data_as_astrological_subjects()
29
-
30
- # Calculate transits for the subject
31
- transit_factory = TransitsTimeRangeFactory(
32
- natal_chart=person,
33
- ephemeris_data_points=ephemeris_data_points,
34
- )
35
-
36
- transit_results = transit_factory.get_transit_moments()
37
-
38
- # Print example data
39
- print(transit_results.model_dump()["dates"][2])
40
- print(transit_results.model_dump()["transits"][2]['date'])
41
- print(transit_results.model_dump()["transits"][2]['aspects'][0])