kerykeion 5.0.0a5__py3-none-any.whl → 5.0.0a7__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.

@@ -96,7 +96,12 @@ def draw_planets_v2(
96
96
  point_idx = position_index_map[abs_position]
97
97
 
98
98
  # Find previous and next point positions for distance calculations
99
- if position_idx == 0:
99
+ # Handle special case when there's only one planet
100
+ if len(sorted_positions) == 1:
101
+ # With only one planet, there are no adjacent planets
102
+ prev_position = main_points_abs_positions[point_idx]
103
+ next_position = main_points_abs_positions[point_idx]
104
+ elif position_idx == 0:
100
105
  prev_position = main_points_abs_positions[position_index_map[sorted_positions[-1]]]
101
106
  next_position = main_points_abs_positions[position_index_map[sorted_positions[1]]]
102
107
  elif position_idx == len(sorted_positions) - 1:
@@ -107,8 +112,13 @@ def draw_planets_v2(
107
112
  next_position = main_points_abs_positions[position_index_map[sorted_positions[position_idx + 1]]]
108
113
 
109
114
  # Calculate distance to adjacent points
110
- distance_to_prev = degreeDiff(prev_position, main_points_abs_positions[point_idx])
111
- distance_to_next = degreeDiff(next_position, main_points_abs_positions[point_idx])
115
+ # When there's only one planet, set distances to a large value to prevent grouping
116
+ if len(sorted_positions) == 1:
117
+ distance_to_prev = 360.0 # Maximum possible distance
118
+ distance_to_next = 360.0 # Maximum possible distance
119
+ else:
120
+ distance_to_prev = degreeDiff(prev_position, main_points_abs_positions[point_idx])
121
+ distance_to_next = degreeDiff(next_position, main_points_abs_positions[point_idx])
112
122
 
113
123
  # Store position and distance information
114
124
  planets_by_position[position_idx] = [point_idx, distance_to_prev, distance_to_next]