kerykeion 5.0.0a11__py3-none-any.whl → 5.0.0a12__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 +2 -3
- kerykeion/aspects/__init__.py +2 -4
- kerykeion/aspects/aspects_factory.py +514 -0
- kerykeion/astrological_subject_factory.py +3 -3
- kerykeion/charts/kerykeion_chart_svg.py +9 -10
- kerykeion/house_comparison/house_comparison_factory.py +48 -15
- kerykeion/house_comparison/house_comparison_models.py +51 -13
- kerykeion/house_comparison/house_comparison_utils.py +35 -5
- kerykeion/kr_types/kr_models.py +27 -10
- kerykeion/relationship_score_factory.py +2 -2
- kerykeion/sweph/sefstars.txt +1602 -0
- kerykeion/transits_time_range_factory.py +4 -4
- {kerykeion-5.0.0a11.dist-info → kerykeion-5.0.0a12.dist-info}/METADATA +49 -22
- {kerykeion-5.0.0a11.dist-info → kerykeion-5.0.0a12.dist-info}/RECORD +16 -16
- kerykeion/aspects/natal_aspects_factory.py +0 -235
- kerykeion/aspects/synastry_aspects_factory.py +0 -275
- {kerykeion-5.0.0a11.dist-info → kerykeion-5.0.0a12.dist-info}/WHEEL +0 -0
- {kerykeion-5.0.0a11.dist-info → kerykeion-5.0.0a12.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
"""
|
|
2
|
+
House Comparison Factory Module
|
|
3
|
+
|
|
4
|
+
Provides factory class for house comparison analysis between astrological subjects.
|
|
5
|
+
Enables bidirectional analysis of astrological point placements in house systems.
|
|
6
|
+
|
|
7
|
+
Author: Giacomo Battaglia
|
|
8
|
+
Copyright: (C) 2025 Kerykeion Project
|
|
9
|
+
License: AGPL-3.0
|
|
10
|
+
"""
|
|
11
|
+
|
|
1
12
|
from kerykeion.house_comparison.house_comparison_utils import calculate_points_in_reciprocal_houses
|
|
2
13
|
from typing import Union
|
|
3
14
|
from kerykeion.settings.config_constants import DEFAULT_ACTIVE_POINTS
|
|
@@ -9,22 +20,26 @@ from kerykeion.kr_types.kr_literals import AstrologicalPoint
|
|
|
9
20
|
|
|
10
21
|
class HouseComparisonFactory:
|
|
11
22
|
"""
|
|
12
|
-
Factory
|
|
23
|
+
Factory for creating house comparison analyses between two astrological subjects.
|
|
13
24
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
25
|
+
Analyzes placement of astrological points from one subject within the house system
|
|
26
|
+
of another subject, performing bidirectional analysis for synastry studies and
|
|
27
|
+
subject comparisons. Supports both natal subjects and planetary return subjects.
|
|
17
28
|
|
|
18
29
|
Attributes:
|
|
19
|
-
first_subject
|
|
20
|
-
second_subject
|
|
30
|
+
first_subject: First astrological subject (natal or return subject)
|
|
31
|
+
second_subject: Second astrological subject (natal or return subject)
|
|
32
|
+
active_points: List of astrological points to include in analysis
|
|
21
33
|
|
|
22
34
|
Example:
|
|
23
|
-
>>> natal_chart = AstrologicalSubjectFactory.from_birth_data(
|
|
24
|
-
|
|
35
|
+
>>> natal_chart = AstrologicalSubjectFactory.from_birth_data(
|
|
36
|
+
... "Person A", 1990, 5, 15, 10, 30, "Rome", "IT"
|
|
37
|
+
... )
|
|
38
|
+
>>> partner_chart = AstrologicalSubjectFactory.from_birth_data(
|
|
39
|
+
... "Person B", 1992, 8, 23, 14, 45, "Milan", "IT"
|
|
40
|
+
... )
|
|
25
41
|
>>> factory = HouseComparisonFactory(natal_chart, partner_chart)
|
|
26
42
|
>>> comparison = factory.get_house_comparison()
|
|
27
|
-
>>> print(comparison.model_dump_json(indent=4))
|
|
28
43
|
|
|
29
44
|
"""
|
|
30
45
|
def __init__(self,
|
|
@@ -33,21 +48,39 @@ class HouseComparisonFactory:
|
|
|
33
48
|
active_points: list[AstrologicalPoint] = DEFAULT_ACTIVE_POINTS,
|
|
34
49
|
|
|
35
50
|
):
|
|
51
|
+
"""
|
|
52
|
+
Initialize the house comparison factory.
|
|
53
|
+
|
|
54
|
+
Args:
|
|
55
|
+
first_subject: First astrological subject for comparison
|
|
56
|
+
second_subject: Second astrological subject for comparison
|
|
57
|
+
active_points: List of astrological points to include in analysis.
|
|
58
|
+
Defaults to standard active points.
|
|
59
|
+
|
|
60
|
+
Note:
|
|
61
|
+
Both subjects must have valid house system data for accurate analysis.
|
|
62
|
+
"""
|
|
36
63
|
self.first_subject = first_subject
|
|
37
64
|
self.second_subject = second_subject
|
|
38
65
|
self.active_points = active_points
|
|
39
66
|
|
|
40
67
|
def get_house_comparison(self) -> "HouseComparisonModel":
|
|
41
68
|
"""
|
|
42
|
-
|
|
69
|
+
Generate bidirectional house comparison analysis between the two subjects.
|
|
43
70
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
chart2: Second astrological subject
|
|
47
|
-
description: Description of the comparison
|
|
71
|
+
Calculates where each active astrological point from one subject falls within
|
|
72
|
+
the house system of the other subject, and vice versa.
|
|
48
73
|
|
|
49
74
|
Returns:
|
|
50
|
-
|
|
75
|
+
HouseComparisonModel: Model containing:
|
|
76
|
+
- first_subject_name: Name of the first subject
|
|
77
|
+
- second_subject_name: Name of the second subject
|
|
78
|
+
- first_points_in_second_houses: First subject's points in second subject's houses
|
|
79
|
+
- second_points_in_first_houses: Second subject's points in first subject's houses
|
|
80
|
+
|
|
81
|
+
Note:
|
|
82
|
+
Analysis scope is determined by the active_points list. Only specified
|
|
83
|
+
points will be included in the results.
|
|
51
84
|
"""
|
|
52
85
|
first_points_in_second_houses = calculate_points_in_reciprocal_houses(self.first_subject, self.second_subject, self.active_points)
|
|
53
86
|
second_points_in_first_houses = calculate_points_in_reciprocal_houses(self.second_subject, self.first_subject, self.active_points)
|
|
@@ -1,38 +1,76 @@
|
|
|
1
|
+
"""
|
|
2
|
+
House Comparison Data Models
|
|
3
|
+
|
|
4
|
+
Pydantic models for house comparison analysis results between astrological subjects.
|
|
5
|
+
Structures data output from house comparison calculations.
|
|
6
|
+
|
|
7
|
+
Author: Giacomo Battaglia
|
|
8
|
+
Copyright: (C) 2025 Kerykeion Project
|
|
9
|
+
License: AGPL-3.0
|
|
10
|
+
"""
|
|
11
|
+
|
|
1
12
|
from kerykeion.kr_types import SubscriptableBaseModel
|
|
2
13
|
from typing import Optional
|
|
3
14
|
|
|
4
15
|
|
|
5
16
|
class PointInHouseModel(SubscriptableBaseModel):
|
|
6
|
-
"""
|
|
17
|
+
"""
|
|
18
|
+
Represents an astrological point from one subject positioned within another subject's house.
|
|
19
|
+
|
|
20
|
+
Captures point characteristics and its placement within the target subject's house system
|
|
21
|
+
for house comparison analysis.
|
|
22
|
+
|
|
23
|
+
Attributes:
|
|
24
|
+
point_name: Name of the astrological point
|
|
25
|
+
point_degree: Degree position within its sign
|
|
26
|
+
point_sign: Zodiacal sign containing the point
|
|
27
|
+
point_owner_name: Name of the subject who owns this point
|
|
28
|
+
point_owner_house_number: House number in owner's chart
|
|
29
|
+
point_owner_house_name: House name in owner's chart
|
|
30
|
+
projected_house_number: House number in target subject's chart
|
|
31
|
+
projected_house_name: House name in target subject's chart
|
|
32
|
+
projected_house_owner_name: Name of the target subject
|
|
33
|
+
"""
|
|
7
34
|
|
|
8
35
|
point_name: str
|
|
9
|
-
"""Name of the
|
|
36
|
+
"""Name of the astrological point"""
|
|
10
37
|
point_degree: float
|
|
11
|
-
"""Degree of the
|
|
38
|
+
"""Degree position of the point within its zodiacal sign"""
|
|
12
39
|
point_sign: str
|
|
13
|
-
"""
|
|
40
|
+
"""Zodiacal sign containing the point"""
|
|
14
41
|
point_owner_name: str
|
|
15
|
-
"""Name of the
|
|
42
|
+
"""Name of the subject who owns this point"""
|
|
16
43
|
point_owner_house_number: Optional[int]
|
|
17
|
-
"""House number
|
|
44
|
+
"""House number in owner's chart"""
|
|
18
45
|
point_owner_house_name: Optional[str]
|
|
19
|
-
"""House name
|
|
46
|
+
"""House name in owner's chart"""
|
|
20
47
|
projected_house_number: int
|
|
21
|
-
"""
|
|
48
|
+
"""House number in target subject's chart"""
|
|
22
49
|
projected_house_name: str
|
|
23
|
-
"""
|
|
50
|
+
"""House name in target subject's chart"""
|
|
24
51
|
projected_house_owner_name: str
|
|
25
|
-
"""Name of the
|
|
52
|
+
"""Name of the target subject"""
|
|
26
53
|
|
|
27
54
|
|
|
28
55
|
class HouseComparisonModel(SubscriptableBaseModel):
|
|
29
|
-
"""
|
|
56
|
+
"""
|
|
57
|
+
Bidirectional house comparison analysis between two astrological subjects.
|
|
58
|
+
|
|
59
|
+
Contains results of how astrological points from each subject interact with
|
|
60
|
+
the house system of the other subject.
|
|
61
|
+
|
|
62
|
+
Attributes:
|
|
63
|
+
first_subject_name: Name of the first subject
|
|
64
|
+
second_subject_name: Name of the second subject
|
|
65
|
+
first_points_in_second_houses: First subject's points in second subject's houses
|
|
66
|
+
second_points_in_first_houses: Second subject's points in first subject's houses
|
|
67
|
+
"""
|
|
30
68
|
|
|
31
69
|
first_subject_name: str
|
|
32
70
|
"""Name of the first subject"""
|
|
33
71
|
second_subject_name: str
|
|
34
72
|
"""Name of the second subject"""
|
|
35
73
|
first_points_in_second_houses: list[PointInHouseModel]
|
|
36
|
-
"""
|
|
74
|
+
"""First subject's points positioned in second subject's houses"""
|
|
37
75
|
second_points_in_first_houses: list[PointInHouseModel]
|
|
38
|
-
"""
|
|
76
|
+
"""Second subject's points positioned in first subject's houses"""
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
"""
|
|
2
|
+
House Comparison Utilities
|
|
3
|
+
|
|
4
|
+
Utility functions for calculating house placement relationships between astrological subjects.
|
|
5
|
+
Provides core calculation logic for determining where points from one subject fall within
|
|
6
|
+
another subject's house system.
|
|
7
|
+
|
|
8
|
+
Author: Giacomo Battaglia
|
|
9
|
+
Copyright: (C) 2025 Kerykeion Project
|
|
10
|
+
License: AGPL-3.0
|
|
11
|
+
"""
|
|
12
|
+
|
|
1
13
|
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, PlanetReturnModel
|
|
2
14
|
from kerykeion.kr_types.kr_literals import AstrologicalPoint
|
|
3
15
|
from kerykeion.settings.config_constants import DEFAULT_ACTIVE_POINTS
|
|
@@ -12,15 +24,33 @@ def calculate_points_in_reciprocal_houses(
|
|
|
12
24
|
active_points: list[AstrologicalPoint] = DEFAULT_ACTIVE_POINTS,
|
|
13
25
|
) -> list[PointInHouseModel]:
|
|
14
26
|
"""
|
|
15
|
-
|
|
27
|
+
Calculate house placements of one subject's points within another subject's house system.
|
|
28
|
+
|
|
29
|
+
Analyzes where each astrological point from the point_subject falls within the
|
|
30
|
+
house structure of the house_subject. Creates detailed mapping including both
|
|
31
|
+
the point's original house position and its projected house placement.
|
|
16
32
|
|
|
17
33
|
Args:
|
|
18
|
-
point_subject: Subject whose points are being analyzed
|
|
19
|
-
house_subject: Subject whose
|
|
20
|
-
active_points:
|
|
34
|
+
point_subject: Subject whose astrological points are being analyzed
|
|
35
|
+
house_subject: Subject whose house system provides the projection framework
|
|
36
|
+
active_points: List of astrological points to include in the analysis.
|
|
37
|
+
Defaults to standard active points configuration.
|
|
21
38
|
|
|
22
39
|
Returns:
|
|
23
|
-
List of
|
|
40
|
+
list[PointInHouseModel]: List of point placement models containing detailed
|
|
41
|
+
information about each point's house relationships,
|
|
42
|
+
including original and projected house positions.
|
|
43
|
+
|
|
44
|
+
Note:
|
|
45
|
+
Only processes points that exist in both the point_subject's active_points
|
|
46
|
+
and the provided active_points list. Points with None values are skipped.
|
|
47
|
+
|
|
48
|
+
Example:
|
|
49
|
+
>>> points_in_houses = calculate_points_in_reciprocal_houses(
|
|
50
|
+
... natal_chart, partner_chart, [AstrologicalPoint.SUN, AstrologicalPoint.MOON]
|
|
51
|
+
... )
|
|
52
|
+
>>> sun_placement = points_in_houses[0] # Assuming Sun is first
|
|
53
|
+
>>> print(f"Sun falls in house: {sun_placement.projected_house_name}")
|
|
24
54
|
"""
|
|
25
55
|
points_in_houses: list[PointInHouseModel] = []
|
|
26
56
|
|
kerykeion/kr_types/kr_models.py
CHANGED
|
@@ -338,35 +338,52 @@ class TransitMomentModel(SubscriptableBaseModel):
|
|
|
338
338
|
aspects: List[AspectModel] = Field(description="List of aspects active at this specific moment.")
|
|
339
339
|
|
|
340
340
|
|
|
341
|
-
class
|
|
341
|
+
class SingleChartAspectsModel(SubscriptableBaseModel):
|
|
342
342
|
"""
|
|
343
|
-
Model representing all aspects
|
|
343
|
+
Model representing all aspects within a single astrological chart.
|
|
344
|
+
|
|
345
|
+
This model can be used for any type of single chart analysis including:
|
|
346
|
+
- Natal charts
|
|
347
|
+
- Planetary return charts
|
|
348
|
+
- Composite charts
|
|
349
|
+
- Any other single chart type
|
|
344
350
|
|
|
345
351
|
Contains both all calculated aspects and the filtered relevant aspects
|
|
346
|
-
for
|
|
352
|
+
for the astrological subject.
|
|
347
353
|
"""
|
|
348
354
|
subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"] = Field(description="The astrological subject for which aspects were calculated.")
|
|
349
|
-
all_aspects: List[AspectModel] = Field(description="Complete list of all calculated aspects.")
|
|
355
|
+
all_aspects: List[AspectModel] = Field(description="Complete list of all calculated aspects within the chart.")
|
|
350
356
|
relevant_aspects: List[AspectModel] = Field(description="Filtered list of relevant aspects based on orb settings.")
|
|
351
357
|
active_points: List[AstrologicalPoint] = Field(description="List of active points used in the calculation.")
|
|
352
358
|
active_aspects: List["ActiveAspect"] = Field(description="List of active aspects with their orb settings.")
|
|
353
359
|
|
|
354
360
|
|
|
355
|
-
class
|
|
361
|
+
class DualChartAspectsModel(SubscriptableBaseModel):
|
|
356
362
|
"""
|
|
357
|
-
Model representing all aspects between two astrological
|
|
363
|
+
Model representing all aspects between two astrological charts.
|
|
364
|
+
|
|
365
|
+
This model can be used for any type of dual chart analysis including:
|
|
366
|
+
- Synastry (relationship compatibility)
|
|
367
|
+
- Transit comparisons
|
|
368
|
+
- Composite vs natal comparisons
|
|
369
|
+
- Any other dual chart comparison
|
|
358
370
|
|
|
359
|
-
Contains both all calculated
|
|
360
|
-
between two charts.
|
|
371
|
+
Contains both all calculated aspects and the filtered relevant aspects
|
|
372
|
+
between the two charts.
|
|
361
373
|
"""
|
|
362
374
|
first_subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"] = Field(description="The first astrological subject.")
|
|
363
375
|
second_subject: Union["AstrologicalSubjectModel", "CompositeSubjectModel", "PlanetReturnModel"] = Field(description="The second astrological subject.")
|
|
364
|
-
all_aspects: List[AspectModel] = Field(description="Complete list of all calculated
|
|
365
|
-
relevant_aspects: List[AspectModel] = Field(description="Filtered list of relevant
|
|
376
|
+
all_aspects: List[AspectModel] = Field(description="Complete list of all calculated aspects between the two charts.")
|
|
377
|
+
relevant_aspects: List[AspectModel] = Field(description="Filtered list of relevant aspects based on orb settings.")
|
|
366
378
|
active_points: List[AstrologicalPoint] = Field(description="List of active points used in the calculation.")
|
|
367
379
|
active_aspects: List["ActiveAspect"] = Field(description="List of active aspects with their orb settings.")
|
|
368
380
|
|
|
369
381
|
|
|
382
|
+
# Legacy aliases for backward compatibility
|
|
383
|
+
NatalAspectsModel = SingleChartAspectsModel
|
|
384
|
+
SynastryAspectsModel = DualChartAspectsModel
|
|
385
|
+
|
|
386
|
+
|
|
370
387
|
class TransitsTimeRangeModel(SubscriptableBaseModel):
|
|
371
388
|
"""
|
|
372
389
|
Model representing a collection of transit moments for an astrological subject.
|
|
@@ -42,7 +42,7 @@ License: AGPL-3.0
|
|
|
42
42
|
"""
|
|
43
43
|
|
|
44
44
|
from kerykeion import AstrologicalSubjectFactory
|
|
45
|
-
from kerykeion.aspects
|
|
45
|
+
from kerykeion.aspects import AspectsFactory
|
|
46
46
|
import logging
|
|
47
47
|
from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, RelationshipScoreAspectModel, RelationshipScoreModel
|
|
48
48
|
from kerykeion.kr_types.kr_literals import RelationshipScoreDescription
|
|
@@ -107,7 +107,7 @@ class RelationshipScoreFactory:
|
|
|
107
107
|
self.relationship_score_description: RelationshipScoreDescription = "Minimal"
|
|
108
108
|
self.is_destiny_sign = True
|
|
109
109
|
self.relationship_score_aspects: list[RelationshipScoreAspectModel] = []
|
|
110
|
-
self._synastry_aspects =
|
|
110
|
+
self._synastry_aspects = AspectsFactory.dual_chart_aspects(self.first_subject, self.second_subject).all_aspects
|
|
111
111
|
|
|
112
112
|
def _evaluate_destiny_sign(self):
|
|
113
113
|
"""
|