Skip to content

Rework series, Tier B-01, Minor cleanup of utils added for zshooter - #34

Open
Yashvi-Sharma wants to merge 3 commits into
mainfrom
rework/tb-01-utils-observation-helpers
Open

Yashvi-Sharma wants to merge 3 commits into
mainfrom
rework/tb-01-utils-observation-helpers

Conversation

@Yashvi-Sharma

Copy link
Copy Markdown
Collaborator

First PR in the rework series (with Claude's help) to enhance isolability for upstreaming. Each rework branch includes a markdown detailing the rationale and scope of the changes.

Starting with first of the Tier B changes (Tier B: moderate rework, no architectural changes, maybe needs API discussion).

Please refer to the included .md for a summary of the changes.

Yashvi-Sharma and others added 3 commits November 9, 2026 15:40
get_observation_info_from_cmds wrapped a single from_currsys call in a bare
except, so a missing !OBS coordinate key and a genuine failure were handled
identically. from_currsys raises ValueError when a bang-key is absent; catch
only that. Anything else now propagates instead of being flattened to None and
resurfacing as a misleading "No valid target coordinates provided".

get_next_moon and _get_next_moon_cached had no live callers; their only call
site has been commented out since it was written. The cache was also keyed to
the calendar day while calling Time.now() inside the cached body, so it could
return a result up to 24h stale, and it raised when location_key was None
despite that being the default.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant