-
Notifications
You must be signed in to change notification settings - Fork 530
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
adding RASPISHAKE to FDSN mapping #2555
Conversation
It looks like (relevant) tests have passed, so updating PR checkbox above. |
One thing to consider is if we should exclude this special data center from the default data centers in the mass downloader (https://docs.obspy.org/packages/autogen/obspy.clients.fdsn.mass_downloader.html). It could still be included if users choose to do so but I think this should be an explicit choice given the non-standard nature of this particular data center. It might also hit it with a lot of potentially unwanted requests. |
👍 Also, I'd vote for
|
I had considered this but decided against it because it was longer than any others, and required a reformatting of the tab alignment on the docs page. I agree that it fits better with the datacenter's other identifiers. |
@krischer disabled by default would be best I think. |
@krischer am I correct in assuming that the exclusion for RASPISHAKE is done in the init function of the MassDownloader class, i.e. https://docs.obspy.org/_modules/obspy/clients/fdsn/mass_downloader/mass_downloader.html#MassDownloader.__init__? |
Looks like it. Also please add a note in the docstring for from obspy.clients.fdsn import URL_MAPPINGS
MassDownloader(providers=URL_MAPPINGS) |
@megies ok, consider these changes: class MassDownloader(object):
"""
Class facilitating data acquisition across all FDSN web service
implementations.
:param providers: List of FDSN client names or service URLS. Will use
all FDSN implementations known to ObsPy except RASPISHAKE if set to
None. The order in the list also determines their priority, if data
is available at more then one provider it will always be downloaded
from the provider that comes first in the list. To include RASPISHAKE,
you must set this parameter to
`obspy.clients.fdsn.header.URL_MAPPINGS` explicitly.
:param debug: Debug flag passed to the underlying FDSN web service clients.
:type providers: list of str or :class:`~obspy.clients.fdsn.client.Client`
instances
"""
def __init__(self, providers=None, debug=False):
# ...
if providers is None:
providers = dict(URL_MAPPINGS.items())
# ...
if "RASPISHAKE" in providers:
# exclude RASPISHAKE by default
del providers["RASPISHAKE"]
# ... |
This needs to be adapted: https://travis-ci.org/obspy/obspy/jobs/650081061#L1438 Also some trailing whitespace. |
@iannesbitt just for future reference, you should work on branches in your fork, your master is now out of sync with the main repo master branch. |
Ok. Noted. Thanks for the quick responses. |
What does this PR do?
This adds the base of the Raspberry Shake FDSN tree (http://fdsnws.raspberryshakedata.com) to the URL mapping list under
"RSHAKE"
so that it can be accessed viaWhy was it initiated? Any relevant Issues?
This is being initiated to add the RASPISHAKE datacenter (DOI: 10.7914/SN/AM) to the list of URL mapping endpoints.
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.fdsn"(you can also add "ALL" to just simply run all tests across all modules)
CHANGELOG.txt
.CONTRIBUTORS.txt
.