Example #1
0
    def __init__(self, shape):
        """
        Constructor:

        :param shape: The rack shape.
        :type shape: :class:`thelma.entities.rack.RackShape`
        """
        WorkingLayout.__init__(self, shape)

        #: You cannot add new positions to a closed layout.
        self.is_closed = False
Example #2
0
    def __init__(self, shape):
        """
        Constructor:

        :param shape: The rack shape.
        :type shape: :class:`thelma.entities.rack.RackShape`
        """
        WorkingLayout.__init__(self, shape)

        #: You cannot add new positions to a closed layout.
        self.is_closed = False
Example #3
0
    def add_position(self, working_position):
        """
        Adds a :class:`Working_position` to the layout.

        :param working_position: The working position to be added.
        :type working_position: :class:`LibraryBaseLayoutPosition`

        :raises ValueError: If the added position is not a
            :attr:`POSITION_CLS` object.
        :raises AttributeError: If the layout is closed.
        :raises TypeError: if the position has the wrong type
        """
        if not self.is_closed:
            WorkingLayout.add_position(self, working_position)
        else:
            raise AttributeError('The layout is closed!')
Example #4
0
    def add_position(self, working_position):
        """
        Adds a :class:`Working_position` to the layout.

        :param working_position: The working position to be added.
        :type working_position: :class:`LibraryBaseLayoutPosition`

        :raises ValueError: If the added position is not a
            :attr:`POSITION_CLS` object.
        :raises AttributeError: If the layout is closed.
        :raises TypeError: if the position has the wrong type
        """
        if not self.is_closed:
            WorkingLayout.add_position(self, working_position)
        else:
            raise AttributeError("The layout is closed!")
Example #5
0
    def add_position(self, working_position):
        """
        Adds a :class:`Working_position` to the layout.

        :param working_position: The transfer position to be added.
        :type working_position: :class:`LibraryPosition`

        :raise ValueError: If the rack position is not allowed by the
            base layout.
        :raises TypeError: If the added position is not a
            :class:`TransferPosition` object.
        """
        rack_pos = working_position.rack_position
        if not self.base_layout_positions is None and not rack_pos in self.base_layout_positions:
            msg = "Position %s is not part of the base layout. It must not " "take up samples." % (rack_pos)
            raise ValueError(msg)
        WorkingLayout.add_position(self, working_position)
Example #6
0
    def add_position(self, working_position):
        """
        Adds a :class:`Working_position` to the layout.

        :param working_position: The transfer position to be added.
        :type working_position: :class:`LibraryPosition`

        :raise ValueError: If the rack position is not allowed by the
            base layout.
        :raises TypeError: If the added position is not a
            :class:`TransferPosition` object.
        """
        rack_pos = working_position.rack_position
        if not self.base_layout_positions is None and \
                    not rack_pos in self.base_layout_positions:
            msg = 'Position %s is not part of the base layout. It must not ' \
                  'take up samples.' % (rack_pos)
            raise ValueError(msg)
        WorkingLayout.add_position(self, working_position)
Example #7
0
 def create_rack_layout(self):
     """
     The layout is closed before rack layout creation.
     """
     self.close()
     return WorkingLayout.create_rack_layout(self)
Example #8
0
 def create_rack_layout(self):
     """
     The layout is closed before rack layout creation.
     """
     self.close()
     return WorkingLayout.create_rack_layout(self)