Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fschrader1992
Copy link
Collaborator

@fschrader1992 fschrader1992 commented Jun 13, 2019

With this pull request:

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.
@coveralls
Copy link

coveralls commented Jun 13, 2019

Coverage Status

Coverage increased (+0.1%) to 77.329% when pulling b754b3c on fschrader1992:master into ed8c0fe on G-Node:master.

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.
Copy link
Member

@jgrewe jgrewe left a 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


@staticmethod
def _add_id(element):

Copy link
Member

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!")
Copy link
Member

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])

Copy link
Member

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

@mpsonntag mpsonntag merged commit 0c6b514 into G-Node:master Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 'Document.pprint' method [Property] Cannot append value of DType 'person'

4 participants