Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
scarlehoff committed Jun 21, 2023
1 parent 84bf765 commit 26948a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions validphys2/src/validphys/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions validphys2/src/validphys/pineparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 26948a2

Please sign in to comment.