kerykeion 4.14.9__py3-none-any.whl → 4.14.11__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/aspects/aspects_utils.py +2 -1
- kerykeion/aspects/natal_aspects.py +2 -1
- kerykeion/aspects/synastry_aspects.py +4 -2
- kerykeion/astrological_subject.py +119 -172
- kerykeion/charts/charts_utils.py +44 -36
- kerykeion/charts/draw_planets.py +2 -1
- kerykeion/charts/kerykeion_chart_svg.py +28 -25
- kerykeion/ephemeris_data.py +5 -1
- kerykeion/kr_types/kr_literals.py +3 -0
- kerykeion/kr_types/kr_models.py +16 -8
- kerykeion/relationship_score.py +5 -4
- kerykeion/report.py +6 -3
- kerykeion/utilities.py +111 -213
- {kerykeion-4.14.9.dist-info → kerykeion-4.14.11.dist-info}/METADATA +1 -1
- kerykeion-4.14.11.dist-info/RECORD +34 -0
- kerykeion-4.14.9.dist-info/RECORD +0 -34
- {kerykeion-4.14.9.dist-info → kerykeion-4.14.11.dist-info}/LICENSE +0 -0
- {kerykeion-4.14.9.dist-info → kerykeion-4.14.11.dist-info}/WHEEL +0 -0
- {kerykeion-4.14.9.dist-info → kerykeion-4.14.11.dist-info}/entry_points.txt +0 -0
kerykeion/charts/charts_utils.py
CHANGED
|
@@ -177,7 +177,7 @@ def draw_zodiac_slice(
|
|
|
177
177
|
offset = 360 - seventh_house_degree_ut
|
|
178
178
|
# check transit
|
|
179
179
|
if chart_type == "Transit" or chart_type == "Synastry":
|
|
180
|
-
dropin = 0
|
|
180
|
+
dropin: Union[int, float] = 0
|
|
181
181
|
else:
|
|
182
182
|
dropin = c1
|
|
183
183
|
slice = f'<path d="M{str(r)},{str(r)} L{str(dropin + sliceToX(num, r - dropin, offset))},{str(dropin + sliceToY(num, r - dropin, offset))} A{str(r - dropin)},{str(r - dropin)} 0 0,0 {str(dropin + sliceToX(num + 1, r - dropin, offset))},{str(dropin + sliceToY(num + 1, r - dropin, offset))} z" style="{style}"/>'
|
|
@@ -273,12 +273,11 @@ def draw_aspect_line(
|
|
|
273
273
|
x2 = sliceToX(0, ar, second_offset) + (r - ar)
|
|
274
274
|
y2 = sliceToY(0, ar, second_offset) + (r - ar)
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
return out
|
|
276
|
+
return (
|
|
277
|
+
f'<g kr:node="Aspect" kr:aspectname="{aspect["aspect"]}" kr:to="{aspect["p1_name"]}" kr:tooriginaldegrees="{aspect["p1_abs_pos"]}" kr:from="{aspect["p2_name"]}" kr:fromoriginaldegrees="{aspect["p2_abs_pos"]}">'
|
|
278
|
+
f'<line class="aspect" x1="{x1}" y1="{y1}" x2="{x2}" y2="{y2}" style="stroke: {color}; stroke-width: 1; stroke-opacity: .9;"/>'
|
|
279
|
+
f"</g>"
|
|
280
|
+
)
|
|
282
281
|
|
|
283
282
|
|
|
284
283
|
def draw_elements_percentages(
|
|
@@ -313,14 +312,14 @@ def draw_elements_percentages(
|
|
|
313
312
|
air_percentage = int(round(100 * air_points / total))
|
|
314
313
|
water_percentage = int(round(100 * water_points / total))
|
|
315
314
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
315
|
+
return (
|
|
316
|
+
f'<g transform="translate(-30,79)">'
|
|
317
|
+
f'<text y="0" style="fill:#ff6600; font-size: 10px;">{fire_label} {str(fire_percentage)}%</text>'
|
|
318
|
+
f'<text y="12" style="fill:#6a2d04; font-size: 10px;">{earth_label} {str(earth_percentage)}%</text>'
|
|
319
|
+
f'<text y="24" style="fill:#6f76d1; font-size: 10px;">{air_label} {str(air_percentage)}%</text>'
|
|
320
|
+
f'<text y="36" style="fill:#630e73; font-size: 10px;">{water_label} {str(water_percentage)}%</text>'
|
|
321
|
+
f"</g>"
|
|
322
|
+
)
|
|
324
323
|
|
|
325
324
|
|
|
326
325
|
def convert_decimal_to_degree_string(dec: float, type="3") -> str:
|
|
@@ -495,7 +494,7 @@ def draw_third_circle(
|
|
|
495
494
|
stroke_color: str,
|
|
496
495
|
fill_color: str,
|
|
497
496
|
chart_type: ChartType,
|
|
498
|
-
c3: Union[int, float
|
|
497
|
+
c3: Union[int, float]
|
|
499
498
|
) -> str:
|
|
500
499
|
"""
|
|
501
500
|
Draws the third circle in an SVG chart.
|
|
@@ -570,7 +569,7 @@ def draw_aspect_grid(stroke_color: str, available_planets_list: list, aspects_li
|
|
|
570
569
|
|
|
571
570
|
def draw_houses_cusps_and_text_number(
|
|
572
571
|
r: Union[int, float],
|
|
573
|
-
|
|
572
|
+
first_subject_houses_list: list[KerykeionPointModel],
|
|
574
573
|
standard_house_cusp_color: str,
|
|
575
574
|
first_house_color: str,
|
|
576
575
|
tenth_house_color: str,
|
|
@@ -579,15 +578,15 @@ def draw_houses_cusps_and_text_number(
|
|
|
579
578
|
c1: Union[int, float],
|
|
580
579
|
c3: Union[int, float],
|
|
581
580
|
chart_type: ChartType,
|
|
582
|
-
|
|
583
|
-
transit_house_cusp_color: str = None,
|
|
581
|
+
second_subject_houses_list: Union[list[KerykeionPointModel], None] = None,
|
|
582
|
+
transit_house_cusp_color: Union[str, None] = None,
|
|
584
583
|
) -> str:
|
|
585
584
|
"""
|
|
586
585
|
Draws the houses cusps and text numbers for a given chart type.
|
|
587
586
|
|
|
588
587
|
Parameters:
|
|
589
588
|
- r: Radius of the chart.
|
|
590
|
-
-
|
|
589
|
+
- first_subject_houses_list: List of house for the first subject.
|
|
591
590
|
- standard_house_cusp_color: Default color for house cusps.
|
|
592
591
|
- first_house_color: Color for the first house cusp.
|
|
593
592
|
- tenth_house_color: Color for the tenth house cusp.
|
|
@@ -596,25 +595,22 @@ def draw_houses_cusps_and_text_number(
|
|
|
596
595
|
- c1: Offset for the first subject.
|
|
597
596
|
- c3: Offset for the third subject.
|
|
598
597
|
- chart_type: Type of the chart (e.g., Transit, Synastry).
|
|
599
|
-
-
|
|
598
|
+
- second_subject_houses_list: List of house for the second subject (optional).
|
|
600
599
|
- transit_house_cusp_color: Color for transit house cusps (optional).
|
|
601
600
|
|
|
602
601
|
Returns:
|
|
603
602
|
- A string containing the SVG path for the houses cusps and text numbers.
|
|
604
603
|
"""
|
|
605
|
-
if chart_type in ["Transit", "Synastry"]:
|
|
606
|
-
if second_subject_houses_list_ut is None or transit_house_cusp_color is None:
|
|
607
|
-
raise KerykeionException("second_subject_houses_list_ut or transit_house_cusp_color is None")
|
|
608
604
|
|
|
609
605
|
path = ""
|
|
610
606
|
xr = 12
|
|
611
607
|
|
|
612
608
|
for i in range(xr):
|
|
613
609
|
# Determine offsets based on chart type
|
|
614
|
-
dropin, roff, t_roff = (160, 72, 36) if chart_type in ["Transit", "Synastry"] else (c3, c1,
|
|
610
|
+
dropin, roff, t_roff = (160, 72, 36) if chart_type in ["Transit", "Synastry"] else (c3, c1, False)
|
|
615
611
|
|
|
616
612
|
# Calculate the offset for the current house cusp
|
|
617
|
-
offset = (int(
|
|
613
|
+
offset = (int(first_subject_houses_list[int(xr / 2)].abs_pos) / -1) + int(first_subject_houses_list[i].abs_pos)
|
|
618
614
|
|
|
619
615
|
# Calculate the coordinates for the house cusp lines
|
|
620
616
|
x1 = sliceToX(0, (r - dropin), offset) + dropin
|
|
@@ -625,7 +621,7 @@ def draw_houses_cusps_and_text_number(
|
|
|
625
621
|
# Calculate the text offset for the house number
|
|
626
622
|
next_index = (i + 1) % xr
|
|
627
623
|
text_offset = offset + int(
|
|
628
|
-
degreeDiff(
|
|
624
|
+
degreeDiff(first_subject_houses_list[next_index].abs_pos, first_subject_houses_list[i].abs_pos) / 2
|
|
629
625
|
)
|
|
630
626
|
|
|
631
627
|
# Determine the line color based on the house index
|
|
@@ -634,9 +630,12 @@ def draw_houses_cusps_and_text_number(
|
|
|
634
630
|
)
|
|
635
631
|
|
|
636
632
|
if chart_type in ["Transit", "Synastry"]:
|
|
633
|
+
if second_subject_houses_list is None or transit_house_cusp_color is None:
|
|
634
|
+
raise KerykeionException("second_subject_houses_list_ut or transit_house_cusp_color is None")
|
|
635
|
+
|
|
637
636
|
# Calculate the offset for the second subject's house cusp
|
|
638
|
-
zeropoint = 360 -
|
|
639
|
-
t_offset = (zeropoint +
|
|
637
|
+
zeropoint = 360 - first_subject_houses_list[6].abs_pos
|
|
638
|
+
t_offset = (zeropoint + second_subject_houses_list[i].abs_pos) % 360
|
|
640
639
|
|
|
641
640
|
# Calculate the coordinates for the second subject's house cusp lines
|
|
642
641
|
t_x1 = sliceToX(0, (r - t_roff), t_offset) + t_roff
|
|
@@ -646,7 +645,7 @@ def draw_houses_cusps_and_text_number(
|
|
|
646
645
|
|
|
647
646
|
# Calculate the text offset for the second subject's house number
|
|
648
647
|
t_text_offset = t_offset + int(
|
|
649
|
-
degreeDiff(
|
|
648
|
+
degreeDiff(second_subject_houses_list[next_index].abs_pos, second_subject_houses_list[i].abs_pos) / 2
|
|
650
649
|
)
|
|
651
650
|
t_linecolor = linecolor if i in [0, 9, 6, 3] else transit_house_cusp_color
|
|
652
651
|
xtext = sliceToX(0, (r - 8), t_text_offset) + 8
|
|
@@ -685,8 +684,8 @@ def draw_houses_cusps_and_text_number(
|
|
|
685
684
|
def draw_aspect_transit_grid(
|
|
686
685
|
grid_title: str,
|
|
687
686
|
aspects_list: Union[list[AspectModel], list[dict]],
|
|
688
|
-
celestial_point_language: KerykeionLanguageCelestialPointModel,
|
|
689
|
-
aspects_settings: KerykeionSettingsAspectModel,
|
|
687
|
+
celestial_point_language: Union[KerykeionLanguageCelestialPointModel, dict],
|
|
688
|
+
aspects_settings: Union[KerykeionSettingsAspectModel, dict],
|
|
690
689
|
) -> str:
|
|
691
690
|
"""
|
|
692
691
|
Generates the SVG output for the aspect transit grid.
|
|
@@ -700,10 +699,16 @@ def draw_aspect_transit_grid(
|
|
|
700
699
|
Returns:
|
|
701
700
|
- A string containing the SVG path data for the aspect transit grid.
|
|
702
701
|
"""
|
|
702
|
+
|
|
703
|
+
if isinstance(celestial_point_language, dict):
|
|
704
|
+
celestial_point_language = KerykeionLanguageCelestialPointModel(**celestial_point_language)
|
|
705
|
+
|
|
706
|
+
if isinstance(aspects_settings, dict):
|
|
707
|
+
aspects_settings = KerykeionSettingsAspectModel(**aspects_settings)
|
|
703
708
|
|
|
704
709
|
# If not instance of AspectModel, convert to AspectModel
|
|
705
710
|
if isinstance(aspects_list[0], dict):
|
|
706
|
-
aspects_list = [AspectModel(**aspect) for aspect in aspects_list]
|
|
711
|
+
aspects_list = [AspectModel(**aspect) for aspect in aspects_list] # type: ignore
|
|
707
712
|
|
|
708
713
|
line = 0
|
|
709
714
|
nl = 0
|
|
@@ -890,7 +895,7 @@ def draw_house_grid(
|
|
|
890
895
|
svg_output += '<g transform="translate(850, -20)">'
|
|
891
896
|
line_increment = 10
|
|
892
897
|
|
|
893
|
-
for i, house in enumerate(secondary_subject_houses_list):
|
|
898
|
+
for i, house in enumerate(secondary_subject_houses_list): # type: ignore
|
|
894
899
|
cusp_number = f"  {i + 1}" if i < 9 else str(i + 1)
|
|
895
900
|
svg_output += (
|
|
896
901
|
f'<g transform="translate(0,{line_increment})">'
|
|
@@ -912,8 +917,8 @@ def draw_planet_grid(
|
|
|
912
917
|
available_kerykeion_celestial_points: list[KerykeionPointModel],
|
|
913
918
|
chart_type: ChartType,
|
|
914
919
|
celestial_point_language: KerykeionLanguageCelestialPointModel,
|
|
915
|
-
second_subject_name: str = None,
|
|
916
|
-
second_subject_available_kerykeion_celestial_points: list[KerykeionPointModel] = None,
|
|
920
|
+
second_subject_name: Union[str, None] = None,
|
|
921
|
+
second_subject_available_kerykeion_celestial_points: Union[list[KerykeionPointModel], None] = None,
|
|
917
922
|
text_color: str = "#000000",
|
|
918
923
|
) -> str:
|
|
919
924
|
"""
|
|
@@ -966,6 +971,9 @@ def draw_planet_grid(
|
|
|
966
971
|
line_height += offset_between_lines
|
|
967
972
|
|
|
968
973
|
if chart_type in ["Transit", "Synastry"]:
|
|
974
|
+
if second_subject_available_kerykeion_celestial_points is None:
|
|
975
|
+
raise KerykeionException("second_subject_available_kerykeion_celestial_points is None")
|
|
976
|
+
|
|
969
977
|
if chart_type == "Transit":
|
|
970
978
|
svg_output += (
|
|
971
979
|
f'<g transform="translate(320, -15)">'
|
kerykeion/charts/draw_planets.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# type: ignore
|
|
2
|
+
|
|
1
3
|
from kerykeion.charts.charts_utils import degreeDiff, sliceToX, sliceToY, convert_decimal_to_degree_string
|
|
2
4
|
from kerykeion.kr_types import KerykeionException, ChartType, KerykeionPointModel
|
|
3
5
|
from kerykeion.kr_types.settings_models import KerykeionSettingsCelestialPointModel
|
|
@@ -7,7 +9,6 @@ from typing import Union, get_args
|
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
|
|
10
|
-
|
|
11
12
|
def draw_planets(
|
|
12
13
|
radius: Union[int, float],
|
|
13
14
|
available_kerykeion_celestial_points: list[KerykeionPointModel],
|
|
@@ -13,6 +13,7 @@ from kerykeion.aspects.natal_aspects import NatalAspects
|
|
|
13
13
|
from kerykeion.astrological_subject import AstrologicalSubject
|
|
14
14
|
from kerykeion.kr_types import KerykeionException, ChartType, KerykeionPointModel, Sign
|
|
15
15
|
from kerykeion.kr_types import ChartTemplateDictionary
|
|
16
|
+
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
|
|
16
17
|
from kerykeion.kr_types.settings_models import KerykeionSettingsCelestialPointModel
|
|
17
18
|
from kerykeion.charts.charts_utils import (
|
|
18
19
|
draw_zodiac_slice,
|
|
@@ -33,7 +34,8 @@ from kerykeion.charts.charts_utils import (
|
|
|
33
34
|
draw_house_grid,
|
|
34
35
|
draw_planet_grid,
|
|
35
36
|
)
|
|
36
|
-
from kerykeion.charts.draw_planets import draw_planets
|
|
37
|
+
from kerykeion.charts.draw_planets import draw_planets # type: ignore
|
|
38
|
+
from kerykeion.utilities import get_houses_list
|
|
37
39
|
from pathlib import Path
|
|
38
40
|
from scour.scour import scourString
|
|
39
41
|
from string import Template
|
|
@@ -62,8 +64,8 @@ class KerykeionChartSVG:
|
|
|
62
64
|
_DEFAULT_NATAL_WIDTH = 772.2
|
|
63
65
|
|
|
64
66
|
# Set at init
|
|
65
|
-
first_obj: AstrologicalSubject
|
|
66
|
-
second_obj: Union[AstrologicalSubject, None]
|
|
67
|
+
first_obj: Union[AstrologicalSubject, AstrologicalSubjectModel]
|
|
68
|
+
second_obj: Union[AstrologicalSubject, AstrologicalSubjectModel, None]
|
|
67
69
|
chart_type: ChartType
|
|
68
70
|
new_output_directory: Union[Path, None]
|
|
69
71
|
new_settings_file: Union[Path, None]
|
|
@@ -86,7 +88,7 @@ class KerykeionChartSVG:
|
|
|
86
88
|
aspects_settings: dict
|
|
87
89
|
planet_in_zodiac_extra_points: int
|
|
88
90
|
chart_settings: dict
|
|
89
|
-
user: AstrologicalSubject
|
|
91
|
+
user: Union[AstrologicalSubject, AstrologicalSubjectModel]
|
|
90
92
|
available_planets_setting: List[KerykeionSettingsCelestialPointModel]
|
|
91
93
|
height: float
|
|
92
94
|
location: str
|
|
@@ -96,9 +98,9 @@ class KerykeionChartSVG:
|
|
|
96
98
|
|
|
97
99
|
def __init__(
|
|
98
100
|
self,
|
|
99
|
-
first_obj: AstrologicalSubject,
|
|
101
|
+
first_obj: Union[AstrologicalSubject, AstrologicalSubjectModel],
|
|
100
102
|
chart_type: ChartType = "Natal",
|
|
101
|
-
second_obj: Union[AstrologicalSubject, None] = None,
|
|
103
|
+
second_obj: Union[AstrologicalSubject, AstrologicalSubjectModel, None] = None,
|
|
102
104
|
new_output_directory: Union[str, None] = None,
|
|
103
105
|
new_settings_file: Union[Path, None] = None,
|
|
104
106
|
):
|
|
@@ -167,9 +169,6 @@ class KerykeionChartSVG:
|
|
|
167
169
|
if self.chart_type == "Transit":
|
|
168
170
|
self.t_name = self.language_settings["transit_name"]
|
|
169
171
|
|
|
170
|
-
self.template = None
|
|
171
|
-
|
|
172
|
-
|
|
173
172
|
# Default radius for the chart
|
|
174
173
|
self.main_radius = 240
|
|
175
174
|
|
|
@@ -226,7 +225,7 @@ class KerykeionChartSVG:
|
|
|
226
225
|
output += draw_zodiac_slice(
|
|
227
226
|
c1=self.first_circle_radius,
|
|
228
227
|
chart_type=self.chart_type,
|
|
229
|
-
seventh_house_degree_ut=self.user.
|
|
228
|
+
seventh_house_degree_ut=self.user.seventh_house.abs_pos,
|
|
230
229
|
num=i,
|
|
231
230
|
r=r,
|
|
232
231
|
style=f'fill:{self.chart_colors_settings[f"zodiac_bg_{i}"]}; fill-opacity: 0.5;',
|
|
@@ -342,7 +341,7 @@ class KerykeionChartSVG:
|
|
|
342
341
|
template_dict["degreeRing"] = draw_transit_ring_degree_steps(self.main_radius, self.user.seventh_house.abs_pos)
|
|
343
342
|
template_dict["first_circle"] = draw_first_circle(self.main_radius, self.chart_colors_settings["zodiac_transit_ring_2"], self.chart_type)
|
|
344
343
|
template_dict["second_circle"] = draw_second_circle(self.main_radius, self.chart_colors_settings['zodiac_transit_ring_1'], self.chart_colors_settings['paper_1'], self.chart_type)
|
|
345
|
-
template_dict['third_circle'] = draw_third_circle(self.main_radius, self.chart_colors_settings['zodiac_transit_ring_0'], self.chart_colors_settings['paper_1'], self.chart_type)
|
|
344
|
+
template_dict['third_circle'] = draw_third_circle(self.main_radius, self.chart_colors_settings['zodiac_transit_ring_0'], self.chart_colors_settings['paper_1'], self.chart_type, self.third_circle_radius)
|
|
346
345
|
template_dict["makeAspectGrid"] = draw_aspect_transit_grid(self.language_settings["aspects"], self.aspects_list, self.planets_settings, self.aspects_settings)
|
|
347
346
|
|
|
348
347
|
template_dict["makeAspects"] = self._draw_all_transit_aspects_lines(self.main_radius, self.main_radius - 160)
|
|
@@ -410,24 +409,28 @@ class KerykeionChartSVG:
|
|
|
410
409
|
# Set planet colors
|
|
411
410
|
for planet in self.planets_settings:
|
|
412
411
|
planet_id = planet["id"]
|
|
413
|
-
template_dict[f"planets_color_{planet_id}"] = planet["color"]
|
|
412
|
+
template_dict[f"planets_color_{planet_id}"] = planet["color"] # type: ignore
|
|
414
413
|
|
|
415
414
|
# Set zodiac colors
|
|
416
415
|
for i in range(12):
|
|
417
|
-
template_dict[f"zodiac_color_{i}"] = self.chart_colors_settings[f"zodiac_icon_{i}"]
|
|
416
|
+
template_dict[f"zodiac_color_{i}"] = self.chart_colors_settings[f"zodiac_icon_{i}"] # type: ignore
|
|
418
417
|
|
|
419
418
|
# Set orb colors
|
|
420
419
|
for aspect in self.aspects_settings:
|
|
421
|
-
template_dict[f"orb_color_{aspect['degree']}"] = aspect['color']
|
|
420
|
+
template_dict[f"orb_color_{aspect['degree']}"] = aspect['color'] # type: ignore
|
|
422
421
|
|
|
423
422
|
# Drawing functions
|
|
424
423
|
template_dict["makeZodiac"] = self._draw_zodiac_circle_slices(self.main_radius)
|
|
425
424
|
|
|
425
|
+
first_subject_houses_list = get_houses_list(self.user)
|
|
426
|
+
|
|
426
427
|
# Draw houses grid and cusps
|
|
427
428
|
if self.chart_type in ["Transit", "Synastry"]:
|
|
429
|
+
second_subject_houses_list = get_houses_list(self.t_user)
|
|
430
|
+
|
|
428
431
|
template_dict["makeHousesGrid"] = draw_house_grid(
|
|
429
|
-
main_subject_houses_list=
|
|
430
|
-
secondary_subject_houses_list=
|
|
432
|
+
main_subject_houses_list=first_subject_houses_list,
|
|
433
|
+
secondary_subject_houses_list=second_subject_houses_list,
|
|
431
434
|
chart_type=self.chart_type,
|
|
432
435
|
text_color=self.chart_colors_settings["paper_0"],
|
|
433
436
|
house_cusp_generale_name_label=self.language_settings["cusp"]
|
|
@@ -435,7 +438,7 @@ class KerykeionChartSVG:
|
|
|
435
438
|
|
|
436
439
|
template_dict["makeHouses"] = draw_houses_cusps_and_text_number(
|
|
437
440
|
r=self.main_radius,
|
|
438
|
-
|
|
441
|
+
first_subject_houses_list=first_subject_houses_list,
|
|
439
442
|
standard_house_cusp_color=self.chart_colors_settings["houses_radix_line"],
|
|
440
443
|
first_house_color=self.planets_settings[12]["color"],
|
|
441
444
|
tenth_house_color=self.planets_settings[13]["color"],
|
|
@@ -444,13 +447,13 @@ class KerykeionChartSVG:
|
|
|
444
447
|
c1=self.first_circle_radius,
|
|
445
448
|
c3=self.third_circle_radius,
|
|
446
449
|
chart_type=self.chart_type,
|
|
447
|
-
|
|
450
|
+
second_subject_houses_list=second_subject_houses_list,
|
|
448
451
|
transit_house_cusp_color=self.chart_colors_settings["houses_transit_line"],
|
|
449
452
|
)
|
|
450
453
|
|
|
451
454
|
else:
|
|
452
455
|
template_dict["makeHousesGrid"] = draw_house_grid(
|
|
453
|
-
main_subject_houses_list=
|
|
456
|
+
main_subject_houses_list=first_subject_houses_list,
|
|
454
457
|
chart_type=self.chart_type,
|
|
455
458
|
text_color=self.chart_colors_settings["paper_0"],
|
|
456
459
|
house_cusp_generale_name_label=self.language_settings["cusp"]
|
|
@@ -458,7 +461,7 @@ class KerykeionChartSVG:
|
|
|
458
461
|
|
|
459
462
|
template_dict["makeHouses"] = draw_houses_cusps_and_text_number(
|
|
460
463
|
r=self.main_radius,
|
|
461
|
-
|
|
464
|
+
first_subject_houses_list=first_subject_houses_list,
|
|
462
465
|
standard_house_cusp_color=self.chart_colors_settings["houses_radix_line"],
|
|
463
466
|
first_house_color=self.planets_settings[12]["color"],
|
|
464
467
|
tenth_house_color=self.planets_settings[13]["color"],
|
|
@@ -476,8 +479,8 @@ class KerykeionChartSVG:
|
|
|
476
479
|
available_planets_setting=self.available_planets_setting,
|
|
477
480
|
second_subject_available_kerykeion_celestial_points=self.t_available_kerykeion_celestial_points,
|
|
478
481
|
radius=self.main_radius,
|
|
479
|
-
main_subject_first_house_degree_ut=self.user.
|
|
480
|
-
main_subject_seventh_house_degree_ut=self.user.
|
|
482
|
+
main_subject_first_house_degree_ut=self.user.first_house.abs_pos,
|
|
483
|
+
main_subject_seventh_house_degree_ut=self.user.seventh_house.abs_pos,
|
|
481
484
|
chart_type=self.chart_type,
|
|
482
485
|
third_circle_radius=self.third_circle_radius,
|
|
483
486
|
)
|
|
@@ -488,8 +491,8 @@ class KerykeionChartSVG:
|
|
|
488
491
|
radius=self.main_radius,
|
|
489
492
|
available_kerykeion_celestial_points=self.available_kerykeion_celestial_points,
|
|
490
493
|
third_circle_radius=self.third_circle_radius,
|
|
491
|
-
main_subject_first_house_degree_ut=self.user.
|
|
492
|
-
main_subject_seventh_house_degree_ut=self.user.
|
|
494
|
+
main_subject_first_house_degree_ut=self.user.first_house.abs_pos,
|
|
495
|
+
main_subject_seventh_house_degree_ut=self.user.seventh_house.abs_pos
|
|
493
496
|
)
|
|
494
497
|
|
|
495
498
|
# Draw elements percentages
|
|
@@ -566,7 +569,7 @@ class KerykeionChartSVG:
|
|
|
566
569
|
def makeSVG(self, minify: bool = False):
|
|
567
570
|
"""Prints out the SVG file in the specifide folder"""
|
|
568
571
|
|
|
569
|
-
if not (self
|
|
572
|
+
if not hasattr(self, "template"):
|
|
570
573
|
self.template = self.makeTemplate(minify)
|
|
571
574
|
|
|
572
575
|
self.chartname = self.output_directory / f"{self.user.name} - {self.chart_type} Chart.svg"
|
kerykeion/ephemeris_data.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from kerykeion import AstrologicalSubject
|
|
2
|
+
from kerykeion.utilities import get_houses_list, get_available_planets_list
|
|
2
3
|
from kerykeion.astrological_subject import DEFAULT_HOUSES_SYSTEM_IDENTIFIER, DEFAULT_PERSPECTIVE_TYPE, DEFAULT_ZODIAC_TYPE
|
|
3
4
|
from kerykeion.kr_types import EphemerisDictModel
|
|
4
5
|
from kerykeion.kr_types import SiderealMode, HousesSystemIdentifier, PerspectiveType, ZodiacType
|
|
@@ -133,7 +134,10 @@ class EphemerisDataFactory:
|
|
|
133
134
|
is_dst=self.is_dst,
|
|
134
135
|
)
|
|
135
136
|
|
|
136
|
-
|
|
137
|
+
houses_list = get_houses_list(subject)
|
|
138
|
+
available_planets = get_available_planets_list(subject)
|
|
139
|
+
|
|
140
|
+
ephemeris_data_list.append({"date": date.isoformat(), "planets": available_planets, "houses": houses_list})
|
|
137
141
|
|
|
138
142
|
return ephemeris_data_list
|
|
139
143
|
|
kerykeion/kr_types/kr_models.py
CHANGED
|
@@ -17,11 +17,11 @@ from kerykeion.kr_types import (
|
|
|
17
17
|
Sign,
|
|
18
18
|
ZodiacType,
|
|
19
19
|
SignNumbers,
|
|
20
|
-
HouseNumbers,
|
|
21
20
|
PointType,
|
|
22
21
|
SiderealMode,
|
|
23
22
|
HousesSystemIdentifier,
|
|
24
23
|
Houses,
|
|
24
|
+
SignsEmoji
|
|
25
25
|
)
|
|
26
26
|
|
|
27
27
|
|
|
@@ -39,7 +39,7 @@ class SubscriptableBaseModel(BaseModel):
|
|
|
39
39
|
def __delitem__(self, key):
|
|
40
40
|
delattr(self, key)
|
|
41
41
|
|
|
42
|
-
def get(self, key, default):
|
|
42
|
+
def get(self, key, default = None):
|
|
43
43
|
return getattr(self, key, default)
|
|
44
44
|
|
|
45
45
|
|
|
@@ -130,14 +130,14 @@ class AstrologicalSubjectModel(SubscriptableBaseModel):
|
|
|
130
130
|
mean_node: KerykeionPointModel
|
|
131
131
|
true_node: KerykeionPointModel
|
|
132
132
|
|
|
133
|
-
# Lunar Phase
|
|
134
133
|
lunar_phase: LunarPhaseModel
|
|
134
|
+
"""Lunar phase model"""
|
|
135
|
+
|
|
136
|
+
planets_names_list: list[Planet]
|
|
137
|
+
"""Ordered list of available planets names"""
|
|
135
138
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
# planets_list: list[KerykeionPointModel]
|
|
139
|
-
# planets_degrees_ut: list[float]
|
|
140
|
-
# houses_degree_ut: list[float]
|
|
139
|
+
houses_names_list: list[Houses]
|
|
140
|
+
"""Ordered list of houses names"""
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
class EphemerisDictModel(SubscriptableBaseModel):
|
|
@@ -158,3 +158,11 @@ class AspectModel(SubscriptableBaseModel):
|
|
|
158
158
|
diff: float
|
|
159
159
|
p1: int
|
|
160
160
|
p2: int
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class ZodiacSignModel(SubscriptableBaseModel):
|
|
164
|
+
sign: Sign
|
|
165
|
+
quality: Quality
|
|
166
|
+
element: Element
|
|
167
|
+
emoji: SignsEmoji
|
|
168
|
+
sign_num: SignNumbers
|
kerykeion/relationship_score.py
CHANGED
|
@@ -8,6 +8,7 @@ from kerykeion.aspects.synastry_aspects import SynastryAspects
|
|
|
8
8
|
import logging
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from typing import Union
|
|
11
|
+
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
class RelationshipScore:
|
|
@@ -31,8 +32,8 @@ class RelationshipScore:
|
|
|
31
32
|
|
|
32
33
|
"""
|
|
33
34
|
|
|
34
|
-
first_subject: AstrologicalSubject
|
|
35
|
-
second_subject: AstrologicalSubject
|
|
35
|
+
first_subject: Union[AstrologicalSubject, AstrologicalSubjectModel]
|
|
36
|
+
second_subject: Union[AstrologicalSubject, AstrologicalSubjectModel]
|
|
36
37
|
score: int
|
|
37
38
|
is_destiny_sign: bool
|
|
38
39
|
relevant_aspects: list
|
|
@@ -40,8 +41,8 @@ class RelationshipScore:
|
|
|
40
41
|
|
|
41
42
|
def __init__(
|
|
42
43
|
self,
|
|
43
|
-
first_subject: AstrologicalSubject,
|
|
44
|
-
second_subject: AstrologicalSubject,
|
|
44
|
+
first_subject: Union[AstrologicalSubject, AstrologicalSubjectModel],
|
|
45
|
+
second_subject: Union[AstrologicalSubject, AstrologicalSubjectModel],
|
|
45
46
|
new_settings_file: Union[Path, None] = None,
|
|
46
47
|
):
|
|
47
48
|
self.first_subject = first_subject
|
kerykeion/report.py
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
from kerykeion import AstrologicalSubject
|
|
2
2
|
from terminaltables import AsciiTable
|
|
3
|
+
from kerykeion.utilities import get_houses_list, get_available_planets_list
|
|
4
|
+
from typing import Union
|
|
5
|
+
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
|
|
3
6
|
|
|
4
7
|
class Report:
|
|
5
8
|
"""
|
|
@@ -11,7 +14,7 @@ class Report:
|
|
|
11
14
|
planets_table: str
|
|
12
15
|
houses_table: str
|
|
13
16
|
|
|
14
|
-
def __init__(self, instance: AstrologicalSubject):
|
|
17
|
+
def __init__(self, instance: Union[AstrologicalSubject, AstrologicalSubjectModel]):
|
|
15
18
|
self.instance = instance
|
|
16
19
|
|
|
17
20
|
self.get_report_title()
|
|
@@ -51,7 +54,7 @@ class Report:
|
|
|
51
54
|
("R" if planet.retrograde else "-"),
|
|
52
55
|
planet.house,
|
|
53
56
|
]
|
|
54
|
-
for planet in self.instance
|
|
57
|
+
for planet in get_available_planets_list(self.instance)
|
|
55
58
|
]
|
|
56
59
|
|
|
57
60
|
self.planets_table = AsciiTable(planets_data).table
|
|
@@ -62,7 +65,7 @@ class Report:
|
|
|
62
65
|
"""
|
|
63
66
|
|
|
64
67
|
houses_data = [["House", "Sign", "Position"]] + [
|
|
65
|
-
[house.name, house.sign, round(float(house.position), 2)] for house in self.instance
|
|
68
|
+
[house.name, house.sign, round(float(house.position), 2)] for house in get_houses_list(self.instance)
|
|
66
69
|
]
|
|
67
70
|
|
|
68
71
|
self.houses_table = AsciiTable(houses_data).table
|