# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.3.1] - 2026-04-22 ### Added - `Body.EARTH` enum value with `rotation_hours = 23.934`, `orbital_hours = 8766.0`, discovery epoch 1543-01-01 (Copernicus), contact epoch 1969-07-20 (Apollo 11) - `Luna` moon (Earth's Moon): tidally locked, `rotation_hours = orbital_hours = 655.72`, discovery epoch 1609-11-01 (Galileo), contact epoch 1969-07-20 (Apollo 11) - `LUNA` constant exported from `moon.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 regenerates `src/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.py` now derive their data dictionaries from `_data.py` instead of hardcoding values inline - `README.md` — updated usage examples with current output values, added Exceptions section, added Refreshing data section ## [1.2.0] - 2026-04-16 ### Added - `PlanetaryTime.time` property — current time of sol as formatted string `HH:MM:SS` - `PlanetaryTime.date` property — current date as formatted string `Year X, Sol Y` ## [1.1.0] - 2026-04-16 ### Added - `Moon` dataclass representing a natural satellite with `rotation_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_name` property for consistent name access across `Body` and `Moon` - `get_epoch_date` extended to handle `Moon` (reads `discovery_date` / `contact_date` directly from the dataclass) - `PlanetaryTime.from_earth` and all internals accept `Body | Moon` - Titan has contact epoch (Huygens probe, 2005-01-14) - `py.typed` marker — package is now PEP 561 compliant - Full pytest test suite for `Moon` and `PlanetaryTime` with moons ### Changed - `PlanetaryTime.body` return type widened to `Body | Moon` - `__str__` and `__repr__` use `display_name` instead of `.value` to support both planets and moons - `pyproject.toml` — added `description`, `license`, `keywords`, `classifiers` - `README.md` — rewritten with full usage examples, body tables, and logging docs - `LICENSE` — MIT license file added - `poetry.lock` added to `.gitignore` (library — consumers pin their own dependencies) ## [1.0.0] - 2026-04-16 ### Added - `Body` enum with all 7 classic Solar System planets (Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune) - `Body.rotation_hours` — sidereal rotation period in Earth hours - `Body.orbital_hours` — orbital period around the Sun in Earth hours - `Body.hours_per_sol` — rotation period rounded to nearest Earth hour - `Body.sols_per_year` — number of sols in one planetary year - `EpochType` enum with two modes: `DISCOVERY` and `CONTACT` - 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 - `PlanetaryTime` class representing a moment in time on a specific planetary body - `PlanetaryTime.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 `Body` and `PlanetaryTime`