New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
seedlink client: add option to fetch available stations #2405
Conversation
7ec4328
to
8cd49e6
Compare
Maybe should rename the method, because other |
Yes, I think this is important for maintaining a consistent API. I am not very familiar with the seedlink client but would it make sense to also return channel level info? or maybe have a Also, is the cache really merited? I don't imagine users calling this method more than a small number of times (probably once) in the same python process, but maybe there is a use case I am overlooking. |
Yeah, I totally agree and I only thought about it when I was sending the PR. How about renaming it to But actually, I checked again and we can also query down to full SEED ID level, so maybe I change it to return an
I agree that most use cases will only do a single or some few request and that users could do the same caching easily in their programs. But it's a low hanging fruit, not very complex implementation, users tend to be lazy and just call the method again and the station request actually takes pretty long (several seconds), so I think it should stay in for use cases we might not have on the radar. |
How does this work? Does it use the |
|
it's kinda hard to figure out how to best reset all options in the underlying seedlink client, so for now, just make a new client from scratch every time.
using the new station info request
8cd49e6
to
519b283
Compare
Tests passing should be good to go. |
lxml won't parse xml from a unicode string if it includes a textual declaration of the xml encoding. seems an easy solution is to encode to bytes, utf-8 should work for all normal cases see #2405 https://stackoverflow.com/a/38244227
What does this PR do?
Adds a method to seedlink client to be able to fetch a list of network/stations for which waveform streams are provided.
Why was it initiated? Any relevant Issues?
This can help in applications to resolve wildcards in stations/networks, e.g. when using
seedlink-plotter
with"GR_*:HHZ"
as seedlink string because the realtime version of the seedlink client can not handle wildcards in network/station.PR Checklist
master
for new features,maintenance_...
for bug fixesJust remove the space in the following string after the + sign: "+ DOCS"
(e.g.
clients.fdsn,clients.arclink
) after the colon in the following magic string: "+TESTS:clients.seedlink"(you can also add "ALL" to just simply run all tests across all modules)
CHANGELOG.txt
.CONTRIBUTORS.txt
.