This repository was archived by the owner on Apr 23, 2021. It is now read-only.
Feature: Create new uuid when add component to CUDS#288
Merged
Conversation
Current coverage is 96.51%@@ 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
|
Contributor
|
@kitchoi You have removed the answer to the life universe and everything from the tests! |
Contributor
Author
|
@mehdisadeghi ahaha yes, because cuds.get(42) gives you |
Contributor
|
@kitchoi does this PR needs a corresponding issue? |
Contributor
Author
|
@mehdisadeghi Could do. |
Contributor
|
@kitchoi nevermind. Just merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
uuidtostrasuuidis 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,getandremovefunctions wasn't symmetric (i.e. it is possible to add something you can'tremovelater, see FIXME comment). Here I removed these type checking altogether, but we might want to add them back.