Skip to content

Update get_obslist file handling - #1716

Merged
mmccrackan merged 1 commit into
masterfrom
260812_get_obslist_doc
Aug 14, 2026
Merged

Update get_obslist file handling#1716
mmccrackan merged 1 commit into
masterfrom
260812_get_obslist_doc

Conversation

@mmccrackan

Copy link
Copy Markdown
Contributor

Just a minor change to make it more clear that get_obslist accepts either a file input or obsdb query. Came up when #1676 was being tested.

@msilvafe

msilvafe commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

I'm a bit confused by this PR...what exactly is this solving? In SAT-ISO we already routinely pass paths to a txt file with a list of obsids in it and it's handled just fine through the block:

try:
    with open(query, "r") as fname:
        return [context.obsdb.get(line.split()[0]) for line in fname]
except FileNotFoundError:

@mmccrackan

Copy link
Copy Markdown
Contributor Author

I'm a bit confused by this PR...what exactly is this solving? In SAT-ISO we already routinely pass paths to a txt file with a list of obsids in it and it's handled just fine through the block:

try:
    with open(query, "r") as fname:
        return [context.obsdb.get(line.split()[0]) for line in fname]
except FileNotFoundError:

Mostly it was just to make it more obvious in the code that this function accepts a text file as input (wasn't in the docstring). I figured I'd just improve the handling of file inputs at the same time instead of just having it do a try except. There were no bugs in the implementation.

@mmccrackan
mmccrackan merged commit f550986 into master Aug 14, 2026
5 checks passed
@mmccrackan
mmccrackan deleted the 260812_get_obslist_doc branch August 14, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants