iris-edu / yasmine-stationxml-editor

GNU General Public License v3.0
11 stars 3 forks source link

Yasmine shouldn't accept other files import than stationXML #4

Open jmsaurel opened 2 years ago

jmsaurel commented 2 years ago

Because yasmine backend uses ObsPy, the file import support all the metadata files supported by ObsPy read_inventory. This includes stationXML, but also some version of the SeisComP inventoryXML, dataless and probably some others.

Except stationXML, the other format are partly supported or support is limited to some version.

Yasmine should reject any file that is not a stationXML.

rcasey-earthscope commented 2 years ago

An interesting thought. What will be gained by having Yasmine limit the kinds of metadata files that can be imported? Is it that some formats are not complete? I wonder if that is an issue given that Yasmine would allow the user to fill in the additional information?

The main thing I am thinking of is that seismic metadata comes in a number of different forms and historically, users all have their favorite format, or are trying to convert from one format to another. Would we be closing the door on that feature?

autumnjohnson commented 2 years ago

I don't think you would be closing the door because validation of additional file types may be added when that time comes.

The only way to tell if an XML file is StationXML is to validate it against the StationXML schema. Would someone ever want to import or save an invalid StationXML file that they then continue to work on or edit in the GUI later?

jmsaurel commented 2 years ago

What will be gained by having Yasmine limit the kinds of metadata files that can be imported?

Less weird cases and questions to answer.

So far, we never looked at or though about how to handle other formats at the import into Yasmine. This idea came when a colleague complained that the import of his XML failed : it was in fact an inventoryXML from SeisComP, in a version not yet supported by ObsPy and Yasmine.

Maybe we could just add one more disclaimer to say that Yasmine using ObsPy, it supports the import of other types of metadata, but we cannot guarantee anything about something else than the stationXML.

rcasey-earthscope commented 2 years ago
Yes, I think that would be a good disclaimer to add, Jean-Marie.

-Rob

On Mar 7, 2022, at 3:03 AM, Jean-Marie SAUREL @.***> wrote:

What will be gained by having Yasmine limit the kinds of metadata files that can be imported?

Less weird cases and questions to answer.

So far, we never looked at or though about how to handle other formats at the import into Yasmine. This idea came when a colleague complained that the import of his XML failed : it was in fact an inventoryXML from SeisComP, in a version not yet supported by ObsPy and Yasmine.

Maybe we could just add one more disclaimer to say that Yasmine using ObsPy, it supports the import of other types of metadata, but we cannot guarantee anything about something else than the stationXML.

— Reply to this email directly, view it on GitHub https://github.com/iris-edu/yasmine-stationxml-editor/issues/4#issuecomment-1060414755, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFL4VNZOOCP7XQKAIGYCL2TU6XH67ANCNFSM5PTYZU7Q. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.

autumnjohnson commented 2 years ago

Okay. And, just to be clear: it would be easy enough to limit what files we support with ObsPy's command: read_inventory(..).format("STATIONXML")

rcasey-earthscope commented 6 months ago

Okay, so we leave this as a desired feature, limit import explicitly to StationXML and make sure it's documented so the user understands.