kerykeion 4.24.1__tar.gz → 4.24.3__tar.gz

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 (41) hide show
  1. {kerykeion-4.24.1 → kerykeion-4.24.3}/PKG-INFO +1 -1
  2. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/aspects/aspects_utils.py +0 -2
  3. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/aspects/natal_aspects.py +12 -9
  4. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/aspects/synastry_aspects.py +10 -4
  5. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/charts_utils.py +3 -1
  6. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/kerykeion_chart_svg.py +21 -16
  7. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/kr_types/kr_models.py +0 -2
  8. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/kr_types/settings_models.py +2 -4
  9. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/relationship_score/relationship_score_factory.py +3 -1
  10. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/settings/kr.config.json +0 -11
  11. {kerykeion-4.24.1 → kerykeion-4.24.3}/pyproject.toml +1 -1
  12. {kerykeion-4.24.1 → kerykeion-4.24.3}/LICENSE +0 -0
  13. {kerykeion-4.24.1 → kerykeion-4.24.3}/README.md +0 -0
  14. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/__init__.py +0 -0
  15. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/aspects/__init__.py +0 -0
  16. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/astrological_subject.py +0 -0
  17. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/__init__.py +0 -0
  18. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/draw_planets.py +0 -0
  19. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/templates/aspect_grid_only.xml +0 -0
  20. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/templates/chart.xml +0 -0
  21. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/templates/wheel_only.xml +0 -0
  22. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/themes/classic.css +0 -0
  23. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/themes/dark-high-contrast.css +0 -0
  24. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/themes/dark.css +0 -0
  25. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/charts/themes/light.css +0 -0
  26. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/enums.py +0 -0
  27. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/ephemeris_data.py +0 -0
  28. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/fetch_geonames.py +0 -0
  29. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/kr_types/__init__.py +0 -0
  30. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/kr_types/chart_types.py +0 -0
  31. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/kr_types/kerykeion_exception.py +0 -0
  32. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/kr_types/kr_literals.py +0 -0
  33. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/relationship_score/__init__.py +0 -0
  34. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/relationship_score/relationship_score.py +0 -0
  35. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/report.py +0 -0
  36. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/settings/__init__.py +0 -0
  37. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/settings/config_constants.py +0 -0
  38. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/settings/kerykeion_settings.py +0 -0
  39. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/sweph/README.md +0 -0
  40. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/sweph/seas_18.se1 +0 -0
  41. {kerykeion-4.24.1 → kerykeion-4.24.3}/kerykeion/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.24.1
3
+ Version: 4.24.3
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://www.kerykeion.net/
6
6
  License: AGPL-3.0
@@ -46,7 +46,6 @@ def get_aspect_from_two_points(
46
46
  verdict = False
47
47
  name = None
48
48
  aspect_degrees = 0
49
- aid = None # type: ignore
50
49
 
51
50
  return {
52
51
  "verdict": verdict,
@@ -54,7 +53,6 @@ def get_aspect_from_two_points(
54
53
  "orbit": distance - aspect_degrees,
55
54
  "distance": distance - aspect_degrees,
56
55
  "aspect_degrees": aspect_degrees,
57
- "aid": aid,
58
56
  "diff": diff,
59
57
  }
60
58
 
@@ -55,8 +55,18 @@ class NatalAspects:
55
55
 
56
56
  active_points_list = get_active_points_list(self.user, self.settings, self.active_points)
57
57
 
58
- self.all_aspects_list = []
58
+ # ---> TODO: Clean this up
59
+ filtered_settings = []
60
+ for a in self.aspects_settings:
61
+ for aspect in self.active_aspects:
62
+ if a["name"] == aspect["name"]:
63
+ a["orb"] = aspect["orb"] # Assign the aspect's orb
64
+ filtered_settings.append(a)
65
+ break # Exit the inner loop once a match is found
66
+ self.aspects_settings = filtered_settings
67
+ # <--- TODO: Clean this up
59
68
 
69
+ self.all_aspects_list = []
60
70
  for first in range(len(active_points_list)):
61
71
  # Generates the aspects list without repetitions
62
72
  for second in range(first + 1, len(active_points_list)):
@@ -84,7 +94,6 @@ class NatalAspects:
84
94
  name = aspect["name"]
85
95
  orbit = aspect["orbit"]
86
96
  aspect_degrees = aspect["aspect_degrees"]
87
- aid = aspect["aid"]
88
97
  diff = aspect["diff"]
89
98
 
90
99
  if verdict == True:
@@ -96,11 +105,9 @@ class NatalAspects:
96
105
  aspect=name,
97
106
  orbit=orbit,
98
107
  aspect_degrees=aspect_degrees,
99
- aid=aid,
100
108
  diff=diff,
101
109
  p1=planet_id_decoder(self.celestial_points, active_points_list[first]["name"]),
102
110
  p2=planet_id_decoder(self.celestial_points, active_points_list[second]["name"]),
103
- is_major=self.aspects_settings[aid]["is_major"],
104
111
  )
105
112
  self.all_aspects_list.append(aspect_model)
106
113
 
@@ -119,16 +126,12 @@ class NatalAspects:
119
126
  logging.debug("Relevant aspects not already calculated, calculating now...")
120
127
  self.all_aspects
121
128
 
122
- aspects_filtered = []
123
- for a in self.all_aspects_list:
124
- if a["aspect"] in [aspect["name"] for aspect in self.active_aspects]:
125
- aspects_filtered.append(a)
126
-
127
129
  axes_list = AXES_LIST
128
130
  counter = 0
129
131
 
130
132
  # Remove aspects where the orbits exceed the maximum orb thresholds specified in the settings
131
133
  # (specified usually in kr.config.json file)
134
+ aspects_filtered = self.all_aspects
132
135
  aspects_list_subtract = []
133
136
  for a in aspects_filtered:
134
137
  counter += 1
@@ -64,8 +64,17 @@ class SynastryAspects(NatalAspects):
64
64
  first_active_points_list = get_active_points_list(self.first_user, self.settings, self.active_points)
65
65
  second_active_points_list = get_active_points_list(self.second_user, self.settings, self.active_points)
66
66
 
67
- self.all_aspects_list = []
67
+ # ---> TODO: Clean this up
68
+ filtered_settings = []
69
+ for a in self.aspects_settings:
70
+ for aspect in self.active_aspects:
71
+ if a["name"] == aspect["name"]:
72
+ a["orb"] = aspect["orb"] # Assign the aspect's orb
73
+ filtered_settings.append(a)
74
+ self.aspects_settings = filtered_settings
75
+ # <--- TODO: Clean this up
68
76
 
77
+ self.all_aspects_list = []
69
78
  for first in range(len(first_active_points_list)):
70
79
  # Generates the aspects list whitout repetitions
71
80
  for second in range(len(second_active_points_list)):
@@ -79,7 +88,6 @@ class SynastryAspects(NatalAspects):
79
88
  name = aspect["name"]
80
89
  orbit = aspect["orbit"]
81
90
  aspect_degrees = aspect["aspect_degrees"]
82
- aid = aspect["aid"]
83
91
  diff = aspect["diff"]
84
92
 
85
93
  if verdict == True:
@@ -91,11 +99,9 @@ class SynastryAspects(NatalAspects):
91
99
  aspect=name,
92
100
  orbit=orbit,
93
101
  aspect_degrees=aspect_degrees,
94
- aid=aid,
95
102
  diff=diff,
96
103
  p1=planet_id_decoder(self.celestial_points, first_active_points_list[first]["name"]),
97
104
  p2=planet_id_decoder(self.celestial_points, second_active_points_list[second]["name"]),
98
- is_major=self.aspects_settings[aid]["is_major"],
99
105
  )
100
106
  self.all_aspects_list.append(aspect_model)
101
107
 
@@ -743,7 +743,9 @@ def draw_transit_aspect_list(
743
743
 
744
744
  # aspect symbol
745
745
  # TODO: Remove the "degree" element EVERYWHERE!
746
- inner_path += f'<use x="15" y="0" xlink:href="#orb{aspects_settings[aspects_list[i]["aid"]]["degree"]}" />'
746
+ aspect_name = aspects_list[i]["aspect"]
747
+ id_value = next((a["degree"] for a in aspects_settings if a["name"] == aspect_name), None) # type: ignore
748
+ inner_path += f'<use x="15" y="0" xlink:href="#orb{id_value}" />'
747
749
 
748
750
  # second planet symbol
749
751
  inner_path += f'<g transform="translate(30,0)">'
@@ -358,26 +358,31 @@ class KerykeionChartSVG:
358
358
  def _draw_all_aspects_lines(self, r, ar):
359
359
  out = ""
360
360
  for aspect in self.aspects_list:
361
- out += draw_aspect_line(
362
- r=r,
363
- ar=ar,
364
- aspect=aspect,
365
- color=self.aspects_settings[aspect["aid"]]["color"],
366
- seventh_house_degree_ut=self.user.seventh_house.abs_pos
367
- )
368
-
361
+ aspect_name = aspect["aspect"]
362
+ aspect_color = next((a["color"] for a in self.aspects_settings if a["name"] == aspect_name), None)
363
+ if aspect_color:
364
+ out += draw_aspect_line(
365
+ r=r,
366
+ ar=ar,
367
+ aspect=aspect,
368
+ color=aspect_color,
369
+ seventh_house_degree_ut=self.user.seventh_house.abs_pos
370
+ )
369
371
  return out
370
372
 
371
373
  def _draw_all_transit_aspects_lines(self, r, ar):
372
374
  out = ""
373
375
  for aspect in self.aspects_list:
374
- out += draw_aspect_line(
375
- r=r,
376
- ar=ar,
377
- aspect=aspect,
378
- color=self.aspects_settings[aspect["aid"]]["color"],
379
- seventh_house_degree_ut=self.user.seventh_house.abs_pos
380
- )
376
+ aspect_name = aspect["aspect"]
377
+ aspect_color = next((a["color"] for a in self.aspects_settings if a["name"] == aspect_name), None)
378
+ if aspect_color:
379
+ out += draw_aspect_line(
380
+ r=r,
381
+ ar=ar,
382
+ aspect=aspect,
383
+ color=aspect_color,
384
+ seventh_house_degree_ut=self.user.seventh_house.abs_pos
385
+ )
381
386
  return out
382
387
 
383
388
  def _create_template_dictionary(self) -> ChartTemplateDictionary:
@@ -448,7 +453,7 @@ class KerykeionChartSVG:
448
453
  mode_name = swe.get_ayanamsa_name(getattr(swe, mode_const))
449
454
  zodiac_info = f"Ayanamsa: {mode_name}"
450
455
 
451
- template_dict["bottomLeft0"] = f"{self.user.houses_system_name} Houses"
456
+ template_dict["bottomLeft0"] = f"{self.user.houses_system_name.capitalize()} Houses"
452
457
  template_dict["bottomLeft1"] = zodiac_info
453
458
 
454
459
  if self.chart_type in ["Natal", "ExternalNatal", "Synastry"]:
@@ -170,11 +170,9 @@ class AspectModel(SubscriptableBaseModel):
170
170
  aspect: str
171
171
  orbit: float
172
172
  aspect_degrees: int
173
- aid: int
174
173
  diff: float
175
174
  p1: int
176
175
  p2: int
177
- is_major: bool
178
176
 
179
177
 
180
178
  class ZodiacSignModel(SubscriptableBaseModel):
@@ -5,7 +5,7 @@
5
5
 
6
6
 
7
7
  from pydantic import Field
8
- from typing import List, Optional
8
+ from typing import List, Optional, Union
9
9
  from kerykeion.kr_types.kr_models import SubscriptableBaseModel
10
10
 
11
11
 
@@ -78,10 +78,8 @@ class KerykeionSettingsAspectModel(SubscriptableBaseModel):
78
78
 
79
79
  degree: int = Field(title="Aspect Degrees", description="The degree of the aspect")
80
80
  name: str = Field(title="Aspect Name", description="The name of the aspect")
81
- is_major: bool = Field(title="Aspect is Major", description="Is the aspect major?")
82
- orb: int = Field(title="Aspect Orb", description="The orb of the aspect")
83
81
  color: str = Field(title="Aspect Color", description="The color of the aspect")
84
-
82
+ orb: Optional[int] = Field(title="Aspect Orb", description="The orb of the aspect", default=None)
85
83
 
86
84
  # Language Settings
87
85
  class KerykeionLanguageCelestialPointModel(SubscriptableBaseModel):
@@ -40,6 +40,8 @@ class RelationshipScoreFactory:
40
40
  ("Rare Exceptional", float("inf")),
41
41
  ]
42
42
 
43
+ MAJOR_ASPECTS = {"conjunction", "opposition", "square", "trine", "sextile"}
44
+
43
45
  def __init__(
44
46
  self,
45
47
  first_subject: Union[AstrologicalSubject, AstrologicalSubjectModel],
@@ -76,7 +78,7 @@ class RelationshipScoreFactory:
76
78
  aspect (dict): Aspect information.
77
79
  points (int): Points to add.
78
80
  """
79
- if self.use_only_major_aspects and not aspect["is_major"]:
81
+ if self.use_only_major_aspects and aspect["aspect"] not in self.MAJOR_ASPECTS:
80
82
  return
81
83
 
82
84
  self.score_value += points
@@ -446,77 +446,66 @@
446
446
  "degree": 0,
447
447
  "name": "conjunction",
448
448
  "is_major": true,
449
- "orb": 10,
450
449
  "color": "var(--kerykeion-chart-color-conjunction)"
451
450
  },
452
451
  {
453
452
  "degree": 30,
454
453
  "name": "semi-sextile",
455
454
  "is_major": false,
456
- "orb": 1,
457
455
  "color": "var(--kerykeion-chart-color-semi-sextile)"
458
456
  },
459
457
  {
460
458
  "degree": 45,
461
459
  "name": "semi-square",
462
460
  "is_major": false,
463
- "orb": 1,
464
461
  "color": "var(--kerykeion-chart-color-semi-square)"
465
462
  },
466
463
  {
467
464
  "degree": 60,
468
465
  "name": "sextile",
469
466
  "is_major": true,
470
- "orb": 6,
471
467
  "color": "var(--kerykeion-chart-color-sextile)"
472
468
  },
473
469
  {
474
470
  "degree": 72,
475
471
  "name": "quintile",
476
472
  "is_major": false,
477
- "orb": 1,
478
473
  "color": "var(--kerykeion-chart-color-quintile)"
479
474
  },
480
475
  {
481
476
  "degree": 90,
482
477
  "name": "square",
483
478
  "is_major": true,
484
- "orb": 5,
485
479
  "color": "var(--kerykeion-chart-color-square)"
486
480
  },
487
481
  {
488
482
  "degree": 120,
489
483
  "name": "trine",
490
484
  "is_major": true,
491
- "orb": 8,
492
485
  "color": "var(--kerykeion-chart-color-trine)"
493
486
  },
494
487
  {
495
488
  "degree": 135,
496
489
  "name": "sesquiquadrate",
497
490
  "is_major": false,
498
- "orb": 1,
499
491
  "color": "var(--kerykeion-chart-color-sesquiquadrate)"
500
492
  },
501
493
  {
502
494
  "degree": 144,
503
495
  "name": "biquintile",
504
496
  "is_major": false,
505
- "orb": 1,
506
497
  "color": "var(--kerykeion-chart-color-biquintile)"
507
498
  },
508
499
  {
509
500
  "degree": 150,
510
501
  "name": "quincunx",
511
502
  "is_major": false,
512
- "orb": 1,
513
503
  "color": "var(--kerykeion-chart-color-quincunx)"
514
504
  },
515
505
  {
516
506
  "degree": 180,
517
507
  "name": "opposition",
518
508
  "is_major": true,
519
- "orb": 10,
520
509
  "color": "var(--kerykeion-chart-color-opposition)"
521
510
  }
522
511
  ],
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kerykeion"
3
- version = "4.24.1"
3
+ version = "4.24.3"
4
4
  authors = ["Giacomo Battaglia <kerykeion.astrology@gmail.com>"]
5
5
  description = "A python library for astrology."
6
6
  license = "AGPL-3.0"
File without changes
File without changes