Schema alias issue #133
pavlis
started this conversation in
Design & Development
Replies: 1 comment 1 reply
-
I just had that implemented in 89adaf3. It uses dict as the input and will automatically reference of all the aliases in its internal container, so users can call the clear_alias method from the same schema object to reverse the change. I think that should work. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was revising the Metadata tutorial and ran across something that is either a gap in the implementation of Schema or something you (Ian) may have decided to omit.
In MetadataDefinitions we had this method:
The idea of this method was to automate the process of applying a standard set of aliases like obspy or SAC. That method is not found in schema.py. In fact, I just realized it is noted in the file as "TODO".
What is the plan for that? We might want to consider a different design than the C++ code. Seems to me a useful signature for the implementation in python would be this:
md is the Metadata container to apply the aliases to, alias_name would refer to a defined name set like SAC and alias_to_apply would be a dict (might prefer a list of 2 element tuples) of a custom set of aliases to apply. The later would provide a mechanism to define aliases on the fly without having to define the aliases in the schema. That functionality might be a problem thought. Not sure enough about what is cached in the current schema.py implementation.
Beta Was this translation helpful? Give feedback.
All reactions