本文整理汇总了Python中WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing.validateSchema方法的典型用法代码示例。如果您正苦于以下问题:Python DataProcessing.validateSchema方法的具体用法?Python DataProcessing.validateSchema怎么用?Python DataProcessing.validateSchema使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing
的用法示例。
在下文中一共展示了DataProcessing.validateSchema方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: validateSchema
# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
def validateSchema(self, schema):
"""
_validateSchema_
Standard DataProcessing schema validation.
"""
DataProcessing.validateSchema(self, schema)
self.validateConfigCacheExists(configID=schema["DQMConfigCacheID"],
configCacheUrl=schema['ConfigCacheUrl'],
couchDBName=schema["CouchDBName"],
getOutputModules=False)
示例2: validateSchema
# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
def validateSchema(self, schema):
"""
_validateSchema_
Standard StdBase schema validation, plus verification
of the ConfigCacheID
"""
DataProcessing.validateSchema(self, schema)
couchUrl = schema.get("ConfigCacheUrl", None) or schema["CouchURL"]
self.validateConfigCacheExists(configID=schema["ConfigCacheID"],
couchURL=couchUrl,
couchDBName=schema["CouchDBName"])
return
示例3: validateSchema
# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
def validateSchema(self, schema):
"""
_validateSchema_
Standard StdBase schema validation, plus verification
of the ConfigCacheID
"""
DataProcessing.validateSchema(self, schema)
self.validateConfigCacheExists(configID=schema["ConfigCacheID"],
configCacheUrl=schema['ConfigCacheUrl'],
couchDBName=schema["CouchDBName"],
getOutputModules=False)
return
示例4: validateSchema
# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
def validateSchema(self, schema):
"""
_validateSchema_
Check for required fields, and some skim facts
"""
DataProcessing.validateSchema(self, schema)
mainOutputModules = self.validateConfigCacheExists(configID = schema["ConfigCacheID"],
configCacheUrl = schema['ConfigCacheUrl'],
couchDBName = schema["CouchDBName"],
getOutputModules = True).keys()
# Skim facts have to be validated outside the usual master validation
skimSchema = {k: v for (k, v) in schema.iteritems() if k.startswith("Skim")}
skimArguments = self.getSkimArguments()
skimIndex = 1
skimInputs = set()
while "SkimName%s" % skimIndex in schema:
instanceArguments = {}
for argument in skimArguments:
realArg = argument.replace("#N", str(skimIndex))
instanceArguments[realArg] = skimArguments[argument]
try:
validateArgumentsCreate(skimSchema, instanceArguments)
except Exception as ex:
self.raiseValidationException(str(ex))
self.validateConfigCacheExists(configID = schema["Skim%sConfigCacheID" % skimIndex],
configCacheUrl = schema['ConfigCacheUrl'],
couchDBName = schema["CouchDBName"],
getOutputModules=False)
if schema["SkimInput%s" % skimIndex] not in mainOutputModules:
error = "Processing config does not have the following output module: %s." % schema["SkimInput%s" % skimIndex]
self.raiseValidationException(msg = error)
skimInputs.add(schema["SkimInput%s" % skimIndex])
skimIndex += 1
# Validate that the transient output modules are used in a skim task
if "TransientOutputModules" in schema:
diffSet = set(schema["TransientOutputModules"]) - skimInputs
if diffSet:
self.raiseValidationException(msg = "A transient output module was specified but no skim was defined for it")
示例5: validateSchema
# 需要导入模块: from WMCore.WMSpec.StdSpecs.DataProcessing import DataProcessing [as 别名]
# 或者: from WMCore.WMSpec.StdSpecs.DataProcessing.DataProcessing import validateSchema [as 别名]
def validateSchema(self, schema):
"""
_validateSchema_
Check for required fields, and some skim facts
"""
DataProcessing.validateSchema(self, schema)
couchUrl = schema.get("ConfigCacheUrl", None) or schema["CouchURL"]
mainOutputModules = self.validateConfigCacheExists(configID = schema["ConfigCacheID"],
couchURL = couchUrl,
couchDBName = schema["CouchDBName"],
getOutputModules = True).keys()
# Skim facts have to be validated outside the usual master validation
skimArguments = self.getSkimArguments()
skimIndex = 1
skimInputs = set()
while "SkimName%s" % skimIndex in schema:
instanceArguments = {}
for argument in skimArguments.keys():
realArg = argument.replace("#N", str(skimIndex))
instanceArguments[realArg] = skimArguments[argument]
msg = validateArguments(schema, instanceArguments)
if msg is not None:
self.raiseValidationException(msg)
self.validateConfigCacheExists(configID = schema["Skim%sConfigCacheID" % skimIndex],
couchURL = couchUrl,
couchDBName = schema["CouchDBName"])
if schema["SkimInput%s" % skimIndex] not in mainOutputModules:
error = "Processing config does not have the following output module: %s." % schema["SkimInput%s" % skimIndex]
self.raiseValidationException(msg = error)
skimInputs.add(schema["SkimInput%s" % skimIndex])
skimIndex += 1
# Validate that the transient output modules are used in a skim task
if "TransientOutputModules" in schema:
diffSet = set(schema["TransientOutputModules"]) - skimInputs
if diffSet:
self.raiseValidationException(msg = "A transient output module was specified but no skim was defined for it")