kerykeion 5.0.0b1__py3-none-any.whl → 5.0.0b4__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 +3 -2
- kerykeion/aspects/aspects_factory.py +60 -21
- kerykeion/aspects/aspects_utils.py +1 -1
- kerykeion/backword.py +111 -18
- kerykeion/chart_data_factory.py +72 -7
- kerykeion/charts/chart_drawer.py +601 -206
- kerykeion/charts/charts_utils.py +440 -255
- kerykeion/charts/templates/aspect_grid_only.xml +269 -312
- kerykeion/charts/templates/chart.xml +302 -328
- kerykeion/charts/templates/wheel_only.xml +271 -312
- kerykeion/charts/themes/black-and-white.css +148 -0
- kerykeion/relationship_score_factory.py +12 -2
- kerykeion/schemas/chart_template_model.py +27 -0
- kerykeion/schemas/kr_literals.py +1 -1
- kerykeion/settings/__init__.py +16 -2
- kerykeion/settings/chart_defaults.py +444 -0
- kerykeion/settings/config_constants.py +0 -5
- kerykeion/settings/kerykeion_settings.py +31 -74
- kerykeion/settings/translation_strings.py +1479 -0
- kerykeion/settings/translations.py +74 -0
- kerykeion/transits_time_range_factory.py +10 -1
- {kerykeion-5.0.0b1.dist-info → kerykeion-5.0.0b4.dist-info}/METADATA +304 -204
- {kerykeion-5.0.0b1.dist-info → kerykeion-5.0.0b4.dist-info}/RECORD +25 -26
- kerykeion/settings/kr.config.json +0 -1474
- kerykeion/settings/legacy/__init__.py +0 -0
- kerykeion/settings/legacy/legacy_celestial_points_settings.py +0 -299
- kerykeion/settings/legacy/legacy_chart_aspects_settings.py +0 -71
- kerykeion/settings/legacy/legacy_color_settings.py +0 -42
- {kerykeion-5.0.0b1.dist-info → kerykeion-5.0.0b4.dist-info}/WHEEL +0 -0
- {kerykeion-5.0.0b1.dist-info → kerykeion-5.0.0b4.dist-info}/licenses/LICENSE +0 -0
kerykeion/chart_data_factory.py
CHANGED
|
@@ -29,7 +29,7 @@ Copyright: (C) 2025 Kerykeion Project
|
|
|
29
29
|
License: AGPL-3.0
|
|
30
30
|
"""
|
|
31
31
|
|
|
32
|
-
from typing import Union, Optional, List, Literal, cast
|
|
32
|
+
from typing import Mapping, Union, Optional, List, Literal, cast
|
|
33
33
|
|
|
34
34
|
from kerykeion.aspects import AspectsFactory
|
|
35
35
|
from kerykeion.house_comparison.house_comparison_factory import HouseComparisonFactory
|
|
@@ -57,8 +57,9 @@ from kerykeion.schemas.kr_literals import (
|
|
|
57
57
|
)
|
|
58
58
|
from kerykeion.utilities import find_common_active_points, distribute_percentages_to_100
|
|
59
59
|
from kerykeion.settings.config_constants import DEFAULT_ACTIVE_ASPECTS
|
|
60
|
-
from kerykeion.settings.
|
|
60
|
+
from kerykeion.settings.chart_defaults import DEFAULT_CELESTIAL_POINTS_SETTINGS
|
|
61
61
|
from kerykeion.charts.charts_utils import (
|
|
62
|
+
ElementQualityDistributionMethod,
|
|
62
63
|
calculate_element_points,
|
|
63
64
|
calculate_quality_points,
|
|
64
65
|
calculate_synastry_element_points,
|
|
@@ -101,6 +102,10 @@ class ChartDataFactory:
|
|
|
101
102
|
active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
|
|
102
103
|
include_house_comparison: bool = True,
|
|
103
104
|
include_relationship_score: bool = True,
|
|
105
|
+
*,
|
|
106
|
+
axis_orb_limit: Optional[float] = None,
|
|
107
|
+
distribution_method: ElementQualityDistributionMethod = "weighted",
|
|
108
|
+
custom_distribution_weights: Optional[Mapping[str, float]] = None,
|
|
104
109
|
) -> ChartDataModel:
|
|
105
110
|
"""
|
|
106
111
|
Create comprehensive chart data for the specified chart type.
|
|
@@ -113,6 +118,9 @@ class ChartDataFactory:
|
|
|
113
118
|
active_aspects: Aspect types and orbs to use
|
|
114
119
|
include_house_comparison: Whether to include house comparison for dual charts
|
|
115
120
|
include_relationship_score: Whether to include relationship scoring for synastry
|
|
121
|
+
axis_orb_limit: Optional orb threshold for chart axes (applies only to single chart aspects)
|
|
122
|
+
distribution_method: Strategy for element/modality weighting ("pure_count" or "weighted")
|
|
123
|
+
custom_distribution_weights: Optional overrides for the distribution weights
|
|
116
124
|
|
|
117
125
|
Returns:
|
|
118
126
|
ChartDataModel: Comprehensive chart data model
|
|
@@ -158,6 +166,7 @@ class ChartDataFactory:
|
|
|
158
166
|
first_subject,
|
|
159
167
|
active_points=effective_active_points,
|
|
160
168
|
active_aspects=active_aspects,
|
|
169
|
+
axis_orb_limit=axis_orb_limit,
|
|
161
170
|
)
|
|
162
171
|
else:
|
|
163
172
|
# Dual chart aspects - second_subject is guaranteed to exist here due to validation above
|
|
@@ -168,6 +177,7 @@ class ChartDataFactory:
|
|
|
168
177
|
second_subject,
|
|
169
178
|
active_points=effective_active_points,
|
|
170
179
|
active_aspects=active_aspects,
|
|
180
|
+
axis_orb_limit=axis_orb_limit,
|
|
171
181
|
)
|
|
172
182
|
|
|
173
183
|
# Calculate house comparison for dual charts
|
|
@@ -187,17 +197,18 @@ class ChartDataFactory:
|
|
|
187
197
|
if isinstance(first_subject, AstrologicalSubjectModel) and isinstance(second_subject, AstrologicalSubjectModel):
|
|
188
198
|
relationship_score_factory = RelationshipScoreFactory(
|
|
189
199
|
first_subject,
|
|
190
|
-
second_subject
|
|
200
|
+
second_subject,
|
|
201
|
+
axis_orb_limit=axis_orb_limit,
|
|
191
202
|
)
|
|
192
203
|
relationship_score = relationship_score_factory.get_relationship_score()
|
|
193
204
|
|
|
194
205
|
# Calculate element and quality distributions
|
|
195
|
-
celestial_points_settings = DEFAULT_CELESTIAL_POINTS_SETTINGS
|
|
196
206
|
available_planets_setting_dicts: list[dict[str, object]] = []
|
|
197
|
-
for body in
|
|
207
|
+
for body in DEFAULT_CELESTIAL_POINTS_SETTINGS:
|
|
198
208
|
if body["name"] in effective_active_points:
|
|
199
|
-
|
|
200
|
-
|
|
209
|
+
body_dict = dict(body)
|
|
210
|
+
body_dict["is_active"] = True
|
|
211
|
+
available_planets_setting_dicts.append(body_dict)
|
|
201
212
|
|
|
202
213
|
# Convert to models for type safety
|
|
203
214
|
available_planets_setting: list[KerykeionSettingsCelestialPointModel] = [
|
|
@@ -215,12 +226,16 @@ class ChartDataFactory:
|
|
|
215
226
|
celestial_points_names,
|
|
216
227
|
first_subject,
|
|
217
228
|
second_subject,
|
|
229
|
+
method=distribution_method,
|
|
230
|
+
custom_weights=custom_distribution_weights,
|
|
218
231
|
)
|
|
219
232
|
quality_totals = calculate_synastry_quality_points(
|
|
220
233
|
available_planets_setting,
|
|
221
234
|
celestial_points_names,
|
|
222
235
|
first_subject,
|
|
223
236
|
second_subject,
|
|
237
|
+
method=distribution_method,
|
|
238
|
+
custom_weights=custom_distribution_weights,
|
|
224
239
|
)
|
|
225
240
|
else:
|
|
226
241
|
# Fallback to single chart calculation for incompatible types
|
|
@@ -228,11 +243,15 @@ class ChartDataFactory:
|
|
|
228
243
|
available_planets_setting,
|
|
229
244
|
celestial_points_names,
|
|
230
245
|
first_subject,
|
|
246
|
+
method=distribution_method,
|
|
247
|
+
custom_weights=custom_distribution_weights,
|
|
231
248
|
)
|
|
232
249
|
quality_totals = calculate_quality_points(
|
|
233
250
|
available_planets_setting,
|
|
234
251
|
celestial_points_names,
|
|
235
252
|
first_subject,
|
|
253
|
+
method=distribution_method,
|
|
254
|
+
custom_weights=custom_distribution_weights,
|
|
236
255
|
)
|
|
237
256
|
else:
|
|
238
257
|
# Calculate element/quality points for single chart
|
|
@@ -240,11 +259,15 @@ class ChartDataFactory:
|
|
|
240
259
|
available_planets_setting,
|
|
241
260
|
celestial_points_names,
|
|
242
261
|
first_subject,
|
|
262
|
+
method=distribution_method,
|
|
263
|
+
custom_weights=custom_distribution_weights,
|
|
243
264
|
)
|
|
244
265
|
quality_totals = calculate_quality_points(
|
|
245
266
|
available_planets_setting,
|
|
246
267
|
celestial_points_names,
|
|
247
268
|
first_subject,
|
|
269
|
+
method=distribution_method,
|
|
270
|
+
custom_weights=custom_distribution_weights,
|
|
248
271
|
)
|
|
249
272
|
|
|
250
273
|
# Calculate percentages
|
|
@@ -306,6 +329,9 @@ class ChartDataFactory:
|
|
|
306
329
|
subject: Union[AstrologicalSubjectModel, CompositeSubjectModel, PlanetReturnModel],
|
|
307
330
|
active_points: Optional[List[AstrologicalPoint]] = None,
|
|
308
331
|
active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
|
|
332
|
+
*,
|
|
333
|
+
distribution_method: ElementQualityDistributionMethod = "weighted",
|
|
334
|
+
custom_distribution_weights: Optional[Mapping[str, float]] = None,
|
|
309
335
|
) -> ChartDataModel:
|
|
310
336
|
"""
|
|
311
337
|
Convenience method for creating natal chart data.
|
|
@@ -314,6 +340,8 @@ class ChartDataFactory:
|
|
|
314
340
|
subject: Astrological subject
|
|
315
341
|
active_points: Points to include in calculations
|
|
316
342
|
active_aspects: Aspect types and orbs to use
|
|
343
|
+
distribution_method: Strategy for element/modality weighting
|
|
344
|
+
custom_distribution_weights: Optional overrides for distribution weights
|
|
317
345
|
|
|
318
346
|
Returns:
|
|
319
347
|
ChartDataModel: Natal chart data
|
|
@@ -323,6 +351,8 @@ class ChartDataFactory:
|
|
|
323
351
|
chart_type="Natal",
|
|
324
352
|
active_points=active_points,
|
|
325
353
|
active_aspects=active_aspects,
|
|
354
|
+
distribution_method=distribution_method,
|
|
355
|
+
custom_distribution_weights=custom_distribution_weights,
|
|
326
356
|
)
|
|
327
357
|
|
|
328
358
|
@staticmethod
|
|
@@ -333,6 +363,9 @@ class ChartDataFactory:
|
|
|
333
363
|
active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
|
|
334
364
|
include_house_comparison: bool = True,
|
|
335
365
|
include_relationship_score: bool = True,
|
|
366
|
+
*,
|
|
367
|
+
distribution_method: ElementQualityDistributionMethod = "weighted",
|
|
368
|
+
custom_distribution_weights: Optional[Mapping[str, float]] = None,
|
|
336
369
|
) -> ChartDataModel:
|
|
337
370
|
"""
|
|
338
371
|
Convenience method for creating synastry chart data.
|
|
@@ -344,6 +377,8 @@ class ChartDataFactory:
|
|
|
344
377
|
active_aspects: Aspect types and orbs to use
|
|
345
378
|
include_house_comparison: Whether to include house comparison
|
|
346
379
|
include_relationship_score: Whether to include relationship scoring
|
|
380
|
+
distribution_method: Strategy for element/modality weighting
|
|
381
|
+
custom_distribution_weights: Optional overrides for distribution weights
|
|
347
382
|
|
|
348
383
|
Returns:
|
|
349
384
|
ChartDataModel: Synastry chart data
|
|
@@ -356,6 +391,8 @@ class ChartDataFactory:
|
|
|
356
391
|
active_aspects=active_aspects,
|
|
357
392
|
include_house_comparison=include_house_comparison,
|
|
358
393
|
include_relationship_score=include_relationship_score,
|
|
394
|
+
distribution_method=distribution_method,
|
|
395
|
+
custom_distribution_weights=custom_distribution_weights,
|
|
359
396
|
)
|
|
360
397
|
|
|
361
398
|
@staticmethod
|
|
@@ -365,6 +402,9 @@ class ChartDataFactory:
|
|
|
365
402
|
active_points: Optional[List[AstrologicalPoint]] = None,
|
|
366
403
|
active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
|
|
367
404
|
include_house_comparison: bool = True,
|
|
405
|
+
*,
|
|
406
|
+
distribution_method: ElementQualityDistributionMethod = "weighted",
|
|
407
|
+
custom_distribution_weights: Optional[Mapping[str, float]] = None,
|
|
368
408
|
) -> ChartDataModel:
|
|
369
409
|
"""
|
|
370
410
|
Convenience method for creating transit chart data.
|
|
@@ -375,6 +415,8 @@ class ChartDataFactory:
|
|
|
375
415
|
active_points: Points to include in calculations
|
|
376
416
|
active_aspects: Aspect types and orbs to use
|
|
377
417
|
include_house_comparison: Whether to include house comparison
|
|
418
|
+
distribution_method: Strategy for element/modality weighting
|
|
419
|
+
custom_distribution_weights: Optional overrides for distribution weights
|
|
378
420
|
|
|
379
421
|
Returns:
|
|
380
422
|
ChartDataModel: Transit chart data
|
|
@@ -386,6 +428,8 @@ class ChartDataFactory:
|
|
|
386
428
|
active_points=active_points,
|
|
387
429
|
active_aspects=active_aspects,
|
|
388
430
|
include_house_comparison=include_house_comparison,
|
|
431
|
+
distribution_method=distribution_method,
|
|
432
|
+
custom_distribution_weights=custom_distribution_weights,
|
|
389
433
|
)
|
|
390
434
|
|
|
391
435
|
@staticmethod
|
|
@@ -393,6 +437,9 @@ class ChartDataFactory:
|
|
|
393
437
|
composite_subject: CompositeSubjectModel,
|
|
394
438
|
active_points: Optional[List[AstrologicalPoint]] = None,
|
|
395
439
|
active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
|
|
440
|
+
*,
|
|
441
|
+
distribution_method: ElementQualityDistributionMethod = "weighted",
|
|
442
|
+
custom_distribution_weights: Optional[Mapping[str, float]] = None,
|
|
396
443
|
) -> ChartDataModel:
|
|
397
444
|
"""
|
|
398
445
|
Convenience method for creating composite chart data.
|
|
@@ -401,6 +448,8 @@ class ChartDataFactory:
|
|
|
401
448
|
composite_subject: Composite astrological subject
|
|
402
449
|
active_points: Points to include in calculations
|
|
403
450
|
active_aspects: Aspect types and orbs to use
|
|
451
|
+
distribution_method: Strategy for element/modality weighting
|
|
452
|
+
custom_distribution_weights: Optional overrides for distribution weights
|
|
404
453
|
|
|
405
454
|
Returns:
|
|
406
455
|
ChartDataModel: Composite chart data
|
|
@@ -410,6 +459,8 @@ class ChartDataFactory:
|
|
|
410
459
|
chart_type="Composite",
|
|
411
460
|
active_points=active_points,
|
|
412
461
|
active_aspects=active_aspects,
|
|
462
|
+
distribution_method=distribution_method,
|
|
463
|
+
custom_distribution_weights=custom_distribution_weights,
|
|
413
464
|
)
|
|
414
465
|
|
|
415
466
|
@staticmethod
|
|
@@ -419,6 +470,9 @@ class ChartDataFactory:
|
|
|
419
470
|
active_points: Optional[List[AstrologicalPoint]] = None,
|
|
420
471
|
active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
|
|
421
472
|
include_house_comparison: bool = True,
|
|
473
|
+
*,
|
|
474
|
+
distribution_method: ElementQualityDistributionMethod = "weighted",
|
|
475
|
+
custom_distribution_weights: Optional[Mapping[str, float]] = None,
|
|
422
476
|
) -> ChartDataModel:
|
|
423
477
|
"""
|
|
424
478
|
Convenience method for creating planetary return chart data.
|
|
@@ -429,6 +483,8 @@ class ChartDataFactory:
|
|
|
429
483
|
active_points: Points to include in calculations
|
|
430
484
|
active_aspects: Aspect types and orbs to use
|
|
431
485
|
include_house_comparison: Whether to include house comparison
|
|
486
|
+
distribution_method: Strategy for element/modality weighting
|
|
487
|
+
custom_distribution_weights: Optional overrides for distribution weights
|
|
432
488
|
|
|
433
489
|
Returns:
|
|
434
490
|
ChartDataModel: Return chart data
|
|
@@ -440,6 +496,8 @@ class ChartDataFactory:
|
|
|
440
496
|
active_points=active_points,
|
|
441
497
|
active_aspects=active_aspects,
|
|
442
498
|
include_house_comparison=include_house_comparison,
|
|
499
|
+
distribution_method=distribution_method,
|
|
500
|
+
custom_distribution_weights=custom_distribution_weights,
|
|
443
501
|
)
|
|
444
502
|
|
|
445
503
|
@staticmethod
|
|
@@ -447,6 +505,9 @@ class ChartDataFactory:
|
|
|
447
505
|
return_subject: PlanetReturnModel,
|
|
448
506
|
active_points: Optional[List[AstrologicalPoint]] = None,
|
|
449
507
|
active_aspects: List[ActiveAspect] = DEFAULT_ACTIVE_ASPECTS,
|
|
508
|
+
*,
|
|
509
|
+
distribution_method: ElementQualityDistributionMethod = "weighted",
|
|
510
|
+
custom_distribution_weights: Optional[Mapping[str, float]] = None,
|
|
450
511
|
) -> ChartDataModel:
|
|
451
512
|
"""
|
|
452
513
|
Convenience method for creating single wheel planetary return chart data.
|
|
@@ -455,6 +516,8 @@ class ChartDataFactory:
|
|
|
455
516
|
return_subject: Planetary return subject
|
|
456
517
|
active_points: Points to include in calculations
|
|
457
518
|
active_aspects: Aspect types and orbs to use
|
|
519
|
+
distribution_method: Strategy for element/modality weighting
|
|
520
|
+
custom_distribution_weights: Optional overrides for distribution weights
|
|
458
521
|
|
|
459
522
|
Returns:
|
|
460
523
|
ChartDataModel: Single wheel return chart data
|
|
@@ -464,6 +527,8 @@ class ChartDataFactory:
|
|
|
464
527
|
chart_type="SingleReturnChart",
|
|
465
528
|
active_points=active_points,
|
|
466
529
|
active_aspects=active_aspects,
|
|
530
|
+
distribution_method=distribution_method,
|
|
531
|
+
custom_distribution_weights=custom_distribution_weights,
|
|
467
532
|
)
|
|
468
533
|
|
|
469
534
|
|