kerykeion 5.0.0a11__py3-none-any.whl → 5.0.0b1__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.

Files changed (56) hide show
  1. kerykeion/__init__.py +32 -9
  2. kerykeion/aspects/__init__.py +2 -4
  3. kerykeion/aspects/aspects_factory.py +530 -0
  4. kerykeion/aspects/aspects_utils.py +75 -6
  5. kerykeion/astrological_subject_factory.py +380 -229
  6. kerykeion/backword.py +680 -0
  7. kerykeion/chart_data_factory.py +484 -0
  8. kerykeion/charts/{kerykeion_chart_svg.py → chart_drawer.py} +612 -439
  9. kerykeion/charts/charts_utils.py +135 -94
  10. kerykeion/charts/draw_planets.py +38 -28
  11. kerykeion/charts/templates/aspect_grid_only.xml +188 -17
  12. kerykeion/charts/templates/chart.xml +104 -28
  13. kerykeion/charts/templates/wheel_only.xml +195 -24
  14. kerykeion/charts/themes/classic.css +11 -0
  15. kerykeion/charts/themes/dark-high-contrast.css +11 -0
  16. kerykeion/charts/themes/dark.css +11 -0
  17. kerykeion/charts/themes/light.css +11 -0
  18. kerykeion/charts/themes/strawberry.css +10 -0
  19. kerykeion/composite_subject_factory.py +4 -4
  20. kerykeion/ephemeris_data_factory.py +12 -9
  21. kerykeion/house_comparison/__init__.py +0 -3
  22. kerykeion/house_comparison/house_comparison_factory.py +51 -18
  23. kerykeion/house_comparison/house_comparison_utils.py +37 -8
  24. kerykeion/planetary_return_factory.py +8 -4
  25. kerykeion/relationship_score_factory.py +5 -5
  26. kerykeion/report.py +748 -67
  27. kerykeion/{kr_types → schemas}/__init__.py +44 -4
  28. kerykeion/schemas/chart_template_model.py +340 -0
  29. kerykeion/{kr_types → schemas}/kr_literals.py +7 -3
  30. kerykeion/{kr_types → schemas}/kr_models.py +247 -21
  31. kerykeion/{kr_types → schemas}/settings_models.py +7 -7
  32. kerykeion/settings/config_constants.py +75 -8
  33. kerykeion/settings/kerykeion_settings.py +1 -1
  34. kerykeion/settings/kr.config.json +130 -40
  35. kerykeion/settings/legacy/legacy_celestial_points_settings.py +8 -8
  36. kerykeion/sweph/ast136/s136108s.se1 +0 -0
  37. kerykeion/sweph/ast136/s136199s.se1 +0 -0
  38. kerykeion/sweph/ast136/s136472s.se1 +0 -0
  39. kerykeion/sweph/ast28/se28978s.se1 +0 -0
  40. kerykeion/sweph/ast50/se50000s.se1 +0 -0
  41. kerykeion/sweph/ast90/se90377s.se1 +0 -0
  42. kerykeion/sweph/ast90/se90482s.se1 +0 -0
  43. kerykeion/sweph/sefstars.txt +1602 -0
  44. kerykeion/transits_time_range_factory.py +11 -11
  45. kerykeion/utilities.py +61 -38
  46. kerykeion-5.0.0b1.dist-info/METADATA +1055 -0
  47. kerykeion-5.0.0b1.dist-info/RECORD +58 -0
  48. kerykeion/aspects/natal_aspects_factory.py +0 -235
  49. kerykeion/aspects/synastry_aspects_factory.py +0 -275
  50. kerykeion/house_comparison/house_comparison_models.py +0 -38
  51. kerykeion/kr_types/chart_types.py +0 -106
  52. kerykeion-5.0.0a11.dist-info/METADATA +0 -641
  53. kerykeion-5.0.0a11.dist-info/RECORD +0 -50
  54. /kerykeion/{kr_types → schemas}/kerykeion_exception.py +0 -0
  55. {kerykeion-5.0.0a11.dist-info → kerykeion-5.0.0b1.dist-info}/WHEEL +0 -0
  56. {kerykeion-5.0.0a11.dist-info → kerykeion-5.0.0b1.dist-info}/licenses/LICENSE +0 -0
@@ -1,8 +1,19 @@
1
- from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, PlanetReturnModel
2
- from kerykeion.kr_types.kr_literals import AstrologicalPoint
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
+
13
+ from kerykeion.schemas.kr_models import AstrologicalSubjectModel, PlanetReturnModel, PointInHouseModel
14
+ from kerykeion.schemas.kr_literals import AstrologicalPoint
3
15
  from kerykeion.settings.config_constants import DEFAULT_ACTIVE_POINTS
4
16
  from kerykeion.utilities import get_planet_house, get_house_number
5
- from kerykeion.house_comparison.house_comparison_models import PointInHouseModel
6
17
  from typing import Union
7
18
 
8
19
 
@@ -12,15 +23,33 @@ def calculate_points_in_reciprocal_houses(
12
23
  active_points: list[AstrologicalPoint] = DEFAULT_ACTIVE_POINTS,
13
24
  ) -> list[PointInHouseModel]:
14
25
  """
15
- Calculates which houses of the house_subject the points of point_subject fall into.
26
+ Calculate house placements of one subject's points within another subject's house system.
27
+
28
+ Analyzes where each astrological point from the point_subject falls within the
29
+ house structure of the house_subject. Creates detailed mapping including both
30
+ the point's original house position and its projected house placement.
16
31
 
17
32
  Args:
18
- point_subject: Subject whose points are being analyzed
19
- house_subject: Subject whose houses are being considered
20
- active_points: Optional list of point names to process. If None, all points are processed.
33
+ point_subject: Subject whose astrological points are being analyzed
34
+ house_subject: Subject whose house system provides the projection framework
35
+ active_points: List of astrological points to include in the analysis.
36
+ Defaults to standard active points configuration.
21
37
 
22
38
  Returns:
23
- List of PointInHouseModel objects
39
+ list[PointInHouseModel]: List of point placement models containing detailed
40
+ information about each point's house relationships,
41
+ including original and projected house positions.
42
+
43
+ Note:
44
+ Only processes points that exist in both the point_subject's active_points
45
+ and the provided active_points list. Points with None values are skipped.
46
+
47
+ Example:
48
+ >>> points_in_houses = calculate_points_in_reciprocal_houses(
49
+ ... natal_chart, partner_chart, ["Sun", "Moon"]
50
+ ... )
51
+ >>> sun_placement = points_in_houses[0] # Assuming Sun is first
52
+ >>> print(f"Sun falls in house: {sun_placement.projected_house_name}")
24
53
  """
25
54
  points_in_houses: list[PointInHouseModel] = []
26
55
 
@@ -33,7 +33,7 @@ Dependencies:
33
33
  - kerykeion.AstrologicalSubjectFactory: For creating complete chart data
34
34
  - kerykeion.fetch_geonames: For online location data retrieval
35
35
  - kerykeion.utilities: For date/time conversions and astronomical functions
36
- - kerykeion.kr_types: For type definitions and model structures
36
+ - kerykeion.schemas: For type definitions and model structures
37
37
 
38
38
  Example:
39
39
  Basic Solar Return calculation for a specific year:
@@ -73,7 +73,7 @@ import swisseph as swe
73
73
  from datetime import datetime, timezone
74
74
  from typing import Union
75
75
 
76
- from kerykeion.kr_types import KerykeionException
76
+ from kerykeion.schemas import KerykeionException
77
77
  from kerykeion.fetch_geonames import FetchGeonames
78
78
  from kerykeion.utilities import julian_to_datetime, datetime_to_julian
79
79
  from kerykeion.astrological_subject_factory import (
@@ -82,8 +82,8 @@ from kerykeion.astrological_subject_factory import (
82
82
  DEFAULT_GEONAMES_USERNAME,
83
83
  )
84
84
  from kerykeion.astrological_subject_factory import AstrologicalSubjectFactory
85
- from kerykeion.kr_types.kr_literals import ReturnType
86
- from kerykeion.kr_types.kr_models import PlanetReturnModel, AstrologicalSubjectModel
85
+ from kerykeion.schemas.kr_literals import ReturnType
86
+ from kerykeion.schemas.kr_models import PlanetReturnModel, AstrologicalSubjectModel
87
87
 
88
88
 
89
89
  class PlanetaryReturnFactory:
@@ -486,11 +486,15 @@ class PlanetaryReturnFactory:
486
486
 
487
487
  return_julian_date = None
488
488
  if return_type == "Solar":
489
+ if self.subject.sun is None:
490
+ raise KerykeionException("Sun position is required for Solar return but is not available in the subject.")
489
491
  return_julian_date = swe.solcross_ut(
490
492
  self.subject.sun.abs_pos,
491
493
  julian_day,
492
494
  )
493
495
  elif return_type == "Lunar":
496
+ if self.subject.moon is None:
497
+ raise KerykeionException("Moon position is required for Lunar return but is not available in the subject.")
494
498
  return_julian_date = swe.mooncross_ut(
495
499
  self.subject.moon.abs_pos,
496
500
  julian_day,
@@ -42,10 +42,10 @@ License: AGPL-3.0
42
42
  """
43
43
 
44
44
  from kerykeion import AstrologicalSubjectFactory
45
- from kerykeion.aspects.synastry_aspects_factory import SynastryAspectsFactory
45
+ from kerykeion.aspects import AspectsFactory
46
46
  import logging
47
- from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, RelationshipScoreAspectModel, RelationshipScoreModel
48
- from kerykeion.kr_types.kr_literals import RelationshipScoreDescription
47
+ from kerykeion.schemas.kr_models import AstrologicalSubjectModel, RelationshipScoreAspectModel, RelationshipScoreModel
48
+ from kerykeion.schemas.kr_literals import RelationshipScoreDescription
49
49
 
50
50
  # Scoring constants
51
51
  DESTINY_SIGN_POINTS = 5
@@ -105,9 +105,9 @@ class RelationshipScoreFactory:
105
105
 
106
106
  self.score_value = 0
107
107
  self.relationship_score_description: RelationshipScoreDescription = "Minimal"
108
- self.is_destiny_sign = True
108
+ self.is_destiny_sign = False
109
109
  self.relationship_score_aspects: list[RelationshipScoreAspectModel] = []
110
- self._synastry_aspects = SynastryAspectsFactory.from_subjects(self.first_subject, self.second_subject).all_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
  """