-
Notifications
You must be signed in to change notification settings - Fork 30
Automatically Add IDs At Verison Conversion #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adding UUIDs, when converting from odML version 1.0 to 1.1. If an ID already exists, it stays the same, if it is compatible with the python uuid types. Otherwise (also if empty) a new ID is created for the property.
Adding UUIDs, when converting from odML version 1.0 to 1.1. If an ID already exists, it stays the same, if it is compatible with the python uuid types. Otherwise (also if empty) a new ID is created for the section.
Adding UUIDs, when converting from odML version 1.0 to 1.1. If an ID already exists, it stays the same, if it is compatible with the python uuid types. Otherwise (also if empty) a new ID is created for the document.
Reduce redundancy in _add_id.
Add pprint method showing document information and section/ property tree. Related to issue G-Node#319.
Allow value = 0 set as int, not as empty value. Fixing issue G-Node#314.
Changing dtype confirmation, adding exceptions for dtypes possessing string type values to allow appending with new values. Fixing issue G-Node#318.
Changing dtype confirmation, adding exceptions for dtypes possessing string type values to allow expending with new values. Related to issue G-Node#318.
Related to issue G-Node#318.
jgrewe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few nit-picking details that can as well be patched later
odml/tools/version_converter.py
Outdated
|
|
||
| @staticmethod | ||
| def _add_id(element): | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line
odml/property.py
Outdated
|
|
||
| if not (dtypes.infer_dtype(new_value[0]) == "string" and self.dtype in dtypes.special_dtypes): | ||
| raise ValueError("odml.Property.append: " | ||
| "passed value data type does not match dtype!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somehow feels like it could/should be extracted
| p3 = Property('myprop', value=0, dtype=DType.int) | ||
| self.assertEqual(p3.value, [0]) | ||
| self.assertEqual(p3.values, [0]) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also test the boolean case
For append and extend methods, inferred and expected dtype are listed.
With this pull request:
value=0#314