From 26948a29618932facf0436c04da78a4d4b51d389 Mon Sep 17 00:00:00 2001 From: juacrumar Date: Wed, 3 May 2023 11:14:25 +0200 Subject: [PATCH] fix tests --- validphys2/src/validphys/loader.py | 12 ++++++------ validphys2/src/validphys/pineparser.py | 2 -- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/validphys2/src/validphys/loader.py b/validphys2/src/validphys/loader.py index 9149643c3e..63563404b2 100644 --- a/validphys2/src/validphys/loader.py +++ b/validphys2/src/validphys/loader.py @@ -419,20 +419,20 @@ def check_fkyaml(self, name, theoryID, cfac): raise LoadFailedError(f"New theories (id=${theoryID}) do not accept compound files") fkpath = (theory.yamldb_path / name).with_suffix(".yaml") - metadata, fklist = pineparser.get_yaml_information(fkpath, theory.path) - op = metadata.operation + theory_metadata, fklist = pineparser.get_yaml_information(fkpath, theory.path) + op = theory_metadata.operation if not cfac: - fkspecs = [FKTableSpec(i, None, metadata) for i in fklist] + fkspecs = [FKTableSpec(i, None, theory_metadata) for i in fklist] return fkspecs, op cfactors = [] - for operand in metadata.theory.FK_tables: + for operand in theory_metadata.FK_tables: tmp = [self.check_cfactor(theoryID, fkname, cfac) for fkname in operand] cfactors.append(tuple(tmp)) - fkspecs = [FKTableSpec(i, c, metadata) for i, c in zip(fklist, cfactors)] - return fkspecs, metadata.operation + fkspecs = [FKTableSpec(i, c, theory_metadata) for i, c in zip(fklist, cfactors)] + return fkspecs, theory_metadata.operation def check_compound(self, theoryID, setname, cfac): thid, theopath = self.check_theoryID(theoryID) diff --git a/validphys2/src/validphys/pineparser.py b/validphys2/src/validphys/pineparser.py index b604713876..c8f4d1fe5b 100644 --- a/validphys2/src/validphys/pineparser.py +++ b/validphys2/src/validphys/pineparser.py @@ -10,7 +10,6 @@ from reportengine.compat import yaml from validphys.coredata import FKTableData from validphys.commondataparser import TheoryMeta, EXT -from validphys.utils import parse_yaml_inp class GridFileNotFound(FileNotFoundError): @@ -44,7 +43,6 @@ def pineko_yaml(yaml_file, grids_folder): # they should be 100% compatible (and if they are not there is something wrong somewhere) # so already at this stage, use TheoryMeta parser to get the metadata for pineappl theories # Note also that we need to use this "parser" due to the usage of the name "operands" in the yamldb -# theory_meta = parse_yaml_inp(yaml_file, TheoryMeta) theory_meta = TheoryMeta.parser(yaml_file) member_paths = theory_meta.fktables_to_paths(grids_folder) return theory_meta, member_paths