コード例 #1
0
ファイル: StepChain.py プロジェクト: todor-ivanov/WMCore
    def getChainCreateArgs(firstTask=False, generator=False):
        """
        _getChainCreateArgs_

        This represents the authoritative list of request arguments that are
        allowed in each chain (Step/Task) of chained request, during request creation.
        Additional especific arguments must be defined inside each spec class.

        For more information on how these arguments are built, please have a look
        at the docstring for getWorkloadCreateArgs.
        """
        baseArgs = StdBase.getChainCreateArgs(firstTask, generator)
        arguments = {
            'InputStep': {
                'default': None,
                'null': False,
                'optional': firstTask
            },
            'StepName': {
                'null': False,
                'optional': False,
                'validate': taskStepName
            },
            'PrimaryDataset': {
                'default': None,
                'optional': True,
                'validate': primdataset,
                'null': False
            }
        }

        baseArgs.update(arguments)
        StdBase.setDefaultArgumentsProperty(baseArgs)

        return baseArgs
コード例 #2
0
    def getChainCreateArgs(firstTask=False, generator=False):
        """
        _getChainCreateArgs_

        Each task dictionary specifies its own set of arguments
        that need to be validated as well, most of them are already
        defined in StdBase.getWorkloadCreateArgs and those do not appear here
        since they are all optional. Here only new arguments are listed.
        """
        baseArgs = StdBase.getChainCreateArgs(firstTask, generator)
        arguments = {
            "TaskName": {
                "optional": False,
                "null": False,
                'validate': taskStepName
            },
            "InputTask": {
                "default": None,
                "optional": firstTask,
                "null": False
            },
            "TransientOutputModules": {
                "default": [],
                "type": makeList,
                "optional": True,
                "null": False
            },
            "DeterministicPileup": {
                "default": False,
                "type": strToBool,
                "optional": True,
                "null": False
            },
            "GlobalTag": {
                "type": str,
                "optional": True
            },
            "TimePerEvent": {
                "type": float,
                "optional": True,
                "validate": lambda x: x > 0
            },
            "SizePerEvent": {
                "type": float,
                "optional": True,
                "validate": lambda x: x > 0
            },
            'PrimaryDataset': {
                'default': None,
                'optional': not generator,
                'validate': primdataset,
                'null': False
            },
        }
        baseArgs.update(arguments)
        StdBase.setDefaultArgumentsProperty(baseArgs)
        return baseArgs
コード例 #3
0
ファイル: StepChain.py プロジェクト: dmwm/WMCore
    def getChainCreateArgs(firstTask=False, generator=False):
        """
        _getChainCreateArgs_

        This represents the authoritative list of request arguments that are
        allowed in each chain (Step/Task) of chained request, during request creation.
        Additional especific arguments must be defined inside each spec class.

        For more information on how these arguments are built, please have a look
        at the docstring for getWorkloadCreateArgs.
        """
        baseArgs = StdBase.getChainCreateArgs(firstTask, generator)
        arguments = {
            'InputStep': {'default': None, 'null': False, 'optional': firstTask, 'type': str},
            'StepName': {'null': False, 'optional': False},
            'PrimaryDataset': {'default': None, 'optional': True,
                               'validate': primdataset, 'null': False}
            }

        baseArgs.update(arguments)
        StdBase.setDefaultArgumentsProperty(baseArgs)

        return baseArgs
コード例 #4
0
    def getChainCreateArgs(firstTask=False, generator=False):
        """
        _getChainCreateArgs_

        Each task dictionary specifies its own set of arguments
        that need to be validated as well, most of them are already
        defined in StdBase.getWorkloadCreateArgs and those do not appear here
        since they are all optional. Here only new arguments are listed.
        """
        baseArgs = StdBase.getChainCreateArgs(firstTask, generator)
        arguments = {
            "TaskName": {"optional": False, "null": False},
            "InputTask": {"default": None, "optional": firstTask, "null": False},
            "TransientOutputModules": {"default": [], "type": makeList, "optional": True, "null": False},
            "DeterministicPileup": {"default": False, "type": strToBool, "optional": True, "null": False},
            "GlobalTag": {"type": str, "optional": True},
            "TimePerEvent": {"type": float, "optional": True, "validate": lambda x: x > 0},
            "SizePerEvent": {"type": float, "optional": True, "validate": lambda x: x > 0},
            'PrimaryDataset': {'default': None, 'optional': not generator, 'validate': primdataset,
                               'null': False},
                    }
        baseArgs.update(arguments)
        StdBase.setDefaultArgumentsProperty(baseArgs)
        return baseArgs