Make MSID.content into a property to prevent unnecessary remote access#282
Merged
Make MSID.content into a property to prevent unnecessary remote access#282
MSID.content into a property to prevent unnecessary remote access#282Conversation
2 tasks
jeanconn
reviewed
Nov 3, 2025
|
|
||
| @property | ||
| def content(self) -> str | None: | ||
| return content.get(self.MSID) if "cxc" in data_source.sources() else None |
Contributor
There was a problem hiding this comment.
This makes sense to me, but do we also want to define the content for the stk computed msids? Otherwise we end up trying to do the remote access query again if the user wants a content for the Msid:
In [9]: ephem = fetch.Msid("orbitephem_stk_x", "2025:001", "2025:002")
In [10]: ephem.content
Enter hostname (or IP) of Ska server (enter to cancel):
Member
Author
There was a problem hiding this comment.
There is no real reason that a user would try getting ephem.content since it is not defined. So probably this would be fixing a problem that does not happen in practice.
55 tasks
jeanconn
approved these changes
Jan 7, 2026
This was referenced Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Currently if remote access is enabled (which is the default on Windows) then any
fetch.MSIDcall initiates a remote access to get thecontentdict (map of MSID to content type) from the remote server. This is not needed if the MSID is a computed MSID likeorbitephem_stk_xthat does not require remote CXC telemetry, or ifMAUDEis selected as the data source.Interface impacts
Testing
Unit tests
Independent check of unit tests by Jean
Functional tests
This code produces the expected output and does not initiate a remote connection.
Output