4.3 KiB
4.3 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.3.1] - 2026-04-22
Added
Body.EARTHenum value withrotation_hours = 23.934,orbital_hours = 8766.0, discovery epoch 1543-01-01 (Copernicus), contact epoch 1969-07-20 (Apollo 11)Lunamoon (Earth's Moon): tidally locked,rotation_hours = orbital_hours = 655.72, discovery epoch 1609-11-01 (Galileo), contact epoch 1969-07-20 (Apollo 11)LUNAconstant exported frommoon.py
Changed
Body.__getitem__now uses 1-based indexing —Body.MARS[1]returns Phobos,Body.MARS[2]returns Deimos
[1.3.0] - 2026-04-21
Added
scripts/refresh_data.py— fetches rotation periods, orbital periods, and discovery/contact dates from Wikidata SPARQL and regeneratessrc/planetarytime/_data.py; supports--dry-run; not part of the distributed package
Changed
- Planetary and moon data extracted into
src/planetarytime/_data.py(PLANET_ROWS,MOON_ROWS) — single source of truth for all numerical constants body.py,moon.py,epoch.pynow derive their data dictionaries from_data.pyinstead of hardcoding values inlineREADME.md— updated usage examples with current output values, added Exceptions section, added Refreshing data section
[1.2.0] - 2026-04-16
Added
PlanetaryTime.timeproperty — current time of sol as formatted stringHH:MM:SSPlanetaryTime.dateproperty — current date as formatted stringYear X, Sol Y
[1.1.0] - 2026-04-16
Added
Moondataclass representing a natural satellite withrotation_hours,orbital_hours,hours_per_sol,sols_per_year,is_tidally_locked,discovery_date,contact_date- 14 moons across 5 planets: Phobos, Deimos (Mars); Io, Europa, Ganymede, Callisto (Jupiter); Titan, Enceladus (Saturn); Miranda, Ariel, Umbriel, Titania, Oberon (Uranus); Triton (Neptune)
Body.__getitem__— access moons by index, e.g.Body.MARS[0]returns Phobos- Tidally locked moons have
sols_per_year == 1(one sol = one orbit around parent planet) Body.display_nameproperty for consistent name access acrossBodyandMoonget_epoch_dateextended to handleMoon(readsdiscovery_date/contact_datedirectly from the dataclass)PlanetaryTime.from_earthand all internals acceptBody | Moon- Titan has contact epoch (Huygens probe, 2005-01-14)
py.typedmarker — package is now PEP 561 compliant- Full pytest test suite for
MoonandPlanetaryTimewith moons
Changed
PlanetaryTime.bodyreturn type widened toBody | Moon__str__and__repr__usedisplay_nameinstead of.valueto support both planets and moonspyproject.toml— addeddescription,license,keywords,classifiersREADME.md— rewritten with full usage examples, body tables, and logging docsLICENSE— MIT license file addedpoetry.lockadded to.gitignore(library — consumers pin their own dependencies)
[1.0.0] - 2026-04-16
Added
Bodyenum with all 7 classic Solar System planets (Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune)Body.rotation_hours— sidereal rotation period in Earth hoursBody.orbital_hours— orbital period around the Sun in Earth hoursBody.hours_per_sol— rotation period rounded to nearest Earth hourBody.sols_per_year— number of sols in one planetary yearEpochTypeenum with two modes:DISCOVERYandCONTACT- Discovery dates for all 7 bodies (first telescopic observation or transit)
- Contact dates for Mercury (MESSENGER 2011), Venus (Venera 7 1970), Mars (Viking 1 1976); remaining bodies have no contact yet
PlanetaryTimeclass representing a moment in time on a specific planetary bodyPlanetaryTime.from_earth(earth_dt, body, epoch_type)factory method- Properties:
year,sol,hour,minute,second,body,epoch_type __str__output format:Year {y}, Sol {s}, HH:MM:SS ({Body} / {epoch} epoch)__repr__for debugging- Exception hierarchy:
PlanetaryTimeError(base),EpochUnavailableError,DatetimePrecedesEpochError - Naive datetimes are treated as UTC
- Loguru-based debug/info logging
- Full pytest test suite for
BodyandPlanetaryTime