clnsmth / soso

For creating Science On Schema.Org (SOSO) markup in dataset landing pages to improve data discovery through search engines.
https://soso.readthedocs.io/
MIT License
1 stars 0 forks source link

refactor: exception handling for EML file types #130

Closed clnsmth closed 5 months ago

clnsmth commented 5 months ago

Raise informative exceptions for file parsing failures by the EML strategy. Currently, non-XML files input to the EML strategy result in cryptic messages raised by lxml.etree.parse. Wrap this operation in exception management clauses that check for the expected file type, estimated by the file extension.

Note we may want to go a step further and verify that the file is EML.