-
Notifications
You must be signed in to change notification settings - Fork 57
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
[rotations] add ResourceHolderMixin to fix placement in a number of resources #239
[rotations] add ResourceHolderMixin to fix placement in a number of resources #239
Conversation
* fix lh server? * fix
@rickwierenga this fails for |
why does it fail |
my guess is that because |
yes, i guess in that case we should also automatically find the best location of the plate, similar to what we do with CarrierSite |
pylabrobot/machines/machine.py
Outdated
model: Optional[str] = None, | ||
**_kwargs |
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.
kwargs seems not needed here, but maybe an artifact of using mixins?
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.
When you have a bunch of subclasses with different args, they get passed up the MRO chain. This is the standard way to "ignore them"
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.
this feels like bad design. why is it necessary?
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 agree, it feels weird, but I believe it's just how python does things
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.
bumping this |
pylabrobot/resources/carrier.py
Outdated
z_sinking_depth = get_plate_sinking_depth(first_child) | ||
resource.register_did_assign_resource_callback(self._update_resource_stack_location) | ||
self.register_did_unassign_resource_callback(self._deregister_resource_stack_callback) | ||
return -Coordinate(z=z_sinking_depth) |
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.
_get_sinking_depth should not handle callbacks
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.
made an issue for this: #246
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'll add the issue to the code in a comment as well
def get_resource_stack_size(self) -> Coordinate: | ||
if self.direction == "x": | ||
resource_location = Coordinate(self.get_size_x(), 0, 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.
potentially just put this in get_default_child_location. It seems incorrect to have a get_size method return a coordinate
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.
it's used in the assign lid to resource stack special case. I can rename to something if you don't like the size
word.
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.
for this particular function i don't like it :)
No description provided.