Skip to content
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

SDS client: improve flexibility of client.FMTSTR / _get_filename() #3015

Open
megies opened this issue Mar 10, 2022 · 3 comments
Open

SDS client: improve flexibility of client.FMTSTR / _get_filename() #3015

megies opened this issue Mar 10, 2022 · 3 comments

Comments

@megies
Copy link
Member

megies commented Mar 10, 2022

Currently it is possible to re-use the SDS client for custom folder structures not following SDS schematics by replacing client.FMTSTR with some custom format string.. to some extent. Some things like e.g. "month" or "day of month" that people might use are not taken into consideration so it is not fully flexible.
People can still achieve full flexibility by subclassing sds.Client and overriding _get_filename with a custom routine, but maybe we could make it easier internally.

Kind of low priority though, since people can still achieve this.. although needing to subclass

@megies megies added this to the Future release milestone Mar 10, 2022
@obspy-bot
Copy link
Contributor

This issue has been mentioned on ObsPy Forum. There might be relevant details there:

https://discourse.obspy.org/t/request-client-for-specific-data-structure-archive-on-local-filesystem/1371/3

@ecastillot
Copy link

ecastillot commented Mar 10, 2022

Thank you very much!
I follow your advices. Only one more thing. Also, you have to change _get_filenames function because it called _get_filename.

I posted this example in case anyone needs a help.
example

@d-chambers
Copy link
Member

I am a little late to the party, but ObsPlus' WaveBank might also be useful for you. Depending on what you are trying to do, it will probably just work out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants