Closed kitchoi closed 8 years ago
@@ master #288 diff @@
========================================
Files 47 47
Lines 3807 3806 -1
Methods 0 0
Branches 573 571 -2
========================================
+ Hits 3670 3673 +3
+ Misses 46 44 -2
+ Partials 91 89 -2
...ols/lattice_tools.py
(not in diff) was modified. more
-1
-1
+2
Powered by Codecov. Last updated by 35e552e
@kitchoi You have removed the answer to the life universe and everything from the tests!
@mehdisadeghi ahaha yes, because cuds.get(42) gives you None
, and I consider this tested already.
@kitchoi does this PR needs a corresponding issue?
@mehdisadeghi Could do.
@kitchoi nevermind. Just merged.
Consistent with Particles and Mesh, new uuid can be created when a component to be added does not already have one (e.g.
component.uid is None
).Alternatively, we can make sure every CUDS component has a uuid created upon
__init__
, but it does not seem to me necessary.Note that I have removed converting
uuid
tostr
asuuid
is already hashable (a pretty good hash) so we don't need to convert it to str to be hashed again.The type checking for the component_id in the
add
,get
andremove
functions wasn't symmetric (i.e. it is possible to add something you can'tremove
later, see FIXME comment). Here I removed these type checking altogether, but we might want to add them back.