Skip to content

Commit

Permalink
use get_available_theory_cards in fetch_all
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyStegeman committed Jul 31, 2024
1 parent f677f2d commit e498143
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nnpdf_data/nnpdf_data/theorydbutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ def fetch_all(theory_database: Path):
Example
------
>>> from validphys.datafiles import theory_cards
>>> from nnpdf_data import theory_cards
>>> from nnpdf_data.theorydbutils import fetch_all
>>> theory_df = fetch_all(theory_cards)
"""
available_theories = get_available_theory_cards(theory_database)
theories = []
for theory_path in theory_database.glob("*.yaml"):
for theory_path in available_theories.values():
theories.append(parse_theory_card(theory_path))
df = pd.DataFrame(theories)
return df.set_index(['ID']).sort_index()

0 comments on commit e498143

Please sign in to comment.