-
Removed support for Python 3.6 as it has reached "End of Life"
-
Documentation now hosted on Github Pages
- Fix for issue #77
-
Added support for moon rise and set times and azimuth / zentih calculations.
-
Dropped dependency on
pytz
and switched to usingzoneinfo
provided as part of Python 3.9 or thebackports.zoneinfo
package.
- Fix for bug #48. As per the bug report the angle to adjust for the effect of elevation should have been θ (not α).
- The sun functions can now also be passed the timezone as a string. Previously only a pytz timezone was accepted.
- Fix for bug #44 - Incorrectly raised exception when UTC sun times were on the day previous to the day asked for. This only manifested itself for timezones with a large positive offset.
- This is a code refactor as well as an update so it is highly likely that you will need to adapt your code to suit.
- Astral, AstralGeocoder & GoogleGeocoder classes removed
- Requires python 3.6+ due to the use of dataclasses
- New LocationInfo class to store a location name, region, timezone, latitude & longitude
- New Observer class to store a latitude, longitude & elevation
- Geocoder database now returns a LocationInfo instead of a Location
Keywords arguments to Astral init are now passed to the geocoder to allow for passing
the api_key
to GoogleGeocoder.
Added method to AstralGeocoder to add locations to the database
Version 1.9 broke the sun_utc method. Sun UTC calculation passed incorrect parameter to more specific methods e.g. sunrise, sunset etc.
Corrected version number in module source code.
Sun calculations now take into account the elevation of the location.
Added command line interface to return sun information as json. Added support for no timezone in Location methods.
Changed GoogleGeocoder test to not use raise...from as this is not valid for Python 2
- Requests is now only needed when using GoogleGeocoder
- GoogleGeocoder now requires the
api_key
parameter to be passed to the constructor
- Updated Travis CI configuration
- requirements-dev.txt
- Added api_key parameter to GoogleGeocoder init method. Idea from wpietruszewski #12
- this file
- dawn_utc, sunrise_utc, sunset_utc and dusk_utc now only raise AstralError for a math domain exception all other exceptions are passed through.
- moon_phase now takes another parameter if the type to return either int (the default) or float