kerykeion 5.0.2__py3-none-any.whl → 5.1.1__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_factory.py +11 -12
- kerykeion/backword.py +8 -4
- kerykeion/chart_data_factory.py +9 -6
- kerykeion/charts/chart_drawer.py +6 -6
- kerykeion/relationship_score_factory.py +1 -1
- kerykeion/report.py +6 -7
- kerykeion/schemas/kr_models.py +8 -10
- kerykeion/transits_time_range_factory.py +1 -1
- {kerykeion-5.0.2.dist-info → kerykeion-5.1.1.dist-info}/METADATA +651 -138
- {kerykeion-5.0.2.dist-info → kerykeion-5.1.1.dist-info}/RECORD +12 -12
- {kerykeion-5.0.2.dist-info → kerykeion-5.1.1.dist-info}/WHEEL +0 -0
- {kerykeion-5.0.2.dist-info → kerykeion-5.1.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -98,7 +98,7 @@ class AspectsFactory:
|
|
|
98
98
|
Example:
|
|
99
99
|
>>> johnny = AstrologicalSubjectFactory.from_birth_data("Johnny", 1963, 6, 9, 0, 0, "Owensboro", "US")
|
|
100
100
|
>>> chart_aspects = AspectsFactory.single_chart_aspects(johnny)
|
|
101
|
-
>>> print(f"Found {len(chart_aspects.
|
|
101
|
+
>>> print(f"Found {len(chart_aspects.aspects)} aspects")
|
|
102
102
|
"""
|
|
103
103
|
# Initialize settings and configurations
|
|
104
104
|
celestial_points = DEFAULT_CELESTIAL_POINTS_SETTINGS
|
|
@@ -162,7 +162,7 @@ class AspectsFactory:
|
|
|
162
162
|
>>> john = AstrologicalSubjectFactory.from_birth_data("John", 1990, 1, 1, 12, 0, "London", "GB")
|
|
163
163
|
>>> jane = AstrologicalSubjectFactory.from_birth_data("Jane", 1992, 6, 15, 14, 30, "Paris", "FR")
|
|
164
164
|
>>> synastry = AspectsFactory.dual_chart_aspects(john, jane)
|
|
165
|
-
>>> print(f"Found {len(synastry.
|
|
165
|
+
>>> print(f"Found {len(synastry.aspects)} aspects")
|
|
166
166
|
"""
|
|
167
167
|
# Initialize settings and configurations
|
|
168
168
|
celestial_points = DEFAULT_CELESTIAL_POINTS_SETTINGS
|
|
@@ -208,12 +208,12 @@ class AspectsFactory:
|
|
|
208
208
|
Create the complete single chart aspects model with all calculations.
|
|
209
209
|
|
|
210
210
|
Returns:
|
|
211
|
-
SingleChartAspectsModel containing
|
|
211
|
+
SingleChartAspectsModel containing filtered aspects data
|
|
212
212
|
"""
|
|
213
213
|
all_aspects = AspectsFactory._calculate_single_chart_aspects(
|
|
214
214
|
subject, active_points_resolved, active_aspects_resolved, aspects_settings, celestial_points
|
|
215
215
|
)
|
|
216
|
-
|
|
216
|
+
filtered_aspects = AspectsFactory._filter_relevant_aspects(
|
|
217
217
|
all_aspects,
|
|
218
218
|
axis_orb_limit,
|
|
219
219
|
apply_axis_orb_filter=axis_orb_limit is not None,
|
|
@@ -221,8 +221,7 @@ class AspectsFactory:
|
|
|
221
221
|
|
|
222
222
|
return SingleChartAspectsModel(
|
|
223
223
|
subject=subject,
|
|
224
|
-
|
|
225
|
-
relevant_aspects=relevant_aspects,
|
|
224
|
+
aspects=filtered_aspects,
|
|
226
225
|
active_points=active_points_resolved,
|
|
227
226
|
active_aspects=active_aspects_resolved,
|
|
228
227
|
)
|
|
@@ -250,13 +249,13 @@ class AspectsFactory:
|
|
|
250
249
|
celestial_points: Celestial points configuration
|
|
251
250
|
|
|
252
251
|
Returns:
|
|
253
|
-
DualChartAspectsModel: Complete model containing
|
|
252
|
+
DualChartAspectsModel: Complete model containing filtered aspects data
|
|
254
253
|
"""
|
|
255
254
|
all_aspects = AspectsFactory._calculate_dual_chart_aspects(
|
|
256
255
|
first_subject, second_subject, active_points_resolved, active_aspects_resolved,
|
|
257
256
|
aspects_settings, celestial_points
|
|
258
257
|
)
|
|
259
|
-
|
|
258
|
+
filtered_aspects = AspectsFactory._filter_relevant_aspects(
|
|
260
259
|
all_aspects,
|
|
261
260
|
axis_orb_limit,
|
|
262
261
|
apply_axis_orb_filter=False,
|
|
@@ -265,8 +264,7 @@ class AspectsFactory:
|
|
|
265
264
|
return DualChartAspectsModel(
|
|
266
265
|
first_subject=first_subject,
|
|
267
266
|
second_subject=second_subject,
|
|
268
|
-
|
|
269
|
-
relevant_aspects=relevant_aspects,
|
|
267
|
+
aspects=filtered_aspects,
|
|
270
268
|
active_points=active_points_resolved,
|
|
271
269
|
active_aspects=active_aspects_resolved,
|
|
272
270
|
)
|
|
@@ -560,10 +558,11 @@ if __name__ == "__main__":
|
|
|
560
558
|
# Test single chart aspects (replaces natal aspects)
|
|
561
559
|
johnny = AstrologicalSubjectFactory.from_birth_data("Johnny Depp", 1963, 6, 9, 0, 0, city="Owensboro", nation="US")
|
|
562
560
|
single_chart_aspects = AspectsFactory.single_chart_aspects(johnny)
|
|
563
|
-
print(f"Single chart aspects
|
|
561
|
+
print(f"Single chart aspects: {len(single_chart_aspects.aspects)}")
|
|
564
562
|
|
|
565
563
|
# Test dual chart aspects (replaces synastry aspects)
|
|
566
564
|
john = AstrologicalSubjectFactory.from_birth_data("John", 1940, 10, 9, 10, 30, "Liverpool", "GB")
|
|
567
565
|
yoko = AstrologicalSubjectFactory.from_birth_data("Yoko", 1933, 2, 18, 10, 30, "Tokyo", "JP")
|
|
568
566
|
dual_chart_aspects = AspectsFactory.dual_chart_aspects(john, yoko)
|
|
569
|
-
print(f"Dual chart aspects
|
|
567
|
+
print(f"Dual chart aspects: {len(dual_chart_aspects.aspects)}")
|
|
568
|
+
|
kerykeion/backword.py
CHANGED
|
@@ -676,14 +676,16 @@ class NatalAspects:
|
|
|
676
676
|
|
|
677
677
|
@cached_property
|
|
678
678
|
def all_aspects(self):
|
|
679
|
+
"""Legacy property - returns the same as aspects for backwards compatibility."""
|
|
679
680
|
if self._all_aspects_cache is None:
|
|
680
|
-
self._all_aspects_cache = list(self._build_aspects_model().
|
|
681
|
+
self._all_aspects_cache = list(self._build_aspects_model().aspects)
|
|
681
682
|
return self._all_aspects_cache
|
|
682
683
|
|
|
683
684
|
@cached_property
|
|
684
685
|
def relevant_aspects(self):
|
|
686
|
+
"""Legacy property - returns the same as aspects for backwards compatibility."""
|
|
685
687
|
if self._relevant_aspects_cache is None:
|
|
686
|
-
self._relevant_aspects_cache = list(self._build_aspects_model().
|
|
688
|
+
self._relevant_aspects_cache = list(self._build_aspects_model().aspects)
|
|
687
689
|
return self._relevant_aspects_cache
|
|
688
690
|
|
|
689
691
|
# ---------------------------------------------------------------------------
|
|
@@ -748,14 +750,16 @@ class SynastryAspects:
|
|
|
748
750
|
|
|
749
751
|
@cached_property
|
|
750
752
|
def all_aspects(self):
|
|
753
|
+
"""Legacy property - returns the same as aspects for backwards compatibility."""
|
|
751
754
|
if self._all_aspects_cache is None:
|
|
752
|
-
self._all_aspects_cache = list(self._build_dual_model().
|
|
755
|
+
self._all_aspects_cache = list(self._build_dual_model().aspects)
|
|
753
756
|
return self._all_aspects_cache
|
|
754
757
|
|
|
755
758
|
@cached_property
|
|
756
759
|
def relevant_aspects(self):
|
|
760
|
+
"""Legacy property - returns the same as aspects for backwards compatibility."""
|
|
757
761
|
if self._relevant_aspects_cache is None:
|
|
758
|
-
self._relevant_aspects_cache = list(self._build_dual_model().
|
|
762
|
+
self._relevant_aspects_cache = list(self._build_dual_model().aspects)
|
|
759
763
|
return self._relevant_aspects_cache
|
|
760
764
|
|
|
761
765
|
def get_relevant_aspects(self):
|
kerykeion/chart_data_factory.py
CHANGED
|
@@ -159,10 +159,10 @@ class ChartDataFactory:
|
|
|
159
159
|
)
|
|
160
160
|
|
|
161
161
|
# Calculate aspects based on chart type
|
|
162
|
-
|
|
162
|
+
aspects_model: Union[SingleChartAspectsModel, DualChartAspectsModel]
|
|
163
163
|
if chart_type in ["Natal", "Composite", "SingleReturnChart"]:
|
|
164
164
|
# Single chart aspects
|
|
165
|
-
|
|
165
|
+
aspects_model = AspectsFactory.single_chart_aspects(
|
|
166
166
|
first_subject,
|
|
167
167
|
active_points=effective_active_points,
|
|
168
168
|
active_aspects=active_aspects,
|
|
@@ -172,7 +172,7 @@ class ChartDataFactory:
|
|
|
172
172
|
# Dual chart aspects - second_subject is guaranteed to exist here due to validation above
|
|
173
173
|
if second_subject is None:
|
|
174
174
|
raise KerykeionException(f"Second subject is required for {chart_type} charts.")
|
|
175
|
-
|
|
175
|
+
aspects_model = AspectsFactory.dual_chart_aspects(
|
|
176
176
|
first_subject,
|
|
177
177
|
second_subject,
|
|
178
178
|
active_points=effective_active_points,
|
|
@@ -301,7 +301,7 @@ class ChartDataFactory:
|
|
|
301
301
|
return SingleChartDataModel(
|
|
302
302
|
chart_type=cast(Literal["Natal", "Composite", "SingleReturnChart"], chart_type),
|
|
303
303
|
subject=first_subject,
|
|
304
|
-
aspects=cast(SingleChartAspectsModel, aspects
|
|
304
|
+
aspects=cast(SingleChartAspectsModel, aspects_model).aspects,
|
|
305
305
|
element_distribution=element_distribution,
|
|
306
306
|
quality_distribution=quality_distribution,
|
|
307
307
|
active_points=effective_active_points,
|
|
@@ -315,7 +315,7 @@ class ChartDataFactory:
|
|
|
315
315
|
chart_type=cast(Literal["Transit", "Synastry", "DualReturnChart"], chart_type),
|
|
316
316
|
first_subject=first_subject,
|
|
317
317
|
second_subject=second_subject,
|
|
318
|
-
aspects=cast(DualChartAspectsModel, aspects
|
|
318
|
+
aspects=cast(DualChartAspectsModel, aspects_model).aspects,
|
|
319
319
|
house_comparison=house_comparison,
|
|
320
320
|
relationship_score=relationship_score,
|
|
321
321
|
element_distribution=element_distribution,
|
|
@@ -542,8 +542,11 @@ if __name__ == "__main__":
|
|
|
542
542
|
|
|
543
543
|
print(f"Chart Type: {natal_data.chart_type}")
|
|
544
544
|
print(f"Active Points: {len(natal_data.active_points)}")
|
|
545
|
-
print(f"Aspects: {len(natal_data.aspects
|
|
545
|
+
print(f"Aspects: {len(natal_data.aspects)}")
|
|
546
546
|
print(f"Fire: {natal_data.element_distribution.fire_percentage}%")
|
|
547
547
|
print(f"Earth: {natal_data.element_distribution.earth_percentage}%")
|
|
548
548
|
print(f"Air: {natal_data.element_distribution.air_percentage}%")
|
|
549
549
|
print(f"Water: {natal_data.element_distribution.water_percentage}%")
|
|
550
|
+
|
|
551
|
+
print("\n---\n")
|
|
552
|
+
print(natal_data.model_dump_json(indent=4))
|
kerykeion/charts/chart_drawer.py
CHANGED
|
@@ -343,7 +343,7 @@ class ChartDrawer:
|
|
|
343
343
|
# --- NATAL CHART SETUP ---
|
|
344
344
|
|
|
345
345
|
# Extract aspects from pre-computed chart data
|
|
346
|
-
self.aspects_list = chart_data.aspects
|
|
346
|
+
self.aspects_list = chart_data.aspects
|
|
347
347
|
|
|
348
348
|
# Screen size
|
|
349
349
|
self.height = self._DEFAULT_HEIGHT
|
|
@@ -366,7 +366,7 @@ class ChartDrawer:
|
|
|
366
366
|
# --- COMPOSITE CHART SETUP ---
|
|
367
367
|
|
|
368
368
|
# Extract aspects from pre-computed chart data
|
|
369
|
-
self.aspects_list = chart_data.aspects
|
|
369
|
+
self.aspects_list = chart_data.aspects
|
|
370
370
|
|
|
371
371
|
# Screen size
|
|
372
372
|
self.height = self._DEFAULT_HEIGHT
|
|
@@ -384,7 +384,7 @@ class ChartDrawer:
|
|
|
384
384
|
# --- TRANSIT CHART SETUP ---
|
|
385
385
|
|
|
386
386
|
# Extract aspects from pre-computed chart data
|
|
387
|
-
self.aspects_list = chart_data.aspects
|
|
387
|
+
self.aspects_list = chart_data.aspects
|
|
388
388
|
|
|
389
389
|
# Screen size
|
|
390
390
|
self.height = self._DEFAULT_HEIGHT
|
|
@@ -405,7 +405,7 @@ class ChartDrawer:
|
|
|
405
405
|
# --- SYNASTRY CHART SETUP ---
|
|
406
406
|
|
|
407
407
|
# Extract aspects from pre-computed chart data
|
|
408
|
-
self.aspects_list = chart_data.aspects
|
|
408
|
+
self.aspects_list = chart_data.aspects
|
|
409
409
|
|
|
410
410
|
# Screen size
|
|
411
411
|
self.height = self._DEFAULT_HEIGHT
|
|
@@ -423,7 +423,7 @@ class ChartDrawer:
|
|
|
423
423
|
# --- RETURN CHART SETUP ---
|
|
424
424
|
|
|
425
425
|
# Extract aspects from pre-computed chart data
|
|
426
|
-
self.aspects_list = chart_data.aspects
|
|
426
|
+
self.aspects_list = chart_data.aspects
|
|
427
427
|
|
|
428
428
|
# Screen size
|
|
429
429
|
self.height = self._DEFAULT_HEIGHT
|
|
@@ -441,7 +441,7 @@ class ChartDrawer:
|
|
|
441
441
|
# --- SINGLE WHEEL RETURN CHART SETUP ---
|
|
442
442
|
|
|
443
443
|
# Extract aspects from pre-computed chart data
|
|
444
|
-
self.aspects_list = chart_data.aspects
|
|
444
|
+
self.aspects_list = chart_data.aspects
|
|
445
445
|
|
|
446
446
|
# Screen size
|
|
447
447
|
self.height = self._DEFAULT_HEIGHT
|
kerykeion/report.py
CHANGED
|
@@ -510,15 +510,14 @@ class ReportGenerator:
|
|
|
510
510
|
if not self._chart_data or not getattr(self._chart_data, "aspects", None):
|
|
511
511
|
return ""
|
|
512
512
|
|
|
513
|
-
|
|
514
|
-
relevant_aspects = list(getattr(aspects_model, "relevant_aspects", []))
|
|
513
|
+
aspects_list = list(self._chart_data.aspects)
|
|
515
514
|
|
|
516
|
-
if not
|
|
515
|
+
if not aspects_list:
|
|
517
516
|
return "No aspects data available."
|
|
518
517
|
|
|
519
|
-
total_aspects = len(
|
|
518
|
+
total_aspects = len(aspects_list)
|
|
520
519
|
if max_aspects is not None:
|
|
521
|
-
|
|
520
|
+
aspects_list = aspects_list[:max_aspects]
|
|
522
521
|
|
|
523
522
|
is_dual = isinstance(self._chart_data, DualChartDataModel)
|
|
524
523
|
if is_dual:
|
|
@@ -527,7 +526,7 @@ class ReportGenerator:
|
|
|
527
526
|
table_header = ["Point 1", "Aspect", "Point 2", "Orb", "Movement"]
|
|
528
527
|
|
|
529
528
|
aspects_table: List[List[str]] = [table_header]
|
|
530
|
-
for aspect in
|
|
529
|
+
for aspect in aspects_list:
|
|
531
530
|
aspect_name = str(aspect.aspect)
|
|
532
531
|
symbol = ASPECT_SYMBOLS.get(aspect_name.lower(), aspect_name)
|
|
533
532
|
movement_symbol = MOVEMENT_SYMBOLS.get(aspect.aspect_movement, "")
|
|
@@ -552,7 +551,7 @@ class ReportGenerator:
|
|
|
552
551
|
movement,
|
|
553
552
|
])
|
|
554
553
|
|
|
555
|
-
suffix = f" (showing {len(
|
|
554
|
+
suffix = f" (showing {len(aspects_list)} of {total_aspects})" if max_aspects is not None else ""
|
|
556
555
|
title = f"Aspects{suffix}"
|
|
557
556
|
return AsciiTable(aspects_table, title=title).table
|
|
558
557
|
|
kerykeion/schemas/kr_models.py
CHANGED
|
@@ -353,12 +353,11 @@ class SingleChartAspectsModel(SubscriptableBaseModel):
|
|
|
353
353
|
- Composite charts
|
|
354
354
|
- Any other single chart type
|
|
355
355
|
|
|
356
|
-
Contains
|
|
357
|
-
|
|
356
|
+
Contains the filtered and relevant aspects for the astrological subject
|
|
357
|
+
based on configured orb settings.
|
|
358
358
|
"""
|
|
359
359
|
subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"] = Field(description="The astrological subject for which aspects were calculated.")
|
|
360
|
-
|
|
361
|
-
relevant_aspects: List[AspectModel] = Field(description="Filtered list of relevant aspects based on orb settings.")
|
|
360
|
+
aspects: List[AspectModel] = Field(description="List of calculated aspects within the chart, filtered based on orb settings.")
|
|
362
361
|
active_points: List[AstrologicalPoint] = Field(description="List of active points used in the calculation.")
|
|
363
362
|
active_aspects: List["ActiveAspect"] = Field(description="List of active aspects with their orb settings.")
|
|
364
363
|
|
|
@@ -373,13 +372,12 @@ class DualChartAspectsModel(SubscriptableBaseModel):
|
|
|
373
372
|
- Composite vs natal comparisons
|
|
374
373
|
- Any other dual chart comparison
|
|
375
374
|
|
|
376
|
-
Contains
|
|
377
|
-
|
|
375
|
+
Contains the filtered and relevant aspects between the two charts
|
|
376
|
+
based on configured orb settings.
|
|
378
377
|
"""
|
|
379
378
|
first_subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"] = Field(description="The first astrological subject.")
|
|
380
379
|
second_subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"] = Field(description="The second astrological subject.")
|
|
381
|
-
|
|
382
|
-
relevant_aspects: List[AspectModel] = Field(description="Filtered list of relevant aspects based on orb settings.")
|
|
380
|
+
aspects: List[AspectModel] = Field(description="List of calculated aspects between the two charts, filtered based on orb settings.")
|
|
383
381
|
active_points: List[AstrologicalPoint] = Field(description="List of active points used in the calculation.")
|
|
384
382
|
active_aspects: List["ActiveAspect"] = Field(description="List of active aspects with their orb settings.")
|
|
385
383
|
|
|
@@ -538,7 +536,7 @@ class SingleChartDataModel(SubscriptableBaseModel):
|
|
|
538
536
|
subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"]
|
|
539
537
|
|
|
540
538
|
# Internal aspects analysis
|
|
541
|
-
aspects:
|
|
539
|
+
aspects: List[AspectModel]
|
|
542
540
|
|
|
543
541
|
# Element and quality distributions
|
|
544
542
|
element_distribution: "ElementDistributionModel"
|
|
@@ -584,7 +582,7 @@ class DualChartDataModel(SubscriptableBaseModel):
|
|
|
584
582
|
second_subject: Union["AstrologicalSubjectModel", "PlanetReturnModel"]
|
|
585
583
|
|
|
586
584
|
# Inter-chart aspects analysis
|
|
587
|
-
aspects:
|
|
585
|
+
aspects: List[AspectModel]
|
|
588
586
|
|
|
589
587
|
# House comparison analysis
|
|
590
588
|
house_comparison: Optional["HouseComparisonModel"] = None
|
|
@@ -247,7 +247,7 @@ class TransitsTimeRangeFactory:
|
|
|
247
247
|
active_points=self.active_points,
|
|
248
248
|
active_aspects=self.active_aspects,
|
|
249
249
|
axis_orb_limit=self.axis_orb_limit,
|
|
250
|
-
).
|
|
250
|
+
).aspects
|
|
251
251
|
|
|
252
252
|
# Create a transit moment for this point in time
|
|
253
253
|
transit_moments.append(
|