G-Node / python-odml

odML libraries
http://g-node.github.io/python-odml/
BSD 4-Clause "Original" or "Old" License
24 stars 30 forks source link

Change in Section type default behavior #376

Closed mpsonntag closed 4 years ago

mpsonntag commented 4 years ago

With recent updates the library now respects and enforces Section.type as a required attribute and allows save only with documents where this requirement is satisfied. To allow backwards file compatibility and ease usage, Section.type is by default set to the string n.s. (not specified), which means files where no section type had been specified can be loaded and saved, but will contain n.s. as value for all Sections.types that where previously not specified. Further the validation run before a document can be saved will issue a warning, if a Section.type with value n.s. is encountered and will still refuse to save with an error, if an empty Section.type is encountered.

Further changes in this PR:

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.009%) to 76.32% when pulling 04d09197da74b67979eadabe09ca04f3c8170d90 on mpsonntag:handleSectionType into 4fcfcc9dc41c3ca9e2bd9d8321af5a9f38368e50 on G-Node:master.