kerykeion 4.25.1__py3-none-any.whl → 4.25.3__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.

@@ -185,12 +185,24 @@ class KerykeionChartSVG:
185
185
  self.t_user = second_obj
186
186
 
187
187
  # Aspects
188
- synastry_aspects_instance = SynastryAspects(
189
- self.user, self.t_user,
190
- new_settings_file=self.new_settings_file,
191
- active_points=active_points,
192
- active_aspects=active_aspects,
193
- )
188
+ if self.chart_type == "Transit":
189
+ synastry_aspects_instance = SynastryAspects(
190
+ self.t_user,
191
+ self.user,
192
+ new_settings_file=self.new_settings_file,
193
+ active_points=active_points,
194
+ active_aspects=active_aspects,
195
+ )
196
+
197
+ else:
198
+ synastry_aspects_instance = SynastryAspects(
199
+ self.user,
200
+ self.t_user,
201
+ new_settings_file=self.new_settings_file,
202
+ active_points=active_points,
203
+ active_aspects=active_aspects,
204
+ )
205
+
194
206
  self.aspects_list = synastry_aspects_instance.relevant_aspects
195
207
 
196
208
  self.t_available_kerykeion_celestial_points = []
@@ -432,7 +444,13 @@ class KerykeionChartSVG:
432
444
  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)
433
445
 
434
446
  if self.double_chart_aspect_grid_type == "list":
435
- template_dict["makeAspectGrid"] = draw_transit_aspect_list(self.language_settings["aspects"], self.aspects_list, self.planets_settings, self.aspects_settings)
447
+ title = ""
448
+ if self.chart_type == "Synastry":
449
+ title = self.language_settings.get("couple_aspects", "Couple Aspects")
450
+ else:
451
+ title = self.language_settings.get("transit_aspects", "Transit Aspects")
452
+
453
+ template_dict["makeAspectGrid"] = draw_transit_aspect_list(title, self.aspects_list, self.planets_settings, self.aspects_settings)
436
454
  else:
437
455
  template_dict["makeAspectGrid"] = draw_transit_aspect_grid(self.chart_colors_settings['paper_0'], self.available_planets_setting, self.aspects_list, 550, 450)
438
456
 
@@ -8,7 +8,8 @@ from kerykeion.utilities import (
8
8
  get_kerykeion_point_from_degree,
9
9
  get_planet_house,
10
10
  circular_mean,
11
- calculate_moon_phase
11
+ calculate_moon_phase,
12
+ circular_sort
12
13
  )
13
14
 
14
15
 
@@ -132,17 +133,22 @@ class CompositeSubjectFactory:
132
133
  house_degree_list_ut = []
133
134
  for house in self.first_subject.houses_names_list:
134
135
  house_lower = house.lower()
135
- self[house_lower] = get_kerykeion_point_from_degree(
136
+ house_degree_list_ut.append(
136
137
  circular_mean(
137
138
  self.first_subject[house_lower]["abs_pos"],
138
139
  self.second_subject[house_lower]["abs_pos"]
139
- ),
140
- house,
140
+ )
141
+ )
142
+ house_degree_list_ut = circular_sort(house_degree_list_ut)
143
+
144
+ for house_index, house_name in enumerate(self.first_subject.houses_names_list):
145
+ house_lower = house_name.lower()
146
+ self[house_lower] = get_kerykeion_point_from_degree(
147
+ house_degree_list_ut[house_index],
148
+ house_name,
141
149
  "House"
142
150
  )
143
- house_degree_list_ut.append(self[house_lower]["abs_pos"])
144
151
 
145
- house_degree_list_ut = sorted(house_degree_list_ut)
146
152
 
147
153
  # Planets
148
154
  common_planets = []
@@ -131,7 +131,8 @@ class KerykeionLanguageModel(SubscriptableBaseModel):
131
131
  and_word: str
132
132
  transits: str
133
133
  type: str
134
- aspects: str
134
+ couple_aspects: str
135
+ transit_aspects: str
135
136
  planets_and_house: str
136
137
  transit_name: str
137
138
  lunar_phase: str
@@ -16,7 +16,8 @@
16
16
  "and_word": "and",
17
17
  "transits": "Transits for",
18
18
  "type": "Type",
19
- "aspects": "Couple aspects",
19
+ "couple_aspects": "Couple aspects",
20
+ "transit_aspects": "Transit aspects",
20
21
  "planets_and_house": "Points for",
21
22
  "transit_name": "At the time of the transit",
22
23
  "lunar_phase": "Lunar phase",
@@ -111,7 +112,8 @@
111
112
  "and_word": "et",
112
113
  "transits": "Transites pour",
113
114
  "type": "Type",
114
- "aspects": "Les aspects",
115
+ "couple_aspects": "Les aspects",
116
+ "transit_aspects": "Les aspects de transit",
115
117
  "planets_and_house": "Points pour",
116
118
  "transit_name": "Au moment de la transition",
117
119
  "lunar_phase": "Phase Lunaire",
@@ -206,7 +208,8 @@
206
208
  "and_word": "e",
207
209
  "transits": "Trânsitos para",
208
210
  "type": "Tipo",
209
- "aspects": "Aspectos do casal",
211
+ "couple_aspects": "Aspectos do casal",
212
+ "transit_aspects": "Aspectos do trânsito",
210
213
  "planets_and_house": "Pontos para",
211
214
  "transit_name": "No momento do trânsito",
212
215
  "lunar_phase": "Fase lunar",
@@ -301,7 +304,8 @@
301
304
  "and_word": "e",
302
305
  "transits": "Transiti per",
303
306
  "type": "Tipo",
304
- "aspects": "Aspetti di coppia",
307
+ "couple_aspects": "Aspetti di coppia",
308
+ "transit_aspects": "Aspetti di transito",
305
309
  "planets_and_house": "Punti per",
306
310
  "transit_name": "Al momento del transito",
307
311
  "lunar_phase": "Fase lunare",
@@ -396,7 +400,8 @@
396
400
  "and_word": "與",
397
401
  "transits": "流年合盤",
398
402
  "type": "盤型",
399
- "aspects": "相位",
403
+ "couple_aspects": "相位",
404
+ "transit_aspects": "流年相位",
400
405
  "planets_and_house": "行星 與 宫位",
401
406
  "transit_name": "流年名稱",
402
407
  "lunar_phase": "月相",
@@ -491,7 +496,8 @@
491
496
  "and_word": "y",
492
497
  "transits": "Tránsitos para",
493
498
  "type": "Tipo",
494
- "aspects": "Aspectos de la pareja",
499
+ "couple_aspects": "Aspectos de la pareja",
500
+ "transit_aspects": "Aspectos de tránsito",
495
501
  "planets_and_house": "Puntos para",
496
502
  "transit_name": "En el momento del tránsito",
497
503
  "lunar_phase": "Fase lunar",
@@ -586,7 +592,8 @@
586
592
  "and_word": "и",
587
593
  "transits": "Транзиты для",
588
594
  "type": "Тип",
589
- "aspects": "Аспекты пары",
595
+ "couple_aspects": "Аспекты пары",
596
+ "transit_aspects": "Транзитные аспекты",
590
597
  "planets_and_house": "Пункты для",
591
598
  "transit_name": "В момент транзита",
592
599
  "lunar_phase": "Лунная фаза",
@@ -681,7 +688,8 @@
681
688
  "and_word": "ve",
682
689
  "transits": "Geçişler için",
683
690
  "type": "Tür",
684
- "aspects": "Çiftin Açılar",
691
+ "couple_aspects": "Çiftin Açılar",
692
+ "transit_aspects": "Geçiş Açıları",
685
693
  "planets_and_house": "Puanlar için",
686
694
  "transit_name": "Geçiş anında",
687
695
  "lunar_phase": "Ay Aşaması",
@@ -776,7 +784,8 @@
776
784
  "and_word": "und",
777
785
  "transits": "Transite für",
778
786
  "type": "Typ",
779
- "aspects": "Aspekte des Paares",
787
+ "couple_aspects": "Aspekte des Paares",
788
+ "transit_aspects": "Transitaspekte",
780
789
  "planets_and_house": "Punkte für",
781
790
  "transit_name": "Zum Zeitpunkt des Transits",
782
791
  "lunar_phase": "Mondphase",
@@ -871,7 +880,8 @@
871
880
  "and_word": "और",
872
881
  "transits": "गोचर के लिए",
873
882
  "type": "प्रकार",
874
- "aspects": "जोड़ी के पहलू",
883
+ "couple_aspects": "जोड़ी के पहलू",
884
+ "transit_aspects": "गोचर के पहलू",
875
885
  "planets_and_house": "अंक के लिए",
876
886
  "transit_name": "गोचर के समय",
877
887
  "lunar_phase": "चंद्र चरण",
kerykeion/utilities.py CHANGED
@@ -390,3 +390,53 @@ def calculate_moon_phase(moon_abs_pos: float, sun_abs_pos: float) -> LunarPhaseM
390
390
  }
391
391
 
392
392
  return LunarPhaseModel(**lunar_phase_dictionary)
393
+
394
+
395
+ def circular_sort(degrees: list[Union[int, float]]) -> list[Union[int, float]]:
396
+ """
397
+ Sort a list of degrees in a circular manner, starting from the first element
398
+ and progressing clockwise around the circle.
399
+
400
+ Args:
401
+ degrees: A list of numeric values representing degrees
402
+
403
+ Returns:
404
+ A list sorted based on circular clockwise progression from the first element
405
+
406
+ Raises:
407
+ ValueError: If the list is empty or contains non-numeric values
408
+ """
409
+ # Input validation
410
+ if not degrees:
411
+ raise ValueError("Input list cannot be empty")
412
+
413
+ if not all(isinstance(degree, (int, float)) for degree in degrees):
414
+ invalid = next(d for d in degrees if not isinstance(d, (int, float)))
415
+ raise ValueError(f"All elements must be numeric, found: {invalid} of type {type(invalid).__name__}")
416
+
417
+ # If list has 0 or 1 element, return it as is
418
+ if len(degrees) <= 1:
419
+ return degrees.copy()
420
+
421
+ # Save the first element as the reference
422
+ reference = degrees[0]
423
+
424
+ # Define a function to calculate clockwise distance from reference
425
+ def clockwise_distance(angle: Union[int, float]) -> Union[int, float]:
426
+ # Normalize angles to 0-360 range
427
+ ref_norm = reference % 360
428
+ angle_norm = angle % 360
429
+
430
+ # Calculate clockwise distance
431
+ distance = angle_norm - ref_norm
432
+ if distance < 0:
433
+ distance += 360
434
+
435
+ return distance
436
+
437
+ # Sort the rest of the elements based on circular distance
438
+ remaining = degrees[1:]
439
+ sorted_remaining = sorted(remaining, key=clockwise_distance)
440
+
441
+ # Return the reference followed by the sorted remaining elements
442
+ return [reference] + sorted_remaining
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.25.1
3
+ Version: 4.25.3
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://www.kerykeion.net/
6
6
  License: AGPL-3.0
@@ -39,24 +39,16 @@ Description-Content-Type: text/markdown
39
39
 
40
40
  <h1 align=center>Kerykeion</h1>
41
41
  <div align="center">
42
- <a href="#">
43
- <img src="https://img.shields.io/github/contributors/g-battaglia/kerykeion?color=blue&logo=github" alt="contributors">
44
- </a>
45
- <a href="#">
46
42
  <img src="https://img.shields.io/github/stars/g-battaglia/kerykeion.svg?logo=github" alt="stars">
47
- </a>
48
- <a href="#">
49
43
  <img src="https://img.shields.io/github/forks/g-battaglia/kerykeion.svg?logo=github" alt="forks">
50
- </a>
51
- <a href="https://pypi.org/project/kerykeion" target="_blank">
52
- <img src="https://visitor-badge.laobi.icu/badge?page_id=g-battaglia.kerykeion" alt="visitors"/>
53
- </a>
54
- <a href="https://pypi.org/project/kerykeion" target="_blank">
44
+
45
+ </div>
46
+ <div align="center">
47
+ <img src="https://static.pepy.tech/badge/kerykeion/month" alt="PyPI Downloads">
48
+ <img src="https://static.pepy.tech/badge/kerykeion/week" alt="PyPI Downloads">
49
+ <img src="https://img.shields.io/github/contributors/g-battaglia/kerykeion?color=blue&logo=github" alt="contributors">
55
50
  <img src="https://img.shields.io/pypi/v/kerykeion?label=pypi%20package" alt="Package version">
56
- </a>
57
- <a href="https://pypi.org/project/kerykeion" target="_blank">
58
51
  <img src="https://img.shields.io/pypi/pyversions/kerykeion.svg" alt="Supported Python versions">
59
- </a>
60
52
  </div>
61
53
 
62
54
  &nbsp;
@@ -174,6 +166,38 @@ synastry_chart.makeSVG()
174
166
 
175
167
  ![John Lennon and Paul McCartney Synastry](https://www.kerykeion.net/docs/assets/img/examples/synastry-chart.svg)
176
168
 
169
+
170
+ ### Transit Chart
171
+
172
+ ```python
173
+ from kerykeion import AstrologicalSubject
174
+
175
+ transit = AstrologicalSubject("Transit", 2025, 6, 8, 8, 45, "Atlanta", "US")
176
+ subject = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
177
+
178
+ transit_chart = KerykeionChartSVG(subject, "Transit", transit)
179
+ transit_chart.makeSVG()
180
+ ```
181
+
182
+ ![John Lennon Transit Chart](https://raw.githubusercontent.com/g-battaglia/kerykeion/refs/heads/master/tests/charts/svg/John%20Lennon%20-%20Transit%20Chart.svg)
183
+
184
+ ### Composite Chart
185
+
186
+ ```python
187
+ from kerykeion import CompositeSubjectFactory, AstrologicalSubject, KerykeionChartSVG
188
+
189
+ angelina = AstrologicalSubject("Angelina Jolie", 1975, 6, 4, 9, 9, "Los Angeles", "US", lng=-118.15, lat=34.03, tz_str="America/Los_Angeles")
190
+ brad = AstrologicalSubject("Brad Pitt", 1963, 12, 18, 6, 31, "Shawnee", "US", lng=-96.56, lat=35.20, tz_str="America/Chicago")
191
+
192
+ composite_subject_factory = CompositeSubjectFactory(angelina, brad)
193
+ composite_subject_model = composite_subject_factory.get_midpoint_composite_subject_model()
194
+
195
+ composite_chart = KerykeionChartSVG(composite_subject_model, "Composite")
196
+ composite_chart.makeSVG()
197
+ ```
198
+
199
+ ![Angelina Jolie and Brad Pitt Composite Chart](https://raw.githubusercontent.com/g-battaglia/kerykeion/refs/heads/master/tests/charts/svg/Angelina%20Jolie%20and%20Brad%20Pitt%20Composite%20Chart%20-%20Composite%20Chart.svg)
200
+
177
201
  ### Change the output directory
178
202
 
179
203
  By default the output directory is the home directory, you can change it by passing the new_output_directory parameter to the KerykeionChartSVG class:
@@ -8,7 +8,7 @@ kerykeion/astrological_subject.py,sha256=643axkLtIVPkOOTHhB4InHYn3XVEOBZdXLS9B-N
8
8
  kerykeion/charts/__init__.py,sha256=i9NMZ7LdkllPlqQSi1or9gTobHbROGDKmJhBDO4R0mA,128
9
9
  kerykeion/charts/charts_utils.py,sha256=TGmya60LMswUvQMi6irJWaboK6QRWCZ52wv5FMgaUT8,40424
10
10
  kerykeion/charts/draw_planets.py,sha256=Uty3zpWYMQZvvK7ZHhlmynCHeL8DIN3qL2ifnBXVciM,17393
11
- kerykeion/charts/kerykeion_chart_svg.py,sha256=JPsNV7AAwYY1tQ8jNnc0TKEGXY-l-Ez3-Z632QcbR90,51221
11
+ kerykeion/charts/kerykeion_chart_svg.py,sha256=-mtL2rfGTeT17L5nZQ9bq5T5VYUZx2TpYRisEU3Bx_s,51891
12
12
  kerykeion/charts/templates/aspect_grid_only.xml,sha256=ZiBVeToVmCA8QxYlB_cfnsAO1NNeQAnJ_6rIYkr4F58,70091
13
13
  kerykeion/charts/templates/chart.xml,sha256=2p2LNNib9MfZiq521tFoEUwOBEN6KlbKOY4ZINdf7Dc,74985
14
14
  kerykeion/charts/templates/wheel_only.xml,sha256=E0JCxcnjTjxuaomw7PQEc_3xRVErj1y2hIOGTrShuhc,71304
@@ -16,7 +16,7 @@ kerykeion/charts/themes/classic.css,sha256=-b6XllAZmqUDjBwDtIkfzfI3Wtc8AImuGMpfA
16
16
  kerykeion/charts/themes/dark-high-contrast.css,sha256=9tdyFC-4Ytnv4lrVwKnOjZJ0YNgbRrP_HNnfJRlnbn0,6099
17
17
  kerykeion/charts/themes/dark.css,sha256=ml2lnzQVuS5DhCdoeUrDmMv9kB1nNceRt7hHbOHSbjM,6099
18
18
  kerykeion/charts/themes/light.css,sha256=ALf5U8tQsb6ky0N9R7ZLOHDrfKEXNM-sBR3JIRxFrCI,6092
19
- kerykeion/composite_subject_factory.py,sha256=3wyY03mefF9OPfeFyV7Ck4BIq8oY-kSqkHi4f8Ap9B0,8049
19
+ kerykeion/composite_subject_factory.py,sha256=ha66wQzcyJTb6XvJo3ppcZIZfvg4LQbFMLiIOm8Up0c,8245
20
20
  kerykeion/enums.py,sha256=nPXgP_ocsRnRno5H-yunZy3fp-hLZ9aYRaUb-2gBdvw,1199
21
21
  kerykeion/ephemeris_data.py,sha256=Cd5TK5nTkFHYU6bkLKjZRfiU4_6AgsWGcwBDrBHKrQk,8096
22
22
  kerykeion/fetch_geonames.py,sha256=e66Nh6yq9A4VjnuvVSiV1TW1IkJ9m3Q2LKPWrkOGgO0,4764
@@ -25,7 +25,7 @@ kerykeion/kr_types/chart_types.py,sha256=EFXTddX1wwTzbLSDKw_ipg4tbOihTKPEnn2T9oo
25
25
  kerykeion/kr_types/kerykeion_exception.py,sha256=kE1y0K0rmuz32b4K_ZppSsZ59I2Get0ZkvOkTE5HejI,314
26
26
  kerykeion/kr_types/kr_literals.py,sha256=b1JEgByA8-PWtkM8TdkNb2aePr8dUApI-OH3ciulJF8,4327
27
27
  kerykeion/kr_types/kr_models.py,sha256=N7VhwxcMkXMjn5UNArleuxZ684woJzBjvvNC1CF7ttg,6824
28
- kerykeion/kr_types/settings_models.py,sha256=kIq8If9rjnDhLUZ4y68fl0xcHTQoI9kbbny8NegPtsY,10968
28
+ kerykeion/kr_types/settings_models.py,sha256=vo_feYdV_DFMw2aDQahe2q8W_OzsmzP0R91wxUxEZzg,11000
29
29
  kerykeion/relationship_score/__init__.py,sha256=cLaEBQXQBfyRkv0OaS3ceLROzvWcvKXWiRq0PS6LDjY,114
30
30
  kerykeion/relationship_score/relationship_score.py,sha256=lJkSbHw9nOUaPMrPxqcGhnVQIwAgI52K8BQzXXswb6A,6504
31
31
  kerykeion/relationship_score/relationship_score_factory.py,sha256=wVdVomy_WlIvIvidnsf5a7jEZA8HJV8m8E3E_gia2yY,8651
@@ -33,12 +33,12 @@ kerykeion/report.py,sha256=snqnrJzb89q2ixL74qS9ksvzNSh_WXtZ_haBOIvHYeY,2814
33
33
  kerykeion/settings/__init__.py,sha256=QQNFCl7sgN27MKaVscqtpPk10HGz4wZS3I_7KEGMaVA,69
34
34
  kerykeion/settings/config_constants.py,sha256=OUi28L2l8s09Df3GHiQUiBZuTjOdfL4A5zSRNqBRHc8,1255
35
35
  kerykeion/settings/kerykeion_settings.py,sha256=7GCGUzcctEg5uyWlzRk2YIotJSkCZDOVAo_CXwgMeK4,2934
36
- kerykeion/settings/kr.config.json,sha256=5ktsoMnuhY9eUpQHC8oNmRZqPC7Lt3ILgOucKQvsJkQ,42059
36
+ kerykeion/settings/kr.config.json,sha256=4ZB7fkM0xiiXDLtxPRVDIVm0lUMYahWQmCVugFe274I,42628
37
37
  kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
38
38
  kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
39
- kerykeion/utilities.py,sha256=6TQpxENYDMacH4CsRJGJ4rmoV2Pn7pmQc8MTOUR2CSg,13824
40
- kerykeion-4.25.1.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
41
- kerykeion-4.25.1.dist-info/METADATA,sha256=PQnqq2_2emnyReIYrR2P7io4x0WRQ3EFwftDiGA6cvc,17802
42
- kerykeion-4.25.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
43
- kerykeion-4.25.1.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
44
- kerykeion-4.25.1.dist-info/RECORD,,
39
+ kerykeion/utilities.py,sha256=sZUFZQJXrMieLPg-0hCTrvfGQaWuPx6cMi-t1kJAxPw,15534
40
+ kerykeion-4.25.3.dist-info/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
41
+ kerykeion-4.25.3.dist-info/METADATA,sha256=z2-LCuJBlGFi26Wtpiz1FJlPX5tBJyQgmnFDeKu0Plk,18976
42
+ kerykeion-4.25.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
43
+ kerykeion-4.25.3.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
44
+ kerykeion-4.25.3.dist-info/RECORD,,