gavo.user.validation module¶
A cli-facing module providing functionality to “validate” one or more resource descriptors.
Validation means giving some prognosis as to whether RD will properly work within both the DC and the VO.
While validation is active there’s base.VALIDATING=True. If RDs to anything expensive, they’re advised to have something like:
if getattr(base, "VALIDATING", False):
(don't do the expensive thing)
- class gavo.user.validation.TestsCollector[source]¶
Bases:
object
a singleton that collects use cases to run.
Don’t instantiate, this is a global singleton.
The testsToRun attribute contains the test suites to run.
- testsToRun = []¶
- gavo.user.validation.isIVOPublished(res)[source]¶
returns true if res has a publication facing the VO.
- gavo.user.validation.loadRD(rdId)[source]¶
returns the RD identified by rdId.
If that fails, diagnostics are printed and None is returned.
- gavo.user.validation.outputDependentMessage(aString)[source]¶
an output function for errhandle.raiseAndCatch.
It is used here to indent dependent error messages.
- gavo.user.validation.validateOne(rdId, args)[source]¶
outputs to stdout various information on the RD identified by rdId.
- gavo.user.validation.validateOtherCode(rd, args)[source]¶
tries to compile other pieces of code in an RD and bails out if one is bad.
- gavo.user.validation.validateRowmakers(rd, args)[source]¶
tries to build all rowmakers mentioned in the RD and bails out if one is bad.