Add Seiscomp scml0.14 compatibility, migrate code from sc3ml to scml#3651
Add Seiscomp scml0.14 compatibility, migrate code from sc3ml to scml#3651filefolder wants to merge 12 commits intoobspy:masterfrom
Conversation
|
Solid work again @filefolder ! Thanks! and indeed, needed for 1.5.0. We should get some seiscomp guys check this PR too: @gempa-jabe @gempa-dirk could you have a look here ? It'd be cool to have your input ! 🥳 |
gempa-dirk
left a comment
There was a problem hiding this comment.
For style sheet conversion you may simply consider the files in https://github.com/SeisComP/common/blob/master/libs/xml/ in order to drop a line-by-line review.
|
should there be some kind of DeprecationWarning to the SC3ML -> SCML format ? |
|
That was my intent but I am actually not too sure how to implement. Simple way could be (core/event/catalog.py and core/inventory/inventory.py) I am aware of |
|
OK, have rebased and added a deprecation warning (which actually manually changes format instances of |
If you have considered my previous recommendation, then I have no further comments. |
Thanks Dirk, yes they're the same files. I think I replied to one of the code comments. |
have addressed everything- thanks!
What does this PR do?
Adds read/write capability for the new Seiscomp 7.0.0
0.14schemaThere was a big shift on this release from using "sc3ml" to just "scml" which required a bit of juggling. Accordingly re-wrote a lot of code references from "sc3ml" to "scml" including adding the option to use
SCMLas a format option, keepingSC3MLin for backwards compatibility (should add a depreciation warning though).Refreshes the published XSL files for all versions which usually is a great improvement on reading and writing. However there was a change/bugfix in their published XSL on 26.07.2024 regarding the confidence ellipsoids were calculated, seems they were off by 1000x due to a kilometer/meter mix-up. This was fixed from 0.10 on (which I believe was SC 3 or 4?) but not in 0.9 and below, so I had to skip testing on those. Some test data also had to be updated to suit. The older "wrong" versions of the XSL remain for legacy reasons (matching what is still included in SC) but I did drop 0.6 support as it was causing additional problems and is thoroughly decrepit. Users can always dig up the XLS files and do this manually if needed.
Another feature that I think was missing is the option to save SCML to whichever version you like. By default it is 0.12 which from memory is the last sort of significant update and should be compatible with versions 5+.
I have added a few 0.14 tests but nothing that tests any of the more esoteric event types. As the changes from 0.13 are fairly small I don't envision anything weird happening.
I think important to have out for 1.5 ...