MCPcopy Create free account
hub / github.com/StackStorm/st2 / validate

Method validate

st2common/st2common/content/validators.py:27–38  ·  view source on GitHub ↗
(requirements_file)

Source from the content-addressed store, hash-verified

25class RequirementsValidator(object):
26 @staticmethod
27 def validate(requirements_file):
28 if not os.path.exists(requirements_file):
29 raise Exception("Requirements file %s not found." % requirements_file)
30 missing = []
31 with open(requirements_file, "r") as f:
32 for line in f:
33 rqmnt = line.strip()
34 try:
35 get_distribution(rqmnt)
36 except:
37 missing.append(rqmnt)
38 return missing
39
40
41def validate_pack_name(name):

Callers

nothing calls this directly

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected