Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ requirements:
- matplotlib >=2.0.1,<3 | >=3.0.2
- blessings
- scipy >=0.19.1
- pandas =0.23
- pandas =1.0
- requests
- prompt_toolkit =2
- sphinx # documentation
Expand Down
5 changes: 5 additions & 0 deletions conda-recipe/run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ set -u
set -v
set -e

#Download some resources.
#This is here to help isolate the errors and avoid timeouts
vp-get theoryID 162
vp-get pdf NNPDF31_nnlo_as_0118

#Python tests for the installed validphys package
pytest --pyargs --mpl validphys
pytest --pyargs n3fit
Expand Down
9 changes: 4 additions & 5 deletions validphys2/src/validphys/tableloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,11 @@ def load_adapted_fits_chi2_table(filename):


def set_actual_column_level0(df, new_levels):
"""Set the fitst level of the index to new_levels.
Pandas makes it criminally difficult to do this properly."""
"""Set the first level of the index to new_levels. Note:
This is a separate function mostly because it breaks
in every patch update of pandas."""
cols = df.columns
levels = np.asarray(cols.levels[0])
levels[cols.labels[0]] = new_levels
cols.set_levels(levels, inplace=True, level=0)
cols.set_levels(new_levels, inplace=True, level=0)


#TODO: Find a better place for this function
Expand Down