def validate_manifest(run, reps_per_exec): try: manifest = manifest_preprocessor(run, reps_per_exec=reps_per_exec) mjson = manifest.as_json() mdict = json.loads(mjson) except Exception as e: logger.error("Run %s has encountered an error:\n\t%s" % (run.id, e.message)) raise Exception("An exception has occurred:\n\t%s" % e.message)
def get_context_data(self, **kwargs): """ This will put the JSON version of the manifest file into the context. """ context = super(ManifestView, self).get_context_data(**kwargs) runID = kwargs['runID'] run = get_object_or_404( DimRun, pk=runID ) if len(run.dimexecution_set.all()) <= 0: raise Http404("Run %s has not been launched" % runID) manifest = manifest_preprocessor(run) context["manjson"] = manifest.as_json() return context