Skip to content

Commit

Permalink
correclty read theoryfile
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyStegeman committed Jul 30, 2024
1 parent 8257095 commit e283f4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nnpdf_data/nnpdf_data/theorydbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ def fetch_theory(theory_database: Path, theoryID: int):
>>> theory = fetch_theory(theory_cards, 700)
"""

theoryfile = get_available_theory_cards(theory_database)
available_theories = get_available_theory_cards(theory_database)
theoryfile = available_theories[theoryID]

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


Expand Down

0 comments on commit e283f4b

Please sign in to comment.