kerykeion 4.15.0__tar.gz → 4.18.0__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 (43) hide show
  1. {kerykeion-4.15.0 → kerykeion-4.18.0}/PKG-INFO +37 -7
  2. {kerykeion-4.15.0 → kerykeion-4.18.0}/README.md +35 -5
  3. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/__init__.py +2 -1
  4. kerykeion-4.18.0/kerykeion/aspects/aspects_utils.py +91 -0
  5. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/aspects/natal_aspects.py +25 -25
  6. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/aspects/synastry_aspects.py +22 -26
  7. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/astrological_subject.py +4 -0
  8. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/charts/charts_utils.py +131 -46
  9. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/charts/kerykeion_chart_svg.py +255 -31
  10. kerykeion-4.18.0/kerykeion/charts/templates/aspect_grid_only.xml +452 -0
  11. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/charts/templates/chart.xml +4 -1
  12. kerykeion-4.18.0/kerykeion/charts/templates/wheel_only.xml +499 -0
  13. kerykeion-4.18.0/kerykeion/charts/themes/classic.css +82 -0
  14. kerykeion-4.18.0/kerykeion/charts/themes/dark-high-contrast.css +121 -0
  15. kerykeion-4.18.0/kerykeion/charts/themes/dark.css +121 -0
  16. kerykeion-4.18.0/kerykeion/charts/themes/light.css +117 -0
  17. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/ephemeris_data.py +15 -15
  18. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/kr_types/kr_literals.py +7 -1
  19. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/kr_types/kr_models.py +19 -2
  20. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/kr_types/settings_models.py +1 -13
  21. kerykeion-4.18.0/kerykeion/relationship_score/__init__.py +2 -0
  22. kerykeion-4.18.0/kerykeion/relationship_score/relationship_score.py +175 -0
  23. kerykeion-4.18.0/kerykeion/relationship_score/relationship_score_factory.py +275 -0
  24. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/settings/kerykeion_settings.py +6 -1
  25. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/settings/kr.config.json +171 -31
  26. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/utilities.py +4 -1
  27. {kerykeion-4.15.0 → kerykeion-4.18.0}/pyproject.toml +2 -2
  28. kerykeion-4.15.0/kerykeion/aspects/aspects_utils.py +0 -176
  29. kerykeion-4.15.0/kerykeion/charts/color_style_tags.py +0 -86
  30. kerykeion-4.15.0/kerykeion/relationship_score.py +0 -206
  31. {kerykeion-4.15.0 → kerykeion-4.18.0}/LICENSE +0 -0
  32. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/aspects/__init__.py +0 -0
  33. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/charts/__init__.py +0 -0
  34. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/charts/draw_planets.py +0 -0
  35. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/enums.py +0 -0
  36. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/fetch_geonames.py +0 -0
  37. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/kr_types/__init__.py +0 -0
  38. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/kr_types/chart_types.py +0 -0
  39. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/kr_types/kerykeion_exception.py +0 -0
  40. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/report.py +0 -0
  41. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/settings/__init__.py +0 -0
  42. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/sweph/README.md +0 -0
  43. {kerykeion-4.15.0 → kerykeion-4.18.0}/kerykeion/sweph/seas_18.se1 +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.15.0
3
+ Version: 4.18.0
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://www.kerykeion.net/
6
6
  License: AGPL-3.0
7
7
  Keywords: astrology,ephemeris,astrology library,birtchart,svg,zodiac,zodiac-sing,astronomical-algorithms,synastry,astrology-calculator
8
8
  Author: Giacomo Battaglia
9
- Author-email: battaglia.giacomo@yahoo.it
9
+ Author-email: kerykeion.astrology@gmail.com
10
10
  Requires-Python: >=3.9,<4.0
11
11
  Classifier: Development Status :: 5 - Production/Stable
12
12
  Classifier: Intended Audience :: Developers
@@ -189,9 +189,12 @@ synastry_chart.makeSVG()
189
189
 
190
190
  ### Change Language
191
191
 
192
- To change the language of the chart you should create a new kr.config.js file and pass it to the BirthChartSVG class. So far the available languages are English, Portuguese, Italian, Spanish, French and Chinese.
192
+ You can change the language of the SVG by passing the `chart_language` parameter to the KerykeionChartSVG class:
193
193
 
194
- Some examples [here](https://www.kerykeion.net/docs/examples/change-language).
194
+ ```python
195
+ first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB", chart_language="ES")
196
+ ```
197
+ More details [here](https://www.kerykeion.net/docs/examples/chart-language).
195
198
 
196
199
  ## Report
197
200
 
@@ -318,6 +321,29 @@ More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
318
321
 
319
322
  Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
320
323
 
324
+ ## Themes
325
+
326
+ You can now personalize your astrological charts with different themes! Four themes are available:
327
+
328
+ - **Classic** (default)
329
+ - **Dark**
330
+ - **Dark High Contrast**
331
+ - **Light**
332
+
333
+ Each theme offers a distinct visual style, allowing you to choose the one that best suits your preferences or presentation needs. If you prefer more control over the appearance, you can opt not to set any theme, making it easier to customize the chart by overriding the default CSS variables. For more detailed instructions on how to apply themes, check the [documentation](https://www.kerykeion.net/docs/examples/theming)
334
+
335
+ Here's an example of how to set the theme:
336
+
337
+ ```python
338
+ from kerykeion import AstrologicalSubject, KerykeionChartSVG
339
+
340
+ dark_theme_subject = AstrologicalSubject("John Lennon - Dark Theme", 1940, 10, 9, 18, 30, "Liverpool", "GB")
341
+ dark_theme_natal_chart = KerykeionChartSVG(dark_high_contrast_theme_subject, theme="dark_high_contrast")
342
+ dark_theme_natal_chart.makeSVG()
343
+ ```
344
+
345
+ ![John Lennon](https://www.kerykeion.net/assets/img/showcase/John%20Lennon%20-%20Dark%20-%20Natal%20Chart.svg)
346
+
321
347
  ## Alternative Initialization
322
348
 
323
349
  You can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:
@@ -351,16 +377,20 @@ Sooner or later I'll try to write an extensive documentation.
351
377
 
352
378
  You can clone this repository or download a zip file using the right side buttons.
353
379
 
354
- ## Contributing
380
+ ## Integrate Kerykeion Functionalities in Your Project
355
381
 
356
- Feel free to contribute to the code!
382
+ If you are interested in integrating Kerykeion's astrological functionalities into your project, I would be happy to collaborate with you. Whether you need custom features, support, or consultation, feel free to reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Integration%20Request) address.
357
383
 
358
384
  ## License
359
385
 
360
386
  This project is licensed under the AGPL-3.0 License.
361
387
  To understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.
362
- If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
388
+ If you have questions, you can reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Kerykeion) address.
363
389
  As a rule of thumb, if you are using this library in a project, you should open source the code of the project with a compatible license.
364
390
 
365
391
  You can implement the logic of kerykeion in your project and also keep it closed source by using a third party API, like the [AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/). The AstrologerAPI is AGPL-3.0 compliant. Subscribing to the API is also, currently, the best way to support the project.
366
392
 
393
+ ## Contributing
394
+
395
+ Feel free to contribute to the code!
396
+
@@ -152,9 +152,12 @@ synastry_chart.makeSVG()
152
152
 
153
153
  ### Change Language
154
154
 
155
- To change the language of the chart you should create a new kr.config.js file and pass it to the BirthChartSVG class. So far the available languages are English, Portuguese, Italian, Spanish, French and Chinese.
155
+ You can change the language of the SVG by passing the `chart_language` parameter to the KerykeionChartSVG class:
156
156
 
157
- Some examples [here](https://www.kerykeion.net/docs/examples/change-language).
157
+ ```python
158
+ first = AstrologicalSubject("John Lennon", 1940, 10, 9, 18, 30, "Liverpool", "GB", chart_language="ES")
159
+ ```
160
+ More details [here](https://www.kerykeion.net/docs/examples/chart-language).
158
161
 
159
162
  ## Report
160
163
 
@@ -281,6 +284,29 @@ More examples [here](https://www.kerykeion.net/docs/examples/perspective-type/).
281
284
 
282
285
  Full list of supported perspective types [here](https://www.kerykeion.net/pydocs/kerykeion/kr_types/kr_literals.html#PerspectiveType).
283
286
 
287
+ ## Themes
288
+
289
+ You can now personalize your astrological charts with different themes! Four themes are available:
290
+
291
+ - **Classic** (default)
292
+ - **Dark**
293
+ - **Dark High Contrast**
294
+ - **Light**
295
+
296
+ Each theme offers a distinct visual style, allowing you to choose the one that best suits your preferences or presentation needs. If you prefer more control over the appearance, you can opt not to set any theme, making it easier to customize the chart by overriding the default CSS variables. For more detailed instructions on how to apply themes, check the [documentation](https://www.kerykeion.net/docs/examples/theming)
297
+
298
+ Here's an example of how to set the theme:
299
+
300
+ ```python
301
+ from kerykeion import AstrologicalSubject, KerykeionChartSVG
302
+
303
+ dark_theme_subject = AstrologicalSubject("John Lennon - Dark Theme", 1940, 10, 9, 18, 30, "Liverpool", "GB")
304
+ dark_theme_natal_chart = KerykeionChartSVG(dark_high_contrast_theme_subject, theme="dark_high_contrast")
305
+ dark_theme_natal_chart.makeSVG()
306
+ ```
307
+
308
+ ![John Lennon](https://www.kerykeion.net/assets/img/showcase/John%20Lennon%20-%20Dark%20-%20Natal%20Chart.svg)
309
+
284
310
  ## Alternative Initialization
285
311
 
286
312
  You can initialize the AstrologicalSubject from a **UTC** ISO 8601 string:
@@ -314,15 +340,19 @@ Sooner or later I'll try to write an extensive documentation.
314
340
 
315
341
  You can clone this repository or download a zip file using the right side buttons.
316
342
 
317
- ## Contributing
343
+ ## Integrate Kerykeion Functionalities in Your Project
318
344
 
319
- Feel free to contribute to the code!
345
+ If you are interested in integrating Kerykeion's astrological functionalities into your project, I would be happy to collaborate with you. Whether you need custom features, support, or consultation, feel free to reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Integration%20Request) address.
320
346
 
321
347
  ## License
322
348
 
323
349
  This project is licensed under the AGPL-3.0 License.
324
350
  To understand how this impacts your use of the software, please see the [LICENSE](LICENSE) file for details.
325
- If you have questions, you can reach out to me at my [email](mailto:battaglia.giacomo@yahoo.it?subject=Kerykeion) address.
351
+ If you have questions, you can reach out to me at my [email](mailto:kerykeion.astrology@gmail.com?subject=Kerykeion) address.
326
352
  As a rule of thumb, if you are using this library in a project, you should open source the code of the project with a compatible license.
327
353
 
328
354
  You can implement the logic of kerykeion in your project and also keep it closed source by using a third party API, like the [AstrologerAPI](https://rapidapi.com/gbattaglia/api/astrologer/). The AstrologerAPI is AGPL-3.0 compliant. Subscribing to the API is also, currently, the best way to support the project.
355
+
356
+ ## Contributing
357
+
358
+ Feel free to contribute to the code!
@@ -9,7 +9,8 @@ This is part of Kerykeion (C) 2024 Giacomo Battaglia
9
9
  from .astrological_subject import AstrologicalSubject
10
10
  from .charts.kerykeion_chart_svg import KerykeionChartSVG
11
11
  from .kr_types import *
12
- from .relationship_score import RelationshipScore
12
+ from .relationship_score.relationship_score import RelationshipScore
13
+ from .relationship_score.relationship_score_factory import RelationshipScoreFactory
13
14
  from .aspects import SynastryAspects, NatalAspects
14
15
  from .report import Report
15
16
  from .settings import KerykeionSettingsModel, get_settings
@@ -0,0 +1,91 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ This is part of Kerykeion (C) 2024 Giacomo Battaglia
4
+ """
5
+ # TODO: Better documentation and unit tests
6
+
7
+ from kerykeion import AstrologicalSubject
8
+ from kerykeion.settings import KerykeionSettingsModel
9
+ from swisseph import difdeg2n
10
+ from typing import Union
11
+ from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
12
+ from kerykeion.kr_types.settings_models import KerykeionSettingsCelestialPointModel, KerykeionSettingsAspectModel
13
+
14
+
15
+ def get_aspect_from_two_points(
16
+ aspects_settings: Union[list[KerykeionSettingsAspectModel], list[dict]],
17
+ point_one: Union[float, int],
18
+ point_two: Union[float, int],
19
+ ):
20
+ """
21
+ Utility function to calculate the aspects between two points.
22
+
23
+ Args:
24
+ aspects_settings (dict): Dictionary containing aspect settings.
25
+ point_one (Union[float, int]): First point.
26
+ point_two (Union[float, int]): Second point.
27
+
28
+ Returns:
29
+ dict: Dictionary containing the aspect details.
30
+ """
31
+ distance = abs(difdeg2n(point_one, point_two))
32
+ diff = abs(point_one - point_two)
33
+
34
+ for aid, aspect in enumerate(aspects_settings):
35
+ aspect_degree = aspect["degree"] # type: ignore
36
+ aspect_orb = aspect["orb"] # type: ignore
37
+
38
+ if (aspect_degree - aspect_orb) <= int(distance) <= (aspect_degree + aspect_orb):
39
+ name = aspect["name"] # type: ignore
40
+ aspect_degrees = aspect_degree
41
+ verdict = True
42
+ break
43
+ else:
44
+ verdict = False
45
+ name = None
46
+ aspect_degrees = 0
47
+ aid = None # type: ignore
48
+
49
+ return {
50
+ "verdict": verdict,
51
+ "name": name,
52
+ "orbit": distance - aspect_degrees,
53
+ "distance": distance - aspect_degrees,
54
+ "aspect_degrees": aspect_degrees,
55
+ "aid": aid,
56
+ "diff": diff,
57
+ }
58
+
59
+
60
+ def planet_id_decoder(planets_settings: list[KerykeionSettingsCelestialPointModel], name: str) -> int:
61
+ """
62
+ Check if the name of the planet is the same in the settings and return
63
+ the correct id for the planet.
64
+ """
65
+ str_name = str(name)
66
+ for planet in planets_settings:
67
+ if planet["name"] == str_name:
68
+ result = planet["id"]
69
+ return result
70
+
71
+ raise ValueError(f"Planet {name} not found in the settings")
72
+
73
+
74
+ def get_active_points_list(
75
+ subject: Union[AstrologicalSubject, AstrologicalSubjectModel], settings: Union[KerykeionSettingsModel, dict]
76
+ ) -> list:
77
+ """
78
+ Given an astrological subject and the settings, return a list of the active points.
79
+ Args:
80
+ subject (AstrologicalSubject): The astrological subject to get the active points from.
81
+ settings (Union[KerykeionSettingsModel, dict]): Settings model o dictionary.
82
+
83
+ Returns:
84
+ list: List of the active points.
85
+ """
86
+ point_list = []
87
+ for planet in settings["celestial_points"]:
88
+ if planet["is_active"] == True:
89
+ point_list.append(subject[planet["name"].lower()])
90
+
91
+ return point_list
@@ -11,7 +11,8 @@ from kerykeion.settings.kerykeion_settings import get_settings
11
11
  from dataclasses import dataclass
12
12
  from functools import cached_property
13
13
  from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points, get_active_points_list
14
- from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
14
+ from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, AspectModel
15
+ from kerykeion.kr_types.settings_models import KerykeionSettingsModel
15
16
 
16
17
 
17
18
  AXES_LIST = [
@@ -29,14 +30,14 @@ class NatalAspects:
29
30
  """
30
31
 
31
32
  user: Union[AstrologicalSubject, AstrologicalSubjectModel]
32
- new_settings_file: Union[Path, None] = None
33
+ new_settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None
33
34
 
34
35
  def __post_init__(self):
35
36
  self.settings = get_settings(self.new_settings_file)
36
37
 
37
- self.celestial_points = self.settings["celestial_points"]
38
- self.aspects_settings = self.settings["aspects"]
39
- self.axes_orbit_settings = self.settings["general_settings"]["axes_orbit"]
38
+ self.celestial_points = self.settings.celestial_points
39
+ self.aspects_settings = self.settings.aspects
40
+ self.axes_orbit_settings = self.settings.general_settings.axes_orbit
40
41
 
41
42
  @cached_property
42
43
  def all_aspects(self):
@@ -54,7 +55,8 @@ class NatalAspects:
54
55
  # Generates the aspects list without repetitions
55
56
  for second in range(first + 1, len(active_points_list)):
56
57
  aspect = get_aspect_from_two_points(
57
- self.aspects_settings, active_points_list[first]["abs_pos"], active_points_list[second]["abs_pos"]
58
+ self.aspects_settings, active_points_list[first]["abs_pos"],
59
+ active_points_list[second]["abs_pos"]
58
60
  )
59
61
 
60
62
  verdict = aspect["verdict"]
@@ -63,27 +65,23 @@ class NatalAspects:
63
65
  aspect_degrees = aspect["aspect_degrees"]
64
66
  aid = aspect["aid"]
65
67
  diff = aspect["diff"]
66
-
67
68
 
68
69
  if verdict == True:
69
- d_asp = {
70
- "p1_name": active_points_list[first]["name"],
71
- "p1_abs_pos": active_points_list[first]["abs_pos"],
72
- "p2_name": active_points_list[second]["name"],
73
- "p2_abs_pos": active_points_list[second]["abs_pos"],
74
- "aspect": name,
75
- "orbit": orbit,
76
- "aspect_degrees": aspect_degrees,
77
- "aid": aid,
78
- "diff": diff,
79
- "p1": planet_id_decoder(self.celestial_points, active_points_list[first]["name"]),
80
- "p2": planet_id_decoder(
81
- self.celestial_points,
82
- active_points_list[second]["name"],
83
- ),
84
- }
85
-
86
- self.all_aspects_list.append(d_asp)
70
+ aspect_model = AspectModel(
71
+ p1_name=active_points_list[first]["name"],
72
+ p1_abs_pos=active_points_list[first]["abs_pos"],
73
+ p2_name=active_points_list[second]["name"],
74
+ p2_abs_pos=active_points_list[second]["abs_pos"],
75
+ aspect=name,
76
+ orbit=orbit,
77
+ aspect_degrees=aspect_degrees,
78
+ aid=aid,
79
+ diff=diff,
80
+ p1=planet_id_decoder(self.celestial_points, active_points_list[first]["name"]),
81
+ p2=planet_id_decoder(self.celestial_points, active_points_list[second]["name"]),
82
+ is_major=self.aspects_settings[aid]["is_major"],
83
+ )
84
+ self.all_aspects_list.append(aspect_model)
87
85
 
88
86
  return self.all_aspects_list
89
87
 
@@ -94,6 +92,7 @@ class NatalAspects:
94
92
  the most important are hardcoded.
95
93
  Set the list with set_points and creating a list with the names
96
94
  or the numbers of the houses.
95
+ The relevant aspects are the ones that are set as active ("is_active") in the settings.
97
96
  """
98
97
 
99
98
  logging.debug("Relevant aspects not already calculated, calculating now...")
@@ -128,6 +127,7 @@ class NatalAspects:
128
127
 
129
128
  if __name__ == "__main__":
130
129
  from kerykeion.utilities import setup_logging
130
+
131
131
  setup_logging(level="debug")
132
132
 
133
133
  johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US")
@@ -11,7 +11,8 @@ from functools import cached_property
11
11
  from kerykeion.aspects.natal_aspects import NatalAspects
12
12
  from kerykeion.settings.kerykeion_settings import get_settings
13
13
  from kerykeion.aspects.aspects_utils import planet_id_decoder, get_aspect_from_two_points, get_active_points_list
14
- from kerykeion.kr_types.kr_models import AstrologicalSubjectModel
14
+ from kerykeion.kr_types.kr_models import AstrologicalSubjectModel, AspectModel
15
+ from kerykeion.kr_types.settings_models import KerykeionSettingsModel
15
16
  from typing import Union
16
17
 
17
18
 
@@ -24,7 +25,7 @@ class SynastryAspects(NatalAspects):
24
25
  self,
25
26
  kr_object_one: Union[AstrologicalSubject, AstrologicalSubjectModel],
26
27
  kr_object_two: Union[AstrologicalSubject, AstrologicalSubjectModel],
27
- new_settings_file: Union[Path, None] = None,
28
+ new_settings_file: Union[Path, KerykeionSettingsModel, dict, None] = None,
28
29
  ):
29
30
  # Subjects
30
31
  self.first_user = kr_object_one
@@ -34,9 +35,9 @@ class SynastryAspects(NatalAspects):
34
35
  self.new_settings_file = new_settings_file
35
36
  self.settings = get_settings(self.new_settings_file)
36
37
 
37
- self.celestial_points = self.settings["celestial_points"]
38
- self.aspects_settings = self.settings["aspects"]
39
- self.axes_orbit_settings = self.settings["general_settings"]["axes_orbit"]
38
+ self.celestial_points = self.settings.celestial_points
39
+ self.aspects_settings = self.settings.aspects
40
+ self.axes_orbit_settings = self.settings.general_settings.axes_orbit
40
41
 
41
42
  # Private variables of the aspects
42
43
  self._all_aspects: Union[list, None] = None
@@ -75,34 +76,29 @@ class SynastryAspects(NatalAspects):
75
76
  aid = aspect["aid"]
76
77
  diff = aspect["diff"]
77
78
 
78
-
79
79
  if verdict == True:
80
- d_asp = {
81
- "p1_name": first_active_points_list[first]["name"],
82
- "p1_abs_pos": first_active_points_list[first]["abs_pos"],
83
- "p2_name": second_active_points_list[second]["name"],
84
- "p2_abs_pos": second_active_points_list[second]["abs_pos"],
85
- "aspect": name,
86
- "orbit": orbit,
87
- "aspect_degrees": aspect_degrees,
88
- "aid": aid,
89
- "diff": diff,
90
- "p1": planet_id_decoder(
91
- self.settings.celestial_points, first_active_points_list[first]["name"]
92
- ),
93
- "p2": planet_id_decoder(
94
- self.settings.celestial_points,
95
- second_active_points_list[second]["name"],
96
- ),
97
- }
98
-
99
- self.all_aspects_list.append(d_asp)
80
+ aspect_model = AspectModel(
81
+ p1_name=first_active_points_list[first]["name"],
82
+ p1_abs_pos=first_active_points_list[first]["abs_pos"],
83
+ p2_name=second_active_points_list[second]["name"],
84
+ p2_abs_pos=second_active_points_list[second]["abs_pos"],
85
+ aspect=name,
86
+ orbit=orbit,
87
+ aspect_degrees=aspect_degrees,
88
+ aid=aid,
89
+ diff=diff,
90
+ p1=planet_id_decoder(self.celestial_points, first_active_points_list[first]["name"]),
91
+ p2=planet_id_decoder(self.celestial_points, second_active_points_list[second]["name"]),
92
+ is_major=self.aspects_settings[aid]["is_major"],
93
+ )
94
+ self.all_aspects_list.append(aspect_model)
100
95
 
101
96
  return self.all_aspects_list
102
97
 
103
98
 
104
99
  if __name__ == "__main__":
105
100
  from kerykeion.utilities import setup_logging
101
+
106
102
  setup_logging(level="debug")
107
103
 
108
104
  john = AstrologicalSubject("John", 1940, 10, 9, 18, 30, "Liverpool")
@@ -812,3 +812,7 @@ if __name__ == "__main__":
812
812
  # Test Mean Lilith
813
813
  johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", disable_chiron_and_lilith=True)
814
814
  print(johnny.mean_lilith)
815
+
816
+ # Offline mode
817
+ johnny = AstrologicalSubject("Johnny Depp", 1963, 6, 9, 0, 0, "Owensboro", "US", online=False, tz_str="America/New_York", lng=-87.1111, lat=37.7711)
818
+ print(johnny.json(dump=True, indent=2))