kerykeion 4.4.1__tar.gz → 4.4.2__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 (29) hide show
  1. {kerykeion-4.4.1 → kerykeion-4.4.2}/PKG-INFO +1 -1
  2. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/astrological_subject.py +16 -8
  3. {kerykeion-4.4.1 → kerykeion-4.4.2}/pyproject.toml +1 -1
  4. {kerykeion-4.4.1 → kerykeion-4.4.2}/LICENSE +0 -0
  5. {kerykeion-4.4.1 → kerykeion-4.4.2}/README.md +0 -0
  6. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/__init__.py +0 -0
  7. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/aspects/__init__.py +0 -0
  8. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/aspects/aspects_utils.py +0 -0
  9. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/aspects/natal_aspects.py +0 -0
  10. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/aspects/synastry_aspects.py +0 -0
  11. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/charts/__init__.py +0 -0
  12. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/charts/charts_utils.py +0 -0
  13. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/charts/kerykeion_chart_svg.py +0 -0
  14. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/charts/templates/chart.xml +0 -0
  15. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/fetch_geonames.py +0 -0
  16. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/kr_types/__init__.py +0 -0
  17. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/kr_types/chart_types.py +0 -0
  18. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/kr_types/kerykeion_exception.py +0 -0
  19. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/kr_types/kr_literals.py +0 -0
  20. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/kr_types/kr_models.py +0 -0
  21. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/kr_types/settings_models.py +0 -0
  22. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/relationship_score.py +0 -0
  23. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/report.py +0 -0
  24. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/settings/__init__.py +0 -0
  25. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/settings/kerykeion_settings.py +0 -0
  26. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/settings/kr.config.json +0 -0
  27. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/sweph/README.md +0 -0
  28. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/sweph/seas_18.se1 +0 -0
  29. {kerykeion-4.4.1 → kerykeion-4.4.2}/kerykeion/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kerykeion
3
- Version: 4.4.1
3
+ Version: 4.4.2
4
4
  Summary: A python library for astrology.
5
5
  Home-page: https://github.com/g-battaglia/kerykeion
6
6
  License: AGPL-3.0
@@ -123,11 +123,11 @@ class AstrologicalSubject:
123
123
  day: int = now.day,
124
124
  hour: int = now.hour,
125
125
  minute: int = now.minute,
126
- city: str = "",
127
- nation: str = "",
128
- lng: Union[int, float] = 0,
129
- lat: Union[int, float] = 0,
130
- tz_str: str = "",
126
+ city: Union[str, None] = None,
127
+ nation: Union[str, None] = None,
128
+ lng: Union[int, float, None] = None,
129
+ lat: Union[int, float, None] = None,
130
+ tz_str: Union[str, None] = None,
131
131
  geonames_username: Union[str, None] = None,
132
132
  zodiac_type: ZodiacType = "Tropic",
133
133
  online: bool = True,
@@ -188,7 +188,15 @@ class AstrologicalSubject:
188
188
  self.nation = "GB"
189
189
  logging.warning("No nation specified, using GB as default")
190
190
 
191
- if (not self.online) and (not lng or not lat or not tz_str):
191
+ if not self.lat:
192
+ self.lat = 51.5074
193
+ logging.warning("No latitude specified, using London as default")
194
+
195
+ if not self.lng:
196
+ self.lng = 0
197
+ logging.warning("No longitude specified, using London as default")
198
+
199
+ if (not self.online) and (not tz_str):
192
200
  raise KerykeionException(
193
201
  "You need to set the coordinates and timezone if you want to use the offline mode!"
194
202
  )
@@ -219,7 +227,7 @@ class AstrologicalSubject:
219
227
 
220
228
  def _fetch_tz_from_geonames(self) -> None:
221
229
  """Gets the nearest time zone for the calculation"""
222
- logging.debug("Conneting to Geonames...")
230
+ logging.info("Fetching timezone/coordinates from geonames")
223
231
 
224
232
  geonames = FetchGeonames(
225
233
  self.city,
@@ -247,7 +255,7 @@ class AstrologicalSubject:
247
255
  """Converts local time to utc time."""
248
256
 
249
257
  # If the coordinates are not set, get them from geonames.
250
- if (self.online) and (not self.tz_str or not self.lng or not self.lat):
258
+ if (self.online) and (not self.tz_str):
251
259
  self._fetch_tz_from_geonames()
252
260
 
253
261
  # If UTC datetime is provided, then use it directly
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kerykeion"
3
- version = "4.4.1"
3
+ version = "4.4.2"
4
4
  authors = ["Giacomo Battaglia <battaglia.giacomo@yahoo.it>"]
5
5
  description = "A python library for astrology."
6
6
  license = "AGPL-3.0"
File without changes
File without changes
File without changes