コード例 #1
0
ファイル: base.py プロジェクト: papagr/TheLMA
    def _check_experiment_type(self):
        """
        Ensures that the tool is supporting the given experiment type.
        """
        self.add_debug('Check experiment type ...')

        self._scenario = self.experiment.experiment_design.\
                         experiment_metadata_type

        if not self._scenario.id in self.SUPPORTED_SCENARIOS:
            msg = 'The type of this experiment is not supported by this tool ' \
                  '(given: %s, supported: %s).' % (self._scenario.display_name,
                   ', '.join(EXPERIMENT_SCENARIOS.get_displaynames(
                                        self.SUPPORTED_SCENARIOS)))
            self.add_error(msg)
        elif not self._scenario.id in EXPERIMENT_SCENARIOS.\
                                                EXPERIMENT_MASTERMIX_TYPES:
            pass  # there are no worklists
        else:
            storage_location = EXPERIMENT_WORKLIST_PARAMETERS.STORAGE_LOCATIONS[
                self._scenario.id]
            self._transfer_worklist_index = EXPERIMENT_WORKLIST_PARAMETERS.\
                                    TRANSFER_WORKLIST_INDICES[storage_location]
            self._cell_worklist_index = EXPERIMENT_WORKLIST_PARAMETERS.\
                                    CELL_WORKLIST_INDICES[storage_location]

        if self.mode == self.MODE_PRINT_WORKLISTS and \
                        not self._scenario.id in PRINT_SUPPORT_SCENARIOS:
            msg = 'There is no worklist printing support for this ' \
                  'experiment type (%s).' % (self._scenario.display_name)
            self.add_error(msg)
コード例 #2
0
ファイル: base.py プロジェクト: helixyte/TheLMA
    def _check_experiment_type(self):
        """
        Ensures that the tool is supporting the given experiment type.
        """
        self.add_debug('Check experiment type ...')

        self._scenario = self.experiment.experiment_design.\
                         experiment_metadata_type

        if not self._scenario.id in self.SUPPORTED_SCENARIOS:
            msg = 'The type of this experiment is not supported by this tool ' \
                  '(given: %s, supported: %s).' % (self._scenario.display_name,
                   ', '.join(EXPERIMENT_SCENARIOS.get_displaynames(
                                        self.SUPPORTED_SCENARIOS)))
            self.add_error(msg)
        elif not self._scenario.id in EXPERIMENT_SCENARIOS.\
                                                EXPERIMENT_MASTERMIX_TYPES:
            pass # there are no worklists
        else:
            storage_location = EXPERIMENT_WORKLIST_PARAMETERS.STORAGE_LOCATIONS[
                                                            self._scenario.id]
            self._transfer_worklist_index = EXPERIMENT_WORKLIST_PARAMETERS.\
                                    TRANSFER_WORKLIST_INDICES[storage_location]
            self._cell_worklist_index = EXPERIMENT_WORKLIST_PARAMETERS.\
                                    CELL_WORKLIST_INDICES[storage_location]

        if self.mode == self.MODE_PRINT_WORKLISTS and \
                        not self._scenario.id in PRINT_SUPPORT_SCENARIOS:
            msg = 'There is no worklist printing support for this ' \
                  'experiment type (%s).' % (self._scenario.display_name)
            self.add_error(msg)
コード例 #3
0
ファイル: experimentdesign.py プロジェクト: papagr/TheLMA
    def _check_input(self):
        """
        Checks the validity of the initialisation values.
        """
        self.add_debug('Check input values ...')

        self._check_input_class('requester', self.requester, User)

        if self._check_input_class('experiment metadata type', self.scenario,
                                   ExperimentMetadataType):
            if not self.scenario.id in _SUPPORTED_SCENARIOS.ALL:
                d_names = EXPERIMENT_SCENARIOS.get_displaynames(
                    _SUPPORTED_SCENARIOS.ALL)
                msg = 'Unknown scenario: "%s". Allowed scenarios: %s.' \
                      % (self.scenario.display_name, ', '.join(d_names))
                self.add_error(msg)
コード例 #4
0
ファイル: experimentdesign.py プロジェクト: helixyte/TheLMA
    def _check_input(self):
        """
        Checks the validity of the initialisation values.
        """
        self.add_debug('Check input values ...')

        self._check_input_class('requester', self.requester, User)

        if self._check_input_class('experiment metadata type', self.scenario,
                                   ExperimentMetadataType):
            if not self.scenario.id in _SUPPORTED_SCENARIOS.ALL:
                d_names = EXPERIMENT_SCENARIOS.get_displaynames(
                                                    _SUPPORTED_SCENARIOS.ALL)
                msg = 'Unknown scenario: "%s". Allowed scenarios: %s.' \
                      % (self.scenario.display_name, ', '.join(d_names))
                self.add_error(msg)