-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bug/add component shared master #563
Conversation
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.
Let me know once this PR is ready to review. I think it is still in progress @dastan-ansys
master_id = new_comp.id.split("/")[-1] | ||
|
||
for comp in self._master_comp.occurrences: | ||
print(f"{comp.id} - {self.id}") |
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.
Avoid printing. If you want to do logging, that's fine, but do not print
for comp in self._master_comp.occurrences: | ||
print(f"{comp.id} - {self.id}") | ||
if comp.id != self.id: | ||
print("here") |
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.
Same here
@@ -146,32 +146,31 @@ def __init__( | |||
self._parent_component = parent_component | |||
self._is_alive = True | |||
self._shared_topology = None | |||
self._transformed_part = transformed_part | |||
self._master_comp = master_comp |
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.
I wouldn't shorten the name, no need to save space. I think _master_component
is probably better. _master
is probably acceptable too
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.
Yep, no need to save on characters.
@dastan-ansys were you still planning on adding a unit test for this bug? |
Also, we should consider adding documentation on how Master Components work. This will be needed. |
cleaned up the variable names