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

@@ -1071,24 +1071,28 @@ class ChartDrawer:
1071
1071
  return f"{synastry_label}: {name1} {and_word} {name2}"
1072
1072
 
1073
1073
  elif self.chart_type == "DualReturnChart":
1074
- year = datetime.fromisoformat(self.second_obj.iso_formatted_local_datetime).year # type: ignore
1074
+ return_datetime = datetime.fromisoformat(self.second_obj.iso_formatted_local_datetime) # type: ignore
1075
+ year = return_datetime.year
1076
+ month_year = return_datetime.strftime("%m/%Y")
1075
1077
  truncated_name = self._truncate_name(self.first_obj.name)
1076
1078
  if self.second_obj is not None and isinstance(self.second_obj, PlanetReturnModel) and self.second_obj.return_type == "Solar":
1077
1079
  solar_label = self._translate("solar_return", "Solar")
1078
1080
  return f"{truncated_name} - {solar_label} {year}"
1079
1081
  else:
1080
1082
  lunar_label = self._translate("lunar_return", "Lunar")
1081
- return f"{truncated_name} - {lunar_label} {year}"
1083
+ return f"{truncated_name} - {lunar_label} {month_year}"
1082
1084
 
1083
1085
  elif self.chart_type == "SingleReturnChart":
1084
- year = datetime.fromisoformat(self.first_obj.iso_formatted_local_datetime).year # type: ignore
1086
+ return_datetime = datetime.fromisoformat(self.first_obj.iso_formatted_local_datetime) # type: ignore
1087
+ year = return_datetime.year
1088
+ month_year = return_datetime.strftime("%m/%Y")
1085
1089
  truncated_name = self._truncate_name(self.first_obj.name)
1086
1090
  if isinstance(self.first_obj, PlanetReturnModel) and self.first_obj.return_type == "Solar":
1087
1091
  solar_label = self._translate("solar_return", "Solar")
1088
1092
  return f"{truncated_name} - {solar_label} {year}"
1089
1093
  else:
1090
1094
  lunar_label = self._translate("lunar_return", "Lunar")
1091
- return f"{truncated_name} - {lunar_label} {year}"
1095
+ return f"{truncated_name} - {lunar_label} {month_year}"
1092
1096
 
1093
1097
  # Fallback for unknown chart types
1094
1098
  return self._truncate_name(self.first_obj.name)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kerykeion
3
- Version: 5.0.1
3
+ Version: 5.0.2
4
4
  Summary: A Python library for astrological calculations, including natal charts, houses, planetary aspects, and SVG chart generation.
5
5
  Project-URL: Homepage, https://www.kerykeion.net/
6
6
  Project-URL: Repository, https://github.com/g-battaglia/kerykeion
@@ -92,6 +92,9 @@ Maintaining this project requires substantial time and effort. The Astrologer AP
92
92
  - [External Birth Chart](#external-birth-chart)
93
93
  - [Synastry Chart](#synastry-chart)
94
94
  - [Transit Chart](#transit-chart)
95
+ - [Solar Return Chart (Dual Wheel)](#solar-return-chart-dual-wheel)
96
+ - [Solar Return Chart (Single Wheel)](#solar-return-chart-single-wheel)
97
+ - [Lunar Return Chart](#lunar-return-chart)
95
98
  - [Composite Chart](#composite-chart)
96
99
  - [Wheel Only Charts](#wheel-only-charts)
97
100
  - [Birth Chart](#birth-chart-1)
@@ -99,6 +102,7 @@ Maintaining this project requires substantial time and effort. The Astrologer AP
99
102
  - [Synastry Chart](#synastry-chart-1)
100
103
  - [Change the Output Directory](#change-the-output-directory)
101
104
  - [Change Language](#change-language)
105
+ - [Minified SVG](#minified-svg)
102
106
  - [SVG without CSS Variables](#svg-without-css-variables)
103
107
  - [Grid Only SVG](#grid-only-svg)
104
108
  - [Report Generator](#report-generator)
@@ -224,7 +228,7 @@ from kerykeion.charts.chart_drawer import ChartDrawer
224
228
  birth_chart = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
225
229
 
226
230
  # Step 2: Pre-compute chart data for external natal chart
227
- chart_data = ChartDataFactory.create_external_natal_chart_data(birth_chart)
231
+ chart_data = ChartDataFactory.create_natal_chart_data(birth_chart)
228
232
 
229
233
  # Step 3: Create visualization
230
234
  birth_chart_svg = ChartDrawer(chart_data=chart_data)
@@ -275,6 +279,104 @@ transit_chart.save_svg()
275
279
 
276
280
  ![John Lennon Transit Chart](https://raw.githubusercontent.com/g-battaglia/kerykeion/refs/heads/main/tests/charts/svg/John%20Lennon%20-%20Transit%20Chart.svg)
277
281
 
282
+ ### Solar Return Chart (Dual Wheel)
283
+
284
+ ```python
285
+ from kerykeion import AstrologicalSubjectFactory
286
+ from kerykeion.planetary_return_factory import PlanetaryReturnFactory
287
+ from kerykeion.chart_data_factory import ChartDataFactory
288
+ from kerykeion.charts.chart_drawer import ChartDrawer
289
+
290
+ # Step 1: Create natal subject
291
+ john = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
292
+
293
+ # Step 2: Calculate Solar Return subject (offline example with manual coordinates)
294
+ return_factory = PlanetaryReturnFactory(
295
+ john,
296
+ lng=-2.9833,
297
+ lat=53.4000,
298
+ tz_str="Europe/London",
299
+ online=False
300
+ )
301
+ solar_return_subject = return_factory.next_return_from_year(1964, "Solar")
302
+
303
+ # Step 3: Pre-compute return chart data (dual wheel: natal + solar return)
304
+ chart_data = ChartDataFactory.create_return_chart_data(john, solar_return_subject)
305
+
306
+ # Step 4: Create visualization
307
+ solar_return_chart = ChartDrawer(chart_data=chart_data)
308
+ solar_return_chart.save_svg()
309
+ ```
310
+
311
+ ![John Lennon Solar Return Chart (Dual Wheel)](https://raw.githubusercontent.com/g-battaglia/kerykeion/refs/heads/main/tests/charts/svg/John%20Lennon%20-%20DualReturnChart%20Chart%20-%20Solar%20Return.svg)
312
+
313
+ ### Solar Return Chart (Single Wheel)
314
+
315
+ ```python
316
+ from kerykeion import AstrologicalSubjectFactory
317
+ from kerykeion.planetary_return_factory import PlanetaryReturnFactory
318
+ from kerykeion.chart_data_factory import ChartDataFactory
319
+ from kerykeion.charts.chart_drawer import ChartDrawer
320
+
321
+ # Step 1: Create natal subject
322
+ john = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
323
+
324
+ # Step 2: Calculate Solar Return subject (offline example with manual coordinates)
325
+ return_factory = PlanetaryReturnFactory(
326
+ john,
327
+ lng=-2.9833,
328
+ lat=53.4000,
329
+ tz_str="Europe/London",
330
+ online=False
331
+ )
332
+ solar_return_subject = return_factory.next_return_from_year(1964, "Solar")
333
+
334
+ # Step 3: Build a single-wheel return chart
335
+ chart_data = ChartDataFactory.create_single_wheel_return_chart_data(solar_return_subject)
336
+
337
+ # Step 4: Create visualization
338
+ single_wheel_chart = ChartDrawer(chart_data=chart_data)
339
+ single_wheel_chart.save_svg()
340
+ ```
341
+
342
+ ![John Lennon Solar Return Chart (Single Wheel)](https://raw.githubusercontent.com/g-battaglia/kerykeion/refs/heads/main/tests/charts/svg/John%20Lennon%20Solar%20Return%20-%20SingleReturnChart%20Chart.svg)
343
+
344
+ ### Lunar Return Chart
345
+
346
+ ```python
347
+ from kerykeion import AstrologicalSubjectFactory
348
+ from kerykeion.planetary_return_factory import PlanetaryReturnFactory
349
+ from kerykeion.chart_data_factory import ChartDataFactory
350
+ from kerykeion.charts.chart_drawer import ChartDrawer
351
+
352
+ # Step 1: Create natal subject
353
+ john = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
354
+
355
+ # Step 2: Calculate Lunar Return subject
356
+ return_factory = PlanetaryReturnFactory(
357
+ john,
358
+ lng=-2.9833,
359
+ lat=53.4000,
360
+ tz_str="Europe/London",
361
+ online=False
362
+ )
363
+ lunar_return_subject = return_factory.next_return_from_year(1964, "Lunar")
364
+
365
+ # Step 3: Build a dual wheel (natal + lunar return)
366
+ lunar_return_chart_data = ChartDataFactory.create_return_chart_data(john, lunar_return_subject)
367
+ dual_wheel_chart = ChartDrawer(chart_data=lunar_return_chart_data)
368
+ dual_wheel_chart.save_svg()
369
+
370
+ # Optional: create a single-wheel lunar return
371
+ single_wheel_data = ChartDataFactory.create_single_wheel_return_chart_data(lunar_return_subject)
372
+ single_wheel_chart = ChartDrawer(chart_data=single_wheel_data)
373
+ single_wheel_chart.save_svg()
374
+ ```
375
+
376
+ ![John Lennon Lunar Return Chart (Dual Wheel)](https://raw.githubusercontent.com/g-battaglia/kerykeion/refs/heads/main/tests/charts/svg/John%20Lennon%20-%20DualReturnChart%20Chart%20-%20Lunar%20Return.svg)
377
+
378
+ ![John Lennon Lunar Return Chart (Single Wheel)](https://raw.githubusercontent.com/g-battaglia/kerykeion/refs/heads/main/tests/charts/svg/John%20Lennon%20Lunar%20Return%20-%20SingleReturnChart%20Chart.svg)
379
+
278
380
  ### Composite Chart
279
381
 
280
382
  ```python
@@ -336,7 +438,7 @@ from kerykeion.charts.chart_drawer import ChartDrawer
336
438
  birth_chart = AstrologicalSubjectFactory.from_birth_data("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB")
337
439
 
338
440
  # Step 2: Pre-compute external natal chart data
339
- chart_data = ChartDataFactory.create_external_natal_chart_data(birth_chart)
441
+ chart_data = ChartDataFactory.create_natal_chart_data(birth_chart)
340
442
 
341
443
  # Step 3: Create visualization
342
444
  birth_chart_svg = ChartDrawer(chart_data=chart_data)
@@ -411,6 +513,7 @@ birth_chart_svg = ChartDrawer(
411
513
  chart_language="IT" # Change to Italian
412
514
  )
413
515
  birth_chart_svg.save_svg()
516
+ ```
414
517
 
415
518
  You can also provide custom labels (or introduce a brand-new language) by passing
416
519
  a dictionary to `language_pack`. Only the keys you supply are merged on top of the
@@ -430,7 +533,6 @@ birth_chart_svg = ChartDrawer(
430
533
  language_pack=custom_labels["PT"],
431
534
  )
432
535
  ```
433
- ```
434
536
 
435
537
  More details [here](https://www.kerykeion.net/docs/chart-language).
436
538
 
@@ -14,7 +14,7 @@ kerykeion/aspects/__init__.py,sha256=csJmxvLdBu-bHuW676f3dpY__Qyc6LwRyrpWVTh3n1A
14
14
  kerykeion/aspects/aspects_factory.py,sha256=KQkeCBGFDfGH_pv44QlqVZnNb1fDNqpTY6uPQUhYcXM,24403
15
15
  kerykeion/aspects/aspects_utils.py,sha256=00-MMLEGChpceab8sHKB1_qg6EG4ycTG2u2vYZcyLmQ,5784
16
16
  kerykeion/charts/__init__.py,sha256=i9NMZ7LdkllPlqQSi1or9gTobHbROGDKmJhBDO4R0mA,128
17
- kerykeion/charts/chart_drawer.py,sha256=G-HksIE5Y-d5Qa29zJA9lyTlLcODIPBm9j-oynYIyK0,122120
17
+ kerykeion/charts/chart_drawer.py,sha256=-lz2sb26WTXzRLDexEgUQuQYUwPDlrlo8E7spmUmgT8,122342
18
18
  kerykeion/charts/charts_utils.py,sha256=JzPnbZJnH4lrIENb5saRtbHn_GbyaElXVBwKdyP90Dg,70110
19
19
  kerykeion/charts/draw_planets.py,sha256=tIj3FeLLomVSbCaZUxfw_qBEB3pxi4EIEhqaeTgTyTY,29061
20
20
  kerykeion/charts/templates/aspect_grid_only.xml,sha256=v3QtNMjk-kBdUTfB0r6thg--Ta_tNFdRQCzdk5PAycY,86429
@@ -57,7 +57,7 @@ kerykeion/sweph/ast28/se28978s.se1,sha256=nU2Qp-ELc_tzFnRc1QT6uVueWXEipvhYDgfQRX
57
57
  kerykeion/sweph/ast50/se50000s.se1,sha256=9jTrPlIrZMOBWC9cNgwzcfz0KBHdXFZoY9-NZ_HtECo,15748
58
58
  kerykeion/sweph/ast90/se90377s.se1,sha256=bto2x4LtBv8b1ej1XhVFYq-kfHO9cczbKV9U1f9UVu4,10288
59
59
  kerykeion/sweph/ast90/se90482s.se1,sha256=uHxz6bP4K8zgtQFrlWFwxrYfmqm5kXxsg6OYhAIUbAA,16173
60
- kerykeion-5.0.1.dist-info/METADATA,sha256=Pe4u6mLgq8zkgTEbUT93N4E4tA4hmdqTjHlx4U_pFBQ,44502
61
- kerykeion-5.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
62
- kerykeion-5.0.1.dist-info/licenses/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
63
- kerykeion-5.0.1.dist-info/RECORD,,
60
+ kerykeion-5.0.2.dist-info/METADATA,sha256=BUjuiAPCfRJfGJYFEzRIMBgN3lUdWfp1_RgUq07k8PY,48628
61
+ kerykeion-5.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
62
+ kerykeion-5.0.2.dist-info/licenses/LICENSE,sha256=UTLH8EdbAsgQei4PA2PnBCPGLSZkq5J-dhkyJuXgWQU,34273
63
+ kerykeion-5.0.2.dist-info/RECORD,,