Extract planetary data into _data.py and add Wikidata refresh script

This commit is contained in:
Jan Doubravský
2026-04-21 14:25:52 +02:00
parent 0e49259a01
commit a87a0ebbd0
8 changed files with 479 additions and 166 deletions

View File

@@ -5,6 +5,18 @@ 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.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