Temporal Moon timekeeping
Project description
MoonTime Staging
This folder is a temporary staging area to branch MoonTime into its own repository. It is intentionally ignored by Git (see repo .gitignore) so we can iterate locally without affecting the main repo until the extraction is complete.
Plan
- Extract
MoonTimeclass and helpers frommooncal.pyinto a standalone package. - Preserve public API:
MoonTime,moontime(),temporal_hms(),display_str,add_temporal(),temporal_seconds_to(), plusisoformat()andMoonTime.fromisoformat(). - Keep lunar fields available:
lunar_year,lunar_month_index,lunar_month_name,lunar_day,lunar_weekday,lunar_sun_sign,moon_phase. - Use AetherField at runtime for
lunar_sun_sign(no Skyfield at runtime). - Decouple from
mooncal: use internalmoontime.ledgerandmoontime.aetherwrappers.
Seasonal + Sunrise Features (Aether-backed)
- MoonTime now exposes:
season: "Spring" | "Summer" | "Autumn" | "Winter" (North default; setMOONTIME_HEMISPHERE=Sfor Southern)season_start: most recent equinox/solstice boundary timestampday_length_seconds,day_length_delta_seconds,day_length_trend: daylight metricssunrise_azimuth_deg: degrees from North, clockwise
sunrise_solstice_scale_0_100: 0≈equinox, 100≈solstice (latitude-aware)solar_movement: "north" | "south" | "stationary"- Temporal strings:
lunar_temporal_hms()→L↑ HH:MM:SS/L↓ HH:MM:SSplanetary_temporal_hms(body)→ e.g.,Ju↓ 02:34:10(Sun..Saturn)
- CLI prints
seasonal_summary:{scale} {season} {movement} {trend}after the display line.
Local Layout (staging)
src/moontime/— package source (to be populated during extraction)tests/— focused tests for time arithmetic and serializationrequirements.txt— runtime deps for MoonTime packagerequirements-dev.txt— test-only deps (pytest)
Notes
- This staging area is not committed. When stable, we’ll move it to a new repo and wire CI there.
- Runtime ephemeris: AetherField drives phases/signs. Sunrise/sunset for temporal hours are computed via the host project's
skyfieldcomm.twilighthelper (no direct Skyfield dependency here). In a fully standalone repo, provide a light twilight utility or persist sunrise in the ledger.
Dev Tips
- Create a venv:
python -m venv venv && .\\venv\\Scripts\\activate - Install deps:
pip install -r requirements.txt - Install test deps:
pip install -r requirements-dev.txt - Run only MoonTime tests:
pytest -q moontime/tests - If pytest is missing, install it:
pip install pytest
Config
MOONTIME_TZ: default timezone (IANA string), defaultUTC.MOONTIME_COORDS: default coordinates"lat,lon", default"0,0".MOONTIME_HEMISPHERE: defaultN; setSto invert seasonal naming.- Ledger sources: prefers in-memory
serapeum.all_lunar_years; falls back toall_lunar_years.jsonat repo root orcalendars/all_lunar_years.json. MOONTIME_SUN_PROVIDER: choose sunrise/sunset provider:auto(default; AetherField then twilight),aether(AetherField only, falls back to twilight if error), ortwilight(use hostskyfieldcomm.twilight).
Future Extraction
- AetherField:
moontime.aetherwraps the hostaetherfield. For a standalone repo, either vendor the calibrated model or declare it as an optional dependency and add a small loader.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moontime-0.1.9.tar.gz.
File metadata
- Download URL: moontime-0.1.9.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf196e1c72cef0d6c17d369ba9d1bef8637dcd302c83c99e028ec1bf36e40539
|
|
| MD5 |
fba3d82fb633251595fb9532491b6656
|
|
| BLAKE2b-256 |
02fd9223fcef386be4b7c73254c8ef0f0d8d411ba447466506175d8bfac443c1
|
File details
Details for the file moontime-0.1.9-py3-none-any.whl.
File metadata
- Download URL: moontime-0.1.9-py3-none-any.whl
- Upload date:
- Size: 20.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c223467ca917a46145f4eec447170b411d327008e2a058e6b94a8783960b379b
|
|
| MD5 |
5d4ce9ce485f15f3eae4266dfff0c4ad
|
|
| BLAKE2b-256 |
5b6eceb07e769e10c3f66c138d359154dc16ce5cdfdc1d1667910978a2470489
|