Skip to content

Fix runtime calculation regressions and config cache sync - #78

Open
Ethan-Wang-dev wants to merge 1 commit into
naturalstupid:mainfrom
Ethan-Wang-dev:fix/runtime-calculation-regressions
Open

Ethan-Wang-dev wants to merge 1 commit into
naturalstupid:mainfrom
Ethan-Wang-dev:fix/runtime-calculation-regressions

Conversation

@Ethan-Wang-dev

Copy link
Copy Markdown

Summary

This PR fixes several runtime regressions found while exercising the public calculation APIs under the dependencies currently pinned by the project.

  • Iterate the dictionary-valued planet_list correctly in planetary_positions() and preserve public planet IDs.
  • Preserve seconds in local_time_to_jdut1() and use the supported cal= keyword for swe.utc_to_jd().
  • Synchronize config changes with imported runtime state:
    • apply ayanamsa changes to Swiss Ephemeris;
    • refresh the planet list for the actual include_uranus_to_pluto setting key;
    • refresh cached position and rise/set flags;
    • allow topocentric flags to be refreshed before observer coordinates are available.
  • Make Horoscope raise ValueError for missing location input instead of printing and terminating the process.
  • Correct 12-hour AM/PM parsing, including noon and midnight, while preserving 24-hour input.
  • Pass place to drik.vaara() when building calendar information.
  • Honor and propagate the selected true-lunar-year method instead of always choosing the same-phase implementation.

The stable integration facade maintained in the fork is intentionally not included in this PR.

Tests

Added focused regression coverage for every item above, including an actual get_calendar_information() call and config cache transitions.

PYTHONPATH=src python -m pytest -q tests/test_upstream_runtime_fixes.py
.......                                                                  [100%]
7 passed in 0.75s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants