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
|
@@ -1,141 +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 typing import Union
|
|
8
|
-
from functools import cached_property
|
|
9
|
-
from typing import TYPE_CHECKING
|
|
10
|
-
|
|
11
|
-
from kerykeion.astrological_subject_factory import AstrologicalSubjectFactory
|
|
12
|
-
from kerykeion.aspects.natal_aspects import NatalAspects
|
|
13
|
-
from kerykeion.settings.kerykeion_settings import get_settings
|
|
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, CompositeSubjectModel, PlanetReturnModel
|
|
16
|
-
from kerykeion.kr_types.settings_models import KerykeionSettingsModel
|
|
17
|
-
from kerykeion.settings.config_constants import DEFAULT_ACTIVE_ASPECTS, DEFAULT_AXIS_ORBIT
|
|
18
|
-
from kerykeion.settings.legacy.legacy_celestial_points_settings import DEFAULT_CELESTIAL_POINTS_SETTINGS
|
|
19
|
-
from kerykeion.settings.legacy.legacy_chart_aspects_settings import DEFAULT_CHART_ASPECTS_SETTINGS
|
|
20
|
-
from kerykeion.kr_types.kr_literals import AstrologicalPoint
|
|
21
|
-
from kerykeion.utilities import find_common_active_points
|
|
22
|
-
from typing import Union, List, Optional
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class SynastryAspects(NatalAspects):
|
|
26
|
-
"""
|
|
27
|
-
Generates an object with all the aspects between two persons.
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
def __init__(
|
|
31
|
-
self,
|
|
32
|
-
kr_object_one: Union[AstrologicalSubjectModel, CompositeSubjectModel, PlanetReturnModel],
|
|
33
|
-
kr_object_two: Union[AstrologicalSubjectModel, CompositeSubjectModel, PlanetReturnModel],
|
|
34
|
-
new_settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None,
|
|
35
|
-
active_points: Optional[list[AstrologicalPoint]] = None,
|
|
36
|
-
active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
|
|
37
|
-
):
|
|
38
|
-
# Subjects
|
|
39
|
-
self.first_user = kr_object_one
|
|
40
|
-
self.second_user = kr_object_two
|
|
41
|
-
|
|
42
|
-
# Settings
|
|
43
|
-
self.new_settings_file = new_settings_file
|
|
44
|
-
self.settings = get_settings(self.new_settings_file)
|
|
45
|
-
|
|
46
|
-
self.celestial_points = DEFAULT_CELESTIAL_POINTS_SETTINGS
|
|
47
|
-
self.aspects_settings = DEFAULT_CHART_ASPECTS_SETTINGS
|
|
48
|
-
self.axes_orbit_settings = DEFAULT_AXIS_ORBIT
|
|
49
|
-
self.active_points = active_points
|
|
50
|
-
self.active_aspects = active_aspects
|
|
51
|
-
|
|
52
|
-
# Private variables of the aspects
|
|
53
|
-
self._all_aspects: Union[list, None] = None
|
|
54
|
-
self._relevant_aspects: Union[list, None] = None
|
|
55
|
-
|
|
56
|
-
if not self.active_points:
|
|
57
|
-
self.active_points = self.first_user.active_points
|
|
58
|
-
else:
|
|
59
|
-
self.active_points = find_common_active_points(
|
|
60
|
-
self.first_user.active_points,
|
|
61
|
-
self.active_points,
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
self.active_points = find_common_active_points(
|
|
65
|
-
self.second_user.active_points,
|
|
66
|
-
self.active_points,
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
@cached_property
|
|
70
|
-
def all_aspects(self):
|
|
71
|
-
"""
|
|
72
|
-
Return all the aspects of the points in the natal chart in a dictionary,
|
|
73
|
-
first all the individual aspects of each planet, second the aspects
|
|
74
|
-
whiteout repetitions.
|
|
75
|
-
"""
|
|
76
|
-
|
|
77
|
-
if self._all_aspects is not None:
|
|
78
|
-
return self._all_aspects
|
|
79
|
-
|
|
80
|
-
# Celestial Points Lists
|
|
81
|
-
first_active_points_list = get_active_points_list(self.first_user, self.active_points)
|
|
82
|
-
second_active_points_list = get_active_points_list(self.second_user, self.active_points)
|
|
83
|
-
|
|
84
|
-
# ---> TODO: Clean this up
|
|
85
|
-
filtered_settings = []
|
|
86
|
-
for a in self.aspects_settings:
|
|
87
|
-
for aspect in self.active_aspects:
|
|
88
|
-
if a["name"] == aspect["name"]:
|
|
89
|
-
a["orb"] = aspect["orb"] # Assign the aspect's orb
|
|
90
|
-
filtered_settings.append(a)
|
|
91
|
-
self.aspects_settings = filtered_settings
|
|
92
|
-
# <--- TODO: Clean this up
|
|
93
|
-
|
|
94
|
-
self.all_aspects_list = []
|
|
95
|
-
for first in range(len(first_active_points_list)):
|
|
96
|
-
# Generates the aspects list whitout repetitions
|
|
97
|
-
for second in range(len(second_active_points_list)):
|
|
98
|
-
aspect = get_aspect_from_two_points(
|
|
99
|
-
self.aspects_settings,
|
|
100
|
-
first_active_points_list[first]["abs_pos"],
|
|
101
|
-
second_active_points_list[second]["abs_pos"],
|
|
102
|
-
)
|
|
103
|
-
|
|
104
|
-
verdict = aspect["verdict"]
|
|
105
|
-
name = aspect["name"]
|
|
106
|
-
orbit = aspect["orbit"]
|
|
107
|
-
aspect_degrees = aspect["aspect_degrees"]
|
|
108
|
-
diff = aspect["diff"]
|
|
109
|
-
|
|
110
|
-
if verdict == True:
|
|
111
|
-
aspect_model = AspectModel(
|
|
112
|
-
p1_name=first_active_points_list[first]["name"],
|
|
113
|
-
p1_owner=self.first_user.name,
|
|
114
|
-
p1_abs_pos=first_active_points_list[first]["abs_pos"],
|
|
115
|
-
p2_name=second_active_points_list[second]["name"],
|
|
116
|
-
p2_owner=self.second_user.name,
|
|
117
|
-
p2_abs_pos=second_active_points_list[second]["abs_pos"],
|
|
118
|
-
aspect=name,
|
|
119
|
-
orbit=orbit,
|
|
120
|
-
aspect_degrees=aspect_degrees,
|
|
121
|
-
diff=diff,
|
|
122
|
-
p1=planet_id_decoder(self.celestial_points, first_active_points_list[first]["name"]),
|
|
123
|
-
p2=planet_id_decoder(self.celestial_points, second_active_points_list[second]["name"]),
|
|
124
|
-
)
|
|
125
|
-
self.all_aspects_list.append(aspect_model)
|
|
126
|
-
|
|
127
|
-
return self.all_aspects_list
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
if __name__ == "__main__":
|
|
131
|
-
from kerykeion.utilities import setup_logging
|
|
132
|
-
|
|
133
|
-
setup_logging(level="debug")
|
|
134
|
-
|
|
135
|
-
john = AstrologicalSubjectFactory.from_birth_data("John", 1940, 10, 9, 10, 30, "Liverpool", "GB")
|
|
136
|
-
yoko = AstrologicalSubjectFactory.from_birth_data("Yoko", 1933, 2, 18, 10, 30, "Tokyo", "JP")
|
|
137
|
-
|
|
138
|
-
synastry_aspects = SynastryAspects(john, yoko)
|
|
139
|
-
|
|
140
|
-
# All aspects as a list of dictionaries
|
|
141
|
-
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 = AstrologicalSubjectFactory.from_birth_data(
|
|
10
|
-
"Johnny Depp", 1963, 6, 9, 20, 15, 0, "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])
|