Skip to content

Commit

Permalink
Merge branch 'master' into polarized-kin-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomomagni committed Aug 8, 2024
2 parents 3bbf65a + ea7bafa commit d8819bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nnpdf_data/nnpdf_data/theorydbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@ def fetch_theory(theory_database: Path, theoryID: int):
"""

available_theories = get_available_theory_cards(theory_database)
theoryID = int(theoryID)
try:
theoryfile = available_theories[theoryID]
except KeyError as e:
raise TheoryNotFoundInDatabase(f"Theorycard for theory not found: {e}")

tdict = parse_theory_card(theoryfile)
if tdict["ID"] != int(theoryID):
if tdict["ID"] != theoryID:
raise ValueError(f"The theory ID in {theoryfile} doesn't correspond with its ID entry")
return tdict

Expand Down

0 comments on commit d8819bb

Please sign in to comment.