kerykeion 4.0.7__py3-none-any.whl → 4.1.1__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 +2 -2
- kerykeion/aspects/aspects_utils.py +185 -0
- kerykeion/aspects/natal_aspects.py +41 -203
- kerykeion/aspects/synastry_aspects.py +26 -10
- kerykeion/astrological_subject.py +69 -5
- kerykeion/charts/kerykeion_chart_svg.py +4 -4
- kerykeion/relationship_score.py +1 -1
- kerykeion/settings/__init__.py +1 -1
- kerykeion/settings/kerykeion_settings.py +2 -2
- {kerykeion-4.0.7.dist-info → kerykeion-4.1.1.dist-info}/METADATA +1 -1
- {kerykeion-4.0.7.dist-info → kerykeion-4.1.1.dist-info}/RECORD +13 -14
- LICENSE +0 -661
- kerykeion-4.0.7.dist-info/LICENSE +0 -661
- {kerykeion-4.0.7.dist-info → kerykeion-4.1.1.dist-info}/WHEEL +0 -0
- {kerykeion-4.0.7.dist-info → kerykeion-4.1.1.dist-info}/entry_points.txt +0 -0
|
@@ -21,6 +21,7 @@ from kerykeion.utilities import get_number_from_name, calculate_position
|
|
|
21
21
|
from pathlib import Path
|
|
22
22
|
from typing import Union, Literal
|
|
23
23
|
|
|
24
|
+
DEFAULT_GEONAMES_USERNAME = "century.boy"
|
|
24
25
|
|
|
25
26
|
logger = getLogger(__name__)
|
|
26
27
|
basicConfig(
|
|
@@ -131,7 +132,7 @@ class AstrologicalSubject:
|
|
|
131
132
|
lng: Union[int, float] = 0,
|
|
132
133
|
lat: Union[int, float] = 0,
|
|
133
134
|
tz_str: str = "",
|
|
134
|
-
geonames_username: str =
|
|
135
|
+
geonames_username: Union[str, None] = None,
|
|
135
136
|
zodiac_type: ZodiacType = "Tropic",
|
|
136
137
|
online: bool = True,
|
|
137
138
|
) -> None:
|
|
@@ -144,7 +145,6 @@ class AstrologicalSubject:
|
|
|
144
145
|
)
|
|
145
146
|
)
|
|
146
147
|
|
|
147
|
-
|
|
148
148
|
self.name = name
|
|
149
149
|
self.year = year
|
|
150
150
|
self.month = month
|
|
@@ -156,10 +156,31 @@ class AstrologicalSubject:
|
|
|
156
156
|
self.lng = lng
|
|
157
157
|
self.lat = lat
|
|
158
158
|
self.tz_str = tz_str
|
|
159
|
-
self._geonames_username = geonames_username
|
|
160
159
|
self.zodiac_type = zodiac_type
|
|
161
160
|
self.online = online
|
|
162
161
|
self.json_dir = Path.home()
|
|
162
|
+
self.geonames_username = geonames_username
|
|
163
|
+
|
|
164
|
+
# This message is set to encourage the user to set a custom geonames username
|
|
165
|
+
if geonames_username is None and online:
|
|
166
|
+
logger.info(
|
|
167
|
+
"\n"
|
|
168
|
+
"********" + \
|
|
169
|
+
"\n" + \
|
|
170
|
+
"NO GEONAMES USERNAME SET!" + \
|
|
171
|
+
"\n" + \
|
|
172
|
+
"Using the default geonames username is not recommended, please set a custom one!" + \
|
|
173
|
+
"\n" + \
|
|
174
|
+
"You can get one for free here:" + \
|
|
175
|
+
"\n" + \
|
|
176
|
+
"https://www.geonames.org/login" + \
|
|
177
|
+
"\n" + \
|
|
178
|
+
"Keep in mind that the default username is limited to 2000 requests per hour and is shared with everyone else using this library." + \
|
|
179
|
+
"\n" + \
|
|
180
|
+
"********"
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
self.geonames_username = DEFAULT_GEONAMES_USERNAME
|
|
163
184
|
|
|
164
185
|
if not self.city:
|
|
165
186
|
self.city = "London"
|
|
@@ -197,7 +218,7 @@ class AstrologicalSubject:
|
|
|
197
218
|
geonames = FetchGeonames(
|
|
198
219
|
self.city,
|
|
199
220
|
self.nation,
|
|
200
|
-
username=self.
|
|
221
|
+
username=self.geonames_username,
|
|
201
222
|
)
|
|
202
223
|
self.city_data: dict[str, str] = geonames.get_serialized_data()
|
|
203
224
|
|
|
@@ -243,7 +264,50 @@ class AstrologicalSubject:
|
|
|
243
264
|
self.julian_day = float(swe.julday(self.utc.year, self.utc.month, self.utc.day, self.utc_time))
|
|
244
265
|
|
|
245
266
|
def _houses(self) -> None:
|
|
246
|
-
"""
|
|
267
|
+
"""
|
|
268
|
+
Calculate positions and store them in dictionaries
|
|
269
|
+
|
|
270
|
+
https://www.astro.com/faq/fq_fh_owhouse_e.htm
|
|
271
|
+
https://github.com/jwmatthys/pd-swisseph/blob/master/swehouse.c#L685
|
|
272
|
+
hsys = letter code for house system;
|
|
273
|
+
A equal
|
|
274
|
+
E equal
|
|
275
|
+
B Alcabitius
|
|
276
|
+
C Campanus
|
|
277
|
+
D equal (MC)
|
|
278
|
+
F Carter "Poli-Equatorial"
|
|
279
|
+
G 36 Gauquelin sectors
|
|
280
|
+
H horizon / azimut
|
|
281
|
+
I Sunshine solution Treindl
|
|
282
|
+
i Sunshine solution Makransky
|
|
283
|
+
K Koch
|
|
284
|
+
L Pullen SD "sinusoidal delta", ex Neo-Porphyry
|
|
285
|
+
M Morinus
|
|
286
|
+
N equal/1=Aries
|
|
287
|
+
O Porphyry
|
|
288
|
+
P Placidus
|
|
289
|
+
Q Pullen SR "sinusoidal ratio"
|
|
290
|
+
R Regiomontanus
|
|
291
|
+
S Sripati
|
|
292
|
+
T Polich/Page ("topocentric")
|
|
293
|
+
U Krusinski-Pisa-Goelzer
|
|
294
|
+
V equal Vehlow
|
|
295
|
+
W equal, whole sign
|
|
296
|
+
X axial rotation system/ Meridian houses
|
|
297
|
+
Y APC houses
|
|
298
|
+
"""
|
|
299
|
+
|
|
300
|
+
if self.zodiac_type == "Sidereal":
|
|
301
|
+
self.houses_degree_ut = swe.houses_ex(
|
|
302
|
+
tjdut=self.julian_day, lat=self.lat, lon=self.lng, hsys=str.encode('P'), flags=swe.FLG_SIDEREAL
|
|
303
|
+
)[0]
|
|
304
|
+
elif self.zodiac_type == "Tropic":
|
|
305
|
+
self.houses_degree_ut = swe.houses(
|
|
306
|
+
tjdut=self.julian_day, lat=self.lat, lon=self.lng, hsys=str.encode('P')
|
|
307
|
+
)[0]
|
|
308
|
+
else:
|
|
309
|
+
raise KerykeionException("Zodiac type not recognized! Please use 'Tropic' or 'Sidereal'")
|
|
310
|
+
|
|
247
311
|
point_type: Literal["Planet", "House"] = "House"
|
|
248
312
|
# creates the list of the house in 360°
|
|
249
313
|
self.houses_degree_ut = swe.houses(self.julian_day, self.lat, self.lng)[0]
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import pytz
|
|
8
8
|
|
|
9
9
|
from datetime import datetime
|
|
10
|
-
from kerykeion.settings.kerykeion_settings import
|
|
10
|
+
from kerykeion.settings.kerykeion_settings import get_settings
|
|
11
11
|
from kerykeion.aspects.synastry_aspects import SynastryAspects
|
|
12
12
|
from kerykeion.aspects.natal_aspects import NatalAspects
|
|
13
13
|
from kerykeion.astrological_subject import AstrologicalSubject
|
|
@@ -127,7 +127,7 @@ class KerykeionChartSVG:
|
|
|
127
127
|
|
|
128
128
|
if self.chart_type == "Natal" or self.chart_type == "ExternalNatal":
|
|
129
129
|
natal_aspects_instance = NatalAspects(self.user, new_settings_file=self.new_settings_file)
|
|
130
|
-
self.aspects_list = natal_aspects_instance.
|
|
130
|
+
self.aspects_list = natal_aspects_instance.relevant_aspects
|
|
131
131
|
|
|
132
132
|
# TODO: If not second should exit
|
|
133
133
|
if self.chart_type == "Transit" or self.chart_type == "Synastry":
|
|
@@ -279,7 +279,7 @@ class KerykeionChartSVG:
|
|
|
279
279
|
"""
|
|
280
280
|
Parse the settings file.
|
|
281
281
|
"""
|
|
282
|
-
settings =
|
|
282
|
+
settings = get_settings(settings_file)
|
|
283
283
|
|
|
284
284
|
language = settings["general_settings"]["language"]
|
|
285
285
|
self.language_settings = settings["language_settings"].get(language, "EN")
|
|
@@ -1080,7 +1080,7 @@ class KerykeionChartSVG:
|
|
|
1080
1080
|
def _makeAspectsTransit(self, r, ar):
|
|
1081
1081
|
out = ""
|
|
1082
1082
|
|
|
1083
|
-
self.aspects_list = SynastryAspects(self.user, self.t_user, new_settings_file=self.new_settings_file).
|
|
1083
|
+
self.aspects_list = SynastryAspects(self.user, self.t_user, new_settings_file=self.new_settings_file).relevant_aspects
|
|
1084
1084
|
|
|
1085
1085
|
for element in self.aspects_list:
|
|
1086
1086
|
out += self._drawAspect(
|
kerykeion/relationship_score.py
CHANGED
|
@@ -59,7 +59,7 @@ class RelationshipScore:
|
|
|
59
59
|
self.relevant_default_aspects = []
|
|
60
60
|
self.__all_synastry_aspects = SynastryAspects(
|
|
61
61
|
first_subject, second_subject, new_settings_file=new_settings_file
|
|
62
|
-
).
|
|
62
|
+
).all_aspects
|
|
63
63
|
|
|
64
64
|
# Calculates all at initialization
|
|
65
65
|
self._get_all()
|
kerykeion/settings/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
from .kerykeion_settings import KerykeionSettingsModel,
|
|
1
|
+
from .kerykeion_settings import KerykeionSettingsModel, get_settings
|
|
@@ -17,7 +17,7 @@ basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
def
|
|
20
|
+
def get_settings(new_settings_file: Union[Path, None] = None) -> KerykeionSettingsModel:
|
|
21
21
|
"""
|
|
22
22
|
This function is used to get the settings dict from the settings file.
|
|
23
23
|
If no settings file is passed as argument, or the file is not found, it will fallback to:
|
|
@@ -71,4 +71,4 @@ def merge_settings(settings: KerykeionSettingsModel, new_settings: Dict) -> Kery
|
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
if __name__ == "__main__":
|
|
74
|
-
print(
|
|
74
|
+
print(get_settings())
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
kerykeion/__init__.py,sha256=b01JNmaaRWjA9seRjAA59Cduy1dNVJ0iU2oUFw5qZiw,3885
|
|
1
|
+
kerykeion/__init__.py,sha256=UpftP5JxYSfeRAAmXbRas1XGw4V6dNA-FllcFbKlCbo,3874
|
|
3
2
|
kerykeion/aspects/__init__.py,sha256=KAGLkC41PRsRqiV6Ii38HIME-rfTrefiKOOzC5d7Ub0,292
|
|
4
|
-
kerykeion/aspects/
|
|
5
|
-
kerykeion/aspects/
|
|
6
|
-
kerykeion/
|
|
3
|
+
kerykeion/aspects/aspects_utils.py,sha256=TIYh-4xgRWb-5ZPSlhCGHdyPyP8hSTvUsPlt9HML1JQ,5521
|
|
4
|
+
kerykeion/aspects/natal_aspects.py,sha256=BMDuruu4b0Gy2bv0UivFlHDtsBS9Eoe20QIICMQerNY,4907
|
|
5
|
+
kerykeion/aspects/synastry_aspects.py,sha256=lbffXrySvICCVtsXjOtyjQphoDO3HoCmAmFGnp8JMck,3583
|
|
6
|
+
kerykeion/astrological_subject.py,sha256=LsVKt1VEIl-JksNzu0wBF2KWesu7tqlpvnGZAFYSNs8,23682
|
|
7
7
|
kerykeion/charts/__init__.py,sha256=3WzR2n9dr6MDzjTbEQOYpXSFlhfMfga5YWNsPawdbRw,127
|
|
8
8
|
kerykeion/charts/charts_utils.py,sha256=qQMXu5XZCCjvyqL62fzh4JnKLzd_G6u9pcMk6f1DpIc,3197
|
|
9
|
-
kerykeion/charts/kerykeion_chart_svg.py,sha256=
|
|
9
|
+
kerykeion/charts/kerykeion_chart_svg.py,sha256=DTD1rXc9jm6GLPPsbsTNXbFThy8sQ4Zu-zBTAjT4iwg,66327
|
|
10
10
|
kerykeion/charts/templates/chart.xml,sha256=ZrkqJV3Du8vG1w8kVkM1wI-IiZNVDLDuS6dRtPz7wVo,69874
|
|
11
11
|
kerykeion/fetch_geonames.py,sha256=6tgjrwBMyjbA6YNZ4rcESyYSn0FDyi1xL2gkFuy9o6k,4774
|
|
12
12
|
kerykeion/kr_types/__init__.py,sha256=Zua2Kz_g6jphfUmtzSk3oDxFfHOrqeGjSoomVAtaqIg,199
|
|
@@ -15,16 +15,15 @@ kerykeion/kr_types/kerykeion_exception.py,sha256=CtdpOaGTox_LBGB0Ji_qtcwbgYAqBJ8
|
|
|
15
15
|
kerykeion/kr_types/kr_literals.py,sha256=hbgeq5yPuyLv9zXp7shBeEsMHOd8UQBBUa_HQnBQu7w,1034
|
|
16
16
|
kerykeion/kr_types/kr_models.py,sha256=pnUwYC3EqxPN3brmWjBUqYT_9Blxcqc--VqUoi6wfOs,3971
|
|
17
17
|
kerykeion/kr_types/settings_models.py,sha256=mUOee75TXbjOUgfr0gqGcqtx3KK3ScsPgLIEjEED9cs,12900
|
|
18
|
-
kerykeion/relationship_score.py,sha256=
|
|
18
|
+
kerykeion/relationship_score.py,sha256=xx69Sz8HDIXgsYd3eyn41E2p1HNqJoSxvaK9hzHTH-k,6910
|
|
19
19
|
kerykeion/report.py,sha256=se2ZSDKjk2v2eaMWqBFaYPhcqyGP-RlQbr6uA-9-Mz0,2481
|
|
20
|
-
kerykeion/settings/__init__.py,sha256=
|
|
21
|
-
kerykeion/settings/kerykeion_settings.py,sha256=
|
|
20
|
+
kerykeion/settings/__init__.py,sha256=QQNFCl7sgN27MKaVscqtpPk10HGz4wZS3I_7KEGMaVA,69
|
|
21
|
+
kerykeion/settings/kerykeion_settings.py,sha256=_EO6izQRXaKvTBx0B_YhuhQcCHV7jpvb5nOtZZ77loY,2406
|
|
22
22
|
kerykeion/settings/kr.config.json,sha256=AtRKIRqstmtoCBqhMviXHjqYBzVL8qdCEyHsl3fLFqQ,12282
|
|
23
23
|
kerykeion/sweph/README.md,sha256=L7FtNAJTWtrZNGKa8MX87SjduFYPYxwWhaI5fmtzNZo,73
|
|
24
24
|
kerykeion/sweph/seas_18.se1,sha256=X9nCqhZU43wJpq61WAdueVQJt9xL2UjrwPqn1Kdoa1s,223002
|
|
25
25
|
kerykeion/utilities.py,sha256=l2IuKGP687USF5uzRHJFrNmvzHMSFzZEWliWSIHUjlU,5707
|
|
26
|
-
kerykeion-4.
|
|
27
|
-
kerykeion-4.
|
|
28
|
-
kerykeion-4.
|
|
29
|
-
kerykeion-4.
|
|
30
|
-
kerykeion-4.0.7.dist-info/RECORD,,
|
|
26
|
+
kerykeion-4.1.1.dist-info/METADATA,sha256=jqrolNmt4Dnu_yubV_kVhhN-Iq0_1MaaXlrdX4aDJPk,9409
|
|
27
|
+
kerykeion-4.1.1.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
28
|
+
kerykeion-4.1.1.dist-info/entry_points.txt,sha256=5SmANYscFDDTdeovHvGQ-cnj0hdFvGoxPaWLCpyDFnQ,49
|
|
29
|
+
kerykeion-4.1.1.dist-info/RECORD,,
|