kerykeion 5.0.0a9__py3-none-any.whl → 5.0.0a11__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 +21 -4
- kerykeion/aspects/__init__.py +7 -2
- kerykeion/aspects/aspects_utils.py +1 -3
- kerykeion/aspects/natal_aspects_factory.py +235 -0
- kerykeion/aspects/synastry_aspects_factory.py +275 -0
- kerykeion/astrological_subject_factory.py +688 -86
- kerykeion/charts/charts_utils.py +12 -12
- kerykeion/charts/draw_planets.py +584 -344
- kerykeion/charts/kerykeion_chart_svg.py +11 -16
- kerykeion/charts/templates/wheel_only.xml +1 -1
- kerykeion/composite_subject_factory.py +229 -10
- kerykeion/ephemeris_data_factory.py +431 -0
- kerykeion/fetch_geonames.py +27 -8
- kerykeion/house_comparison/__init__.py +6 -0
- kerykeion/house_comparison/house_comparison_factory.py +1 -1
- kerykeion/house_comparison/house_comparison_utils.py +0 -1
- kerykeion/kr_types/__init__.py +49 -0
- kerykeion/kr_types/kerykeion_exception.py +6 -0
- kerykeion/kr_types/kr_models.py +84 -2
- kerykeion/kr_types/settings_models.py +9 -1
- kerykeion/planetary_return_factory.py +538 -37
- kerykeion/relationship_score_factory.py +123 -59
- kerykeion/report.py +7 -1
- kerykeion/settings/__init__.py +5 -0
- kerykeion/settings/config_constants.py +20 -6
- kerykeion/settings/kr.config.json +80 -0
- kerykeion/transits_time_range_factory.py +293 -0
- kerykeion/utilities.py +130 -68
- {kerykeion-5.0.0a9.dist-info → kerykeion-5.0.0a11.dist-info}/METADATA +9 -4
- kerykeion-5.0.0a11.dist-info/RECORD +50 -0
- kerykeion/aspects/natal_aspects.py +0 -181
- kerykeion/aspects/synastry_aspects.py +0 -141
- kerykeion/aspects/transits_time_range.py +0 -41
- kerykeion/charts/draw_planets_v2.py +0 -649
- 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.0a9.dist-info/RECORD +0 -55
- kerykeion-5.0.0a9.dist-info/entry_points.txt +0 -2
- {kerykeion-5.0.0a9.dist-info → kerykeion-5.0.0a11.dist-info}/WHEEL +0 -0
- {kerykeion-5.0.0a9.dist-info → kerykeion-5.0.0a11.dist-info}/licenses/LICENSE +0 -0
kerykeion/enums.py
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
from enum import Enum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class Planets(Enum):
|
|
5
|
-
SUN = "Sun"
|
|
6
|
-
MOON = "Moon"
|
|
7
|
-
MERCURY = "Mercury"
|
|
8
|
-
VENUS = "Venus"
|
|
9
|
-
MARS = "Mars"
|
|
10
|
-
JUPITER = "Jupiter"
|
|
11
|
-
SATURN = "Saturn"
|
|
12
|
-
URANUS = "Uranus"
|
|
13
|
-
NEPTUNE = "Neptune"
|
|
14
|
-
PLUTO = "Pluto"
|
|
15
|
-
CHIRON = "Chiron"
|
|
16
|
-
TRUE_NODE = "True_Node"
|
|
17
|
-
MEAN_NODE = "Mean_Node"
|
|
18
|
-
TRUE_SOUTH_NODE = "True_South_Node"
|
|
19
|
-
MEAN_SOUTH_NODE = "Mean_South_Node"
|
|
20
|
-
MEAN_LILITH = "Mean_Lilith"
|
|
21
|
-
ASCENDANT = "Ascendant"
|
|
22
|
-
DESCENDANT = "Descendant"
|
|
23
|
-
MEDIUM_COELI = "Medium_Coeli"
|
|
24
|
-
IMUM_COELI = "Imum_Coeli"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
class Aspects(Enum):
|
|
28
|
-
CONJUNCTION = "Conjunction"
|
|
29
|
-
SEXTILE = "Sextile"
|
|
30
|
-
SEMI_SEXTILE = "Semi-Sextile"
|
|
31
|
-
SQUARE = "Square"
|
|
32
|
-
TRINE = "Trine"
|
|
33
|
-
OPPOSITION = "Opposition"
|
|
34
|
-
QUINCUNX = "Quincunx"
|
|
35
|
-
NONE = None
|
|
36
|
-
QUINTILE = "Quintile"
|
|
37
|
-
BIQUINTILE = "Biquintile"
|
|
38
|
-
OCTILE = "Octile"
|
|
39
|
-
TRIOCTILE = "Trioctile"
|
|
40
|
-
DECILE = "Decile"
|
|
41
|
-
TRIDECILE = "Tridecile"
|
|
42
|
-
SESQUIQUADRATE = "Sesquiquadrate"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
class Signs(Enum):
|
|
46
|
-
ARI = "Ari"
|
|
47
|
-
TAU = "Tau"
|
|
48
|
-
GEM = "Gem"
|
|
49
|
-
CAN = "Can"
|
|
50
|
-
LEO = "Leo"
|
|
51
|
-
VIR = "Vir"
|
|
52
|
-
LIB = "Lib"
|
|
53
|
-
SCO = "Sco"
|
|
54
|
-
SAG = "Sag"
|
|
55
|
-
CAP = "Cap"
|
|
56
|
-
AQU = "Aqu"
|
|
57
|
-
PIS = "Pis"
|
kerykeion/ephemeris_data.py
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
from kerykeion import AstrologicalSubjectFactory
|
|
2
|
-
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
|
|
3
|
-
from kerykeion.utilities import get_houses_list, get_available_astrological_points_list
|
|
4
|
-
from kerykeion.astrological_subject_factory import DEFAULT_HOUSES_SYSTEM_IDENTIFIER, DEFAULT_PERSPECTIVE_TYPE, DEFAULT_ZODIAC_TYPE
|
|
5
|
-
from kerykeion.kr_types import EphemerisDictModel
|
|
6
|
-
from kerykeion.kr_types import SiderealMode, HousesSystemIdentifier, PerspectiveType, ZodiacType
|
|
7
|
-
from datetime import datetime, timedelta
|
|
8
|
-
from typing import Literal, Union, List
|
|
9
|
-
import logging
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class EphemerisDataFactory:
|
|
13
|
-
"""
|
|
14
|
-
This class is used to generate ephemeris data for a given date range.
|
|
15
|
-
|
|
16
|
-
Parameters:
|
|
17
|
-
- start_datetime: datetime object representing the start date and time.
|
|
18
|
-
- end_datetime: datetime object representing the end date and time.
|
|
19
|
-
- step_type: string representing the step type. It can be "days", "hours", or "minutes". Default is "days".
|
|
20
|
-
- step: integer representing the step value. Default is 1.
|
|
21
|
-
- lat: float representing the latitude. Default is 51.4769 (Greenwich).
|
|
22
|
-
- lng: float representing the longitude. Default is 0.0005 (Greenwich).
|
|
23
|
-
- tz_str: string representing the timezone. Default is "Etc/UTC".
|
|
24
|
-
- is_dst: boolean representing if daylight saving time is active. Default is False.
|
|
25
|
-
- zodiac_type: ZodiacType object representing the zodiac type. Default is DEFAULT_ZODIAC_TYPE.
|
|
26
|
-
- sidereal_mode: SiderealMode object representing the sidereal mode. Default is None.
|
|
27
|
-
- houses_system_identifier: HousesSystemIdentifier object representing the houses system identifier. Default is DEFAULT_HOUSES_SYSTEM_IDENTIFIER.
|
|
28
|
-
- perspective_type: PerspectiveType object representing the perspective type. Default is DEFAULT_PERSPECTIVE_TYPE.
|
|
29
|
-
- max_days: integer representing the maximum number of days.
|
|
30
|
-
Set it to None to disable the check. Default is 730.
|
|
31
|
-
- max_hours: integer representing the maximum number of hours.
|
|
32
|
-
Set it to None to disable the check. Default is 8760.
|
|
33
|
-
- max_minutes: integer representing the maximum number of minutes.
|
|
34
|
-
Set it to None to disable the check. Default is 525600.
|
|
35
|
-
|
|
36
|
-
Raises:
|
|
37
|
-
- ValueError: if the step type is invalid.
|
|
38
|
-
- ValueError: if the number of days, hours, or minutes is greater than the maximum allowed.
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
|
-
def __init__(
|
|
42
|
-
self,
|
|
43
|
-
start_datetime: datetime,
|
|
44
|
-
end_datetime: datetime,
|
|
45
|
-
step_type: Literal["days", "hours", "minutes"] = "days",
|
|
46
|
-
step: int = 1,
|
|
47
|
-
lat: float = 51.4769,
|
|
48
|
-
lng: float = 0.0005,
|
|
49
|
-
tz_str: str = "Etc/UTC",
|
|
50
|
-
is_dst: bool = False,
|
|
51
|
-
zodiac_type: ZodiacType = DEFAULT_ZODIAC_TYPE,
|
|
52
|
-
sidereal_mode: Union[SiderealMode, None] = None,
|
|
53
|
-
houses_system_identifier: HousesSystemIdentifier = DEFAULT_HOUSES_SYSTEM_IDENTIFIER,
|
|
54
|
-
perspective_type: PerspectiveType = DEFAULT_PERSPECTIVE_TYPE,
|
|
55
|
-
max_days: Union[int, None] = 730,
|
|
56
|
-
max_hours: Union[int, None] = 8760,
|
|
57
|
-
max_minutes: Union[int, None] = 525600,
|
|
58
|
-
):
|
|
59
|
-
self.start_datetime = start_datetime
|
|
60
|
-
self.end_datetime = end_datetime
|
|
61
|
-
self.step_type = step_type
|
|
62
|
-
self.step = step
|
|
63
|
-
self.lat = lat
|
|
64
|
-
self.lng = lng
|
|
65
|
-
self.tz_str = tz_str
|
|
66
|
-
self.is_dst = is_dst
|
|
67
|
-
self.zodiac_type = zodiac_type
|
|
68
|
-
self.sidereal_mode = sidereal_mode
|
|
69
|
-
self.houses_system_identifier = houses_system_identifier
|
|
70
|
-
self.perspective_type = perspective_type
|
|
71
|
-
self.max_days = max_days
|
|
72
|
-
self.max_hours = max_hours
|
|
73
|
-
self.max_minutes = max_minutes
|
|
74
|
-
|
|
75
|
-
self.dates_list = []
|
|
76
|
-
if self.step_type == "days":
|
|
77
|
-
self.dates_list = [self.start_datetime + timedelta(days=i * self.step) for i in range((self.end_datetime - self.start_datetime).days // self.step + 1)]
|
|
78
|
-
if max_days and (len(self.dates_list) > max_days):
|
|
79
|
-
raise ValueError(f"Too many days: {len(self.dates_list)} > {self.max_days}. To prevent this error, set max_days to a higher value or reduce the date range.")
|
|
80
|
-
|
|
81
|
-
elif self.step_type == "hours":
|
|
82
|
-
hours_diff = (self.end_datetime - self.start_datetime).total_seconds() / 3600
|
|
83
|
-
self.dates_list = [self.start_datetime + timedelta(hours=i * self.step) for i in range(int(hours_diff) // self.step + 1)]
|
|
84
|
-
if max_hours and (len(self.dates_list) > max_hours):
|
|
85
|
-
raise ValueError(f"Too many hours: {len(self.dates_list)} > {self.max_hours}. To prevent this error, set max_hours to a higher value or reduce the date range.")
|
|
86
|
-
|
|
87
|
-
elif self.step_type == "minutes":
|
|
88
|
-
minutes_diff = (self.end_datetime - self.start_datetime).total_seconds() / 60
|
|
89
|
-
self.dates_list = [self.start_datetime + timedelta(minutes=i * self.step) for i in range(int(minutes_diff) // self.step + 1)]
|
|
90
|
-
if max_minutes and (len(self.dates_list) > max_minutes):
|
|
91
|
-
raise ValueError(f"Too many minutes: {len(self.dates_list)} > {self.max_minutes}. To prevent this error, set max_minutes to a higher value or reduce the date range.")
|
|
92
|
-
|
|
93
|
-
else:
|
|
94
|
-
raise ValueError(f"Invalid step type: {self.step_type}")
|
|
95
|
-
|
|
96
|
-
if not self.dates_list:
|
|
97
|
-
raise ValueError("No dates found. Check the date range and step values.")
|
|
98
|
-
|
|
99
|
-
if len(self.dates_list) > 1000:
|
|
100
|
-
logging.warning(f"Large number of dates: {len(self.dates_list)}. The calculation may take a while.")
|
|
101
|
-
|
|
102
|
-
def get_ephemeris_data(self, as_model: bool = False) -> list:
|
|
103
|
-
"""
|
|
104
|
-
Generate ephemeris data for the specified date range.
|
|
105
|
-
The data is structured as a list of dictionaries, where each dictionary contains the date, planets, and houses data.
|
|
106
|
-
Example:
|
|
107
|
-
[
|
|
108
|
-
{
|
|
109
|
-
"date": "2020-01-01T00:00:00",
|
|
110
|
-
"planets": [{...}, {...}, ...],
|
|
111
|
-
"houses": [{...}, {...}, ...]
|
|
112
|
-
},
|
|
113
|
-
...
|
|
114
|
-
]
|
|
115
|
-
|
|
116
|
-
Args:
|
|
117
|
-
- as_model (bool): If True, the ephemeris data will be returned as model instances. Default is False.
|
|
118
|
-
|
|
119
|
-
Returns:
|
|
120
|
-
- list: A list of dictionaries representing the ephemeris data. If as_model is True, a list of EphemerisDictModel instances is returned.
|
|
121
|
-
"""
|
|
122
|
-
ephemeris_data_list = []
|
|
123
|
-
for date in self.dates_list:
|
|
124
|
-
subject = AstrologicalSubjectFactory.from_birth_data(
|
|
125
|
-
year=date.year,
|
|
126
|
-
month=date.month,
|
|
127
|
-
day=date.day,
|
|
128
|
-
hour=date.hour,
|
|
129
|
-
minute=date.minute,
|
|
130
|
-
lng=self.lng,
|
|
131
|
-
lat=self.lat,
|
|
132
|
-
tz_str=self.tz_str,
|
|
133
|
-
city="Placeholder",
|
|
134
|
-
nation="Placeholder",
|
|
135
|
-
online=False,
|
|
136
|
-
zodiac_type=self.zodiac_type,
|
|
137
|
-
sidereal_mode=self.sidereal_mode,
|
|
138
|
-
houses_system_identifier=self.houses_system_identifier,
|
|
139
|
-
perspective_type=self.perspective_type,
|
|
140
|
-
is_dst=self.is_dst,
|
|
141
|
-
)
|
|
142
|
-
|
|
143
|
-
houses_list = get_houses_list(subject)
|
|
144
|
-
available_planets = get_available_astrological_points_list(subject)
|
|
145
|
-
|
|
146
|
-
ephemeris_data_list.append({"date": date.isoformat(), "planets": available_planets, "houses": houses_list})
|
|
147
|
-
|
|
148
|
-
if as_model:
|
|
149
|
-
return [EphemerisDictModel(**data) for data in ephemeris_data_list]
|
|
150
|
-
|
|
151
|
-
return ephemeris_data_list
|
|
152
|
-
|
|
153
|
-
def get_ephemeris_data_as_astrological_subjects(self, as_model: bool = False) -> List[AstrologicalSubjectModel]:
|
|
154
|
-
"""
|
|
155
|
-
Generate ephemeris data for the specified date range as AstrologicalSubject instances.
|
|
156
|
-
|
|
157
|
-
This method creates a complete AstrologicalSubject object for each date in the date range,
|
|
158
|
-
allowing direct access to all properties and methods of the AstrologicalSubject class.
|
|
159
|
-
|
|
160
|
-
Args:
|
|
161
|
-
- as_model (bool): If True, the AstrologicalSubject instances will be returned as model instances. Default is False.
|
|
162
|
-
|
|
163
|
-
Returns:
|
|
164
|
-
- List[AstrologicalSubject]: A list of AstrologicalSubject instances, one for each date in the date range.
|
|
165
|
-
|
|
166
|
-
Example usage:
|
|
167
|
-
subjects = factory.get_ephemeris_data_as_astrological_subjects()
|
|
168
|
-
# Access methods and properties of the first subject
|
|
169
|
-
sun_position = subjects[0].get_sun()
|
|
170
|
-
all_points = subjects[0].get_all_points()
|
|
171
|
-
chart_drawing = subjects[0].draw_chart()
|
|
172
|
-
"""
|
|
173
|
-
subjects_list = []
|
|
174
|
-
for date in self.dates_list:
|
|
175
|
-
subject = AstrologicalSubjectFactory.from_birth_data(
|
|
176
|
-
year=date.year,
|
|
177
|
-
month=date.month,
|
|
178
|
-
day=date.day,
|
|
179
|
-
hour=date.hour,
|
|
180
|
-
minute=date.minute,
|
|
181
|
-
lng=self.lng,
|
|
182
|
-
lat=self.lat,
|
|
183
|
-
tz_str=self.tz_str,
|
|
184
|
-
city="Placeholder",
|
|
185
|
-
nation="Placeholder",
|
|
186
|
-
online=False,
|
|
187
|
-
zodiac_type=self.zodiac_type,
|
|
188
|
-
sidereal_mode=self.sidereal_mode,
|
|
189
|
-
houses_system_identifier=self.houses_system_identifier,
|
|
190
|
-
perspective_type=self.perspective_type,
|
|
191
|
-
is_dst=self.is_dst,
|
|
192
|
-
)
|
|
193
|
-
|
|
194
|
-
if as_model:
|
|
195
|
-
subjects_list.append(subject.model())
|
|
196
|
-
else:
|
|
197
|
-
subjects_list.append(subject)
|
|
198
|
-
|
|
199
|
-
return subjects_list
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
if "__main__" == __name__:
|
|
203
|
-
start_date = datetime.fromisoformat("2020-01-01")
|
|
204
|
-
end_date = datetime.fromisoformat("2020-01-03")
|
|
205
|
-
|
|
206
|
-
factory = EphemerisDataFactory(
|
|
207
|
-
start_datetime=start_date,
|
|
208
|
-
end_datetime=end_date,
|
|
209
|
-
step_type="minutes",
|
|
210
|
-
step=60, # One hour intervals to make the example more manageable
|
|
211
|
-
lat=37.9838,
|
|
212
|
-
lng=23.7275,
|
|
213
|
-
tz_str="Europe/Athens",
|
|
214
|
-
is_dst=False,
|
|
215
|
-
max_hours=None,
|
|
216
|
-
max_minutes=None,
|
|
217
|
-
max_days=None,
|
|
218
|
-
)
|
|
219
|
-
|
|
220
|
-
# Test original method
|
|
221
|
-
ephemeris_data = factory.get_ephemeris_data(as_model=True)
|
|
222
|
-
print(f"Number of ephemeris data points: {len(ephemeris_data)}")
|
|
223
|
-
print(f"First data point date: {ephemeris_data[0].date}")
|
|
224
|
-
|
|
225
|
-
# Test new method
|
|
226
|
-
subjects = factory.get_ephemeris_data_as_astrological_subjects()
|
|
227
|
-
print(f"Number of astrological subjects: {len(subjects)}")
|
|
228
|
-
print(f"First subject sun position: {subjects[0].sun}")
|
|
229
|
-
|
|
230
|
-
# Example of accessing more data from the first subject
|
|
231
|
-
first_subject = subjects[0]
|
|
232
|
-
print(f"Sun sign: {first_subject.sun['sign']}")
|
|
233
|
-
|
|
234
|
-
# Compare sun positions from both methods
|
|
235
|
-
for i in range(min(3, len(subjects))):
|
|
236
|
-
print(f"Date: {ephemeris_data[i].date}")
|
|
237
|
-
print(f"Sun position from dict: {ephemeris_data[i].planets[0]['abs_pos']}")
|
|
238
|
-
print("---")
|
kerykeion/transits_time_range.py
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
from typing import Optional, Union, List
|
|
2
|
-
from datetime import datetime, timedelta
|
|
3
|
-
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
|
|
4
|
-
from kerykeion.astrological_subject_factory import AstrologicalSubjectFactory
|
|
5
|
-
from kerykeion.aspects import SynastryAspects
|
|
6
|
-
from kerykeion.ephemeris_data import EphemerisDataFactory
|
|
7
|
-
from kerykeion.kr_types.kr_literals import AstrologicalPoint
|
|
8
|
-
from kerykeion.kr_types.kr_models import ActiveAspect, TransitMomentModel, TransitsTimeRangeModel
|
|
9
|
-
from kerykeion.kr_types.settings_models import KerykeionSettingsModel
|
|
10
|
-
from kerykeion.settings.config_constants import DEFAULT_ACTIVE_POINTS, DEFAULT_ACTIVE_ASPECTS
|
|
11
|
-
from pathlib import Path
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class TransitsTimeRangeFactory:
|
|
15
|
-
"""
|
|
16
|
-
Factory class for generating astrological transit data over a period of time.
|
|
17
|
-
|
|
18
|
-
This class compares the positions of celestial bodies at different points in time
|
|
19
|
-
with the natal chart of an astrological subject to identify significant aspects
|
|
20
|
-
and produces structured models containing the transit data.
|
|
21
|
-
|
|
22
|
-
Attributes:
|
|
23
|
-
natal_chart: The natal chart of the subject for whom transits are calculated.
|
|
24
|
-
ephemeris_data_points: List of ephemeris data points representing planetary positions at different times.
|
|
25
|
-
active_points: List of celestial points to consider when calculating aspects.
|
|
26
|
-
active_aspects: List of aspect types to consider when analyzing planetary relationships.
|
|
27
|
-
settings_file: Path to the settings file or a KerykeionSettingsModel object.
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
def __init__(
|
|
31
|
-
self,
|
|
32
|
-
natal_chart: AstrologicalSubjectModel,
|
|
33
|
-
ephemeris_data_points: List[AstrologicalSubjectModel],
|
|
34
|
-
active_points: List[AstrologicalPoint] = DEFAULT_ACTIVE_POINTS,
|
|
35
|
-
active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
|
|
36
|
-
settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None,
|
|
37
|
-
):
|
|
38
|
-
"""
|
|
39
|
-
Initialize the TransitMomentsFactory with the necessary data.
|
|
40
|
-
|
|
41
|
-
Args:
|
|
42
|
-
natal_chart: The natal chart of the subject for whom transits are calculated.
|
|
43
|
-
ephemeris_data_points: List of ephemeris data points representing planetary positions at different times.
|
|
44
|
-
active_points: List of celestial points to consider when calculating aspects.
|
|
45
|
-
active_aspects: List of aspect types to consider when analyzing planetary relationships.
|
|
46
|
-
settings_file: Path to the settings file or a KerykeionSettingsModel object.
|
|
47
|
-
"""
|
|
48
|
-
self.natal_chart = natal_chart
|
|
49
|
-
self.ephemeris_data_points = ephemeris_data_points
|
|
50
|
-
self.active_points = active_points
|
|
51
|
-
self.active_aspects = active_aspects
|
|
52
|
-
self.settings_file = settings_file
|
|
53
|
-
|
|
54
|
-
def get_transit_moments(self) -> TransitsTimeRangeModel:
|
|
55
|
-
"""
|
|
56
|
-
Generate a model of transit moments for the given subject across all ephemeris data points.
|
|
57
|
-
|
|
58
|
-
This method compares the positions of celestial bodies at different points in time
|
|
59
|
-
with the natal chart of the subject to identify significant aspects and
|
|
60
|
-
compiles them into a structured model for analysis.
|
|
61
|
-
|
|
62
|
-
Returns:
|
|
63
|
-
TransitMomentsListModel: A model containing all transit data, including aspects,
|
|
64
|
-
dates, and subject information.
|
|
65
|
-
"""
|
|
66
|
-
transit_moments = []
|
|
67
|
-
|
|
68
|
-
for ephemeris_point in self.ephemeris_data_points:
|
|
69
|
-
# Calculate aspects between transit positions and natal chart
|
|
70
|
-
aspects = SynastryAspects(
|
|
71
|
-
ephemeris_point,
|
|
72
|
-
self.natal_chart,
|
|
73
|
-
active_points=self.active_points,
|
|
74
|
-
active_aspects=self.active_aspects,
|
|
75
|
-
new_settings_file=self.settings_file,
|
|
76
|
-
).relevant_aspects
|
|
77
|
-
|
|
78
|
-
# Create a transit moment for this point in time
|
|
79
|
-
transit_moments.append(
|
|
80
|
-
TransitMomentModel(
|
|
81
|
-
date=ephemeris_point.iso_formatted_utc_datetime,
|
|
82
|
-
aspects=aspects,
|
|
83
|
-
)
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
# Create and return the complete transits model
|
|
87
|
-
return TransitsTimeRangeModel(
|
|
88
|
-
dates=[point.iso_formatted_utc_datetime for point in self.ephemeris_data_points],
|
|
89
|
-
subject=self.natal_chart.model(),
|
|
90
|
-
transits=transit_moments
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if __name__ == "__main__":
|
|
95
|
-
# Create a natal chart for the subject
|
|
96
|
-
person = AstrologicalSubjectFactory.from_birth_data(
|
|
97
|
-
"Johnny Depp", 1963, 6, 9, 20, 15, "Owensboro", "US"
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
# Define the time period for transit calculation
|
|
101
|
-
start_date = datetime.now()
|
|
102
|
-
end_date = datetime.now() + timedelta(days=30)
|
|
103
|
-
|
|
104
|
-
# Create ephemeris data for the specified time period
|
|
105
|
-
ephemeris_factory = EphemerisDataFactory(
|
|
106
|
-
start_datetime=start_date,
|
|
107
|
-
end_datetime=end_date,
|
|
108
|
-
step_type="days",
|
|
109
|
-
step=1,
|
|
110
|
-
lat=person.lat,
|
|
111
|
-
lng=person.lng,
|
|
112
|
-
tz_str=person.tz_str,
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
ephemeris_data_points = ephemeris_factory.get_ephemeris_data_as_astrological_subjects()
|
|
116
|
-
|
|
117
|
-
# Calculate transits for the subject
|
|
118
|
-
transit_factory = TransitsTimeRangeFactory(
|
|
119
|
-
natal_chart=person,
|
|
120
|
-
ephemeris_data_points=ephemeris_data_points,
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
transit_results = transit_factory.get_transit_moments()
|
|
124
|
-
|
|
125
|
-
# Print example data
|
|
126
|
-
print(transit_results.model_dump()["dates"][2])
|
|
127
|
-
print(transit_results.model_dump()["transits"][2]['date'])
|
|
128
|
-
print(transit_results.model_dump()["transits"][2]['aspects'][0])
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
kerykeion/__init__.py,sha256=18VYgL_5JcB3JwzfICoHxtQTqzwlgUXHY5j4HG2gjZQ,920
|
|
2
|
-
kerykeion/astrological_subject_factory.py,sha256=z8ehPW6_wT6fwayxAmST0oSdLMM1pAmHXuwncSF_A20,52340
|
|
3
|
-
kerykeion/composite_subject_factory.py,sha256=d3omKRw7AlJFQVrOa1nBOu9jQx7W-2UrL8V7TKyVXHg,7551
|
|
4
|
-
kerykeion/enums.py,sha256=nPXgP_ocsRnRno5H-yunZy3fp-hLZ9aYRaUb-2gBdvw,1199
|
|
5
|
-
kerykeion/ephemeris_data.py,sha256=h56Y4FCTYPcIzSnDiKNXYzEpeiqU554ccUmfXENigls,10750
|
|
6
|
-
kerykeion/fetch_geonames.py,sha256=e66Nh6yq9A4VjnuvVSiV1TW1IkJ9m3Q2LKPWrkOGgO0,4764
|
|
7
|
-
kerykeion/planetary_return_factory.py,sha256=Y3jMHsI1epuBC4N3Mto0mubVE8BIT89dBh15eOATg2Y,11449
|
|
8
|
-
kerykeion/relationship_score_factory.py,sha256=g0RL1sx_LsMlfX1XVDf-z2LrlZ_SAL_1C0kuOGhKhsA,8495
|
|
9
|
-
kerykeion/report.py,sha256=w4KNQz0ADPPXE60PX6NVTxjppZ9q_naSbgYKQiX6Epk,2827
|
|
10
|
-
kerykeion/transits_time_range.py,sha256=iJSkXcNKJBcfrN8gN9P0xGKLsRBwJs-mMuAtPsvUqNE,5505
|
|
11
|
-
kerykeion/utilities.py,sha256=mD-oPKlbpwyXv5CXOS4aS6e6u0fFYl2lf9ptUr06jxs,22217
|
|
12
|
-
kerykeion/aspects/__init__.py,sha256=9kx_Rx1NJx5SM7nDCSbI79S1neZ3c-q2NvQr-S6A9PY,292
|
|
13
|
-
kerykeion/aspects/aspects_utils.py,sha256=NgxdeKd9CAPbzFlLe-yr9RFumM0Cc0kfWEONYREOFJ4,3252
|
|
14
|
-
kerykeion/aspects/natal_aspects.py,sha256=SfI3ferjtyV47fBG6q3q1aczc-GFOwN4P7WpyZTgPSA,7269
|
|
15
|
-
kerykeion/aspects/synastry_aspects.py,sha256=4ZBiFrbyyXxclnyaEIBeLJQO3uQVnpsqvI5Kj3-ijuI,5979
|
|
16
|
-
kerykeion/aspects/transits_time_range.py,sha256=E03BJYcNK3kO30EC96Ys2EaH-EDyZF2nj4C7_LcFrOk,1182
|
|
17
|
-
kerykeion/charts/__init__.py,sha256=i9NMZ7LdkllPlqQSi1or9gTobHbROGDKmJhBDO4R0mA,128
|
|
18
|
-
kerykeion/charts/charts_utils.py,sha256=mzYO_MYht9Gur8hMm2TbIZ1NfvNdl3FsBy4fl1qPOek,62948
|
|
19
|
-
kerykeion/charts/draw_planets.py,sha256=dbVCA4MFs7ChZKH4w1eErBiF_mluuxAD4fouBrXs-x0,17696
|
|
20
|
-
kerykeion/charts/draw_planets_v2.py,sha256=ft0KjngCIfYKNGlZ4cv7apX9V6uyHetIVOxbNRzEmWU,28210
|
|
21
|
-
kerykeion/charts/draw_planets_v3.py,sha256=3nrpef56qBsc0hfCOGdfCOr-61C2c5aWcRSiBcQiAuo,25811
|
|
22
|
-
kerykeion/charts/kerykeion_chart_svg.py,sha256=VHrTJZY8ETAiWPnhjCKGtRmhoa4f6-M5vLBgI14Jx20,97622
|
|
23
|
-
kerykeion/charts/templates/aspect_grid_only.xml,sha256=lBHBj5bS5klGnv7QMuFxQjhlE6VZRaOgW93akLgRjX4,70055
|
|
24
|
-
kerykeion/charts/templates/chart.xml,sha256=r3a_csMqcoqeOnDA3YCD-iUxdqgRw5GV1GOf1Cp0e_E,79940
|
|
25
|
-
kerykeion/charts/templates/wheel_only.xml,sha256=0P8kpdsmKdFFso892v5r5WTp4GZSZApgh4mj4BTDNkg,71388
|
|
26
|
-
kerykeion/charts/themes/classic.css,sha256=LYYYWQHNG7-vuPCq8F2EPl3LauWXVrY3Q_tpwM0klgo,4660
|
|
27
|
-
kerykeion/charts/themes/dark-high-contrast.css,sha256=YW5X5-M0dz5Vy2oz-JyDNXJYHSmV83lYCodydC-KS1A,7506
|
|
28
|
-
kerykeion/charts/themes/dark.css,sha256=XVspznDRNMXsFzk7hY7IB7AI58alPAV_-CgV3gCKyzg,7581
|
|
29
|
-
kerykeion/charts/themes/light.css,sha256=5eyUzhVlRjG6lPHKnprLum0HuRtPIJhMBzpGfzoTjnQ,7590
|
|
30
|
-
kerykeion/charts/themes/strawberry.css,sha256=UtcfRsCT-M9OZs_SoclWGZ0jDJiWvQjHTeI4M1jf7pQ,8314
|
|
31
|
-
kerykeion/house_comparison/__init__.py,sha256=FQutYoG1T_ljkjJ0OAFvkeH8rASwMK7ieCpH_hDFJWU,139
|
|
32
|
-
kerykeion/house_comparison/house_comparison_factory.py,sha256=R3O3R786yH6W2c8cKma8P7FNXU6JGl29omRHmucNN_Q,3369
|
|
33
|
-
kerykeion/house_comparison/house_comparison_models.py,sha256=R9EW5F3fiIKIm8qrwTxtXhNOGDpf1-Lh9hbM1uK83oE,1549
|
|
34
|
-
kerykeion/house_comparison/house_comparison_utils.py,sha256=BXDXmxeLSwEDbum-APNzdwK3FjweCEaoY_Z3V1kGMIk,3851
|
|
35
|
-
kerykeion/kr_types/__init__.py,sha256=jshJOccCQcYZuoOvrILRZH6imy4RBvKpFPujlNLFyGE,295
|
|
36
|
-
kerykeion/kr_types/chart_types.py,sha256=ofMYk7NRalSsdQcLVkpCbOb-dhdjYHEqIb_WPLtD0rM,2429
|
|
37
|
-
kerykeion/kr_types/kerykeion_exception.py,sha256=kE1y0K0rmuz32b4K_ZppSsZ59I2Get0ZkvOkTE5HejI,314
|
|
38
|
-
kerykeion/kr_types/kr_literals.py,sha256=4kJhzm_0LERiJEJks0KgDyThueMZj_F1OK2Far5SMZc,4870
|
|
39
|
-
kerykeion/kr_types/kr_models.py,sha256=nzq8no2dBd4b529ybznF46_VUEvDj5ZdDdlLRBE0RmM,8835
|
|
40
|
-
kerykeion/kr_types/settings_models.py,sha256=qKlcn-Go1dAhC7oMFY_saogNcRa4WvKSewyvsKZt2S0,16604
|
|
41
|
-
kerykeion/settings/__init__.py,sha256=QQNFCl7sgN27MKaVscqtpPk10HGz4wZS3I_7KEGMaVA,69
|
|
42
|
-
kerykeion/settings/config_constants.py,sha256=R4fEe4WzRSq3BXqsnfgHj1oe_swkVMx3iGe-C_Zu0mw,1772
|
|
43
|
-
kerykeion/settings/kerykeion_settings.py,sha256=umd8TZy-8ywowsd4TTkhwxSLLyX3xYj3A1zvNsTV_Y8,2955
|
|
44
|
-
kerykeion/settings/kr.config.json,sha256=9p10K7oxt5cDiOJe9bIK4FR2fe8Q18wYejWeKXq8dlA,55328
|
|
45
|
-
kerykeion/settings/legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
|
-
kerykeion/settings/legacy/legacy_celestial_points_settings.py,sha256=YMvHhY8IQ_nNHf1-9JCSgRzTMQJaxXZfROztEhlP4Ac,6870
|
|
47
|
-
kerykeion/settings/legacy/legacy_chart_aspects_settings.py,sha256=tO4tgPgPP07_wu9f8SXyJQ9WrTh3iWz4YvBS2axCGU8,1650
|
|
48
|
-
kerykeion/settings/legacy/legacy_color_settings.py,sha256=gBUmGSNvvLzRYbdVtzwTDnMwWoh4tOCyT_9Q6aQRv_s,2620
|
|
49
|
-
kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
|
|
50
|
-
kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
|
|
51
|
-
kerykeion-5.0.0a9.dist-info/METADATA,sha256=qRC5Lxj1uBxV_AAf3lb0VWXmqT3jmZzo1nD9FaJrOdM,25100
|
|
52
|
-
kerykeion-5.0.0a9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
53
|
-
kerykeion-5.0.0a9.dist-info/entry_points.txt,sha256=j9J6dg4czXFgM3LDOxoWFl8UDU4LLe2bD_U0RgpyLGA,50
|
|
54
|
-
kerykeion-5.0.0a9.dist-info/licenses/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
|
|
55
|
-
kerykeion-5.0.0a9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|