From 95379690d3640a5f3539b41840cc79e067934e1b Mon Sep 17 00:00:00 2001 From: Zahari Date: Tue, 31 Mar 2020 16:41:46 +0100 Subject: [PATCH 1/2] Update to pandas version 1 This contains the fix for the one failing test. There are likely many more things that broke. --- conda-recipe/meta.yaml | 2 +- validphys2/src/validphys/tableloader.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 7f1f1932e3..c5b7e56905 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -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 diff --git a/validphys2/src/validphys/tableloader.py b/validphys2/src/validphys/tableloader.py index 7650304ab2..3b2d3eb5db 100644 --- a/validphys2/src/validphys/tableloader.py +++ b/validphys2/src/validphys/tableloader.py @@ -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 From 5a3185708b7546a9915f6ff819dc812ca3418a24 Mon Sep 17 00:00:00 2001 From: Zahari Date: Tue, 31 Mar 2020 17:38:52 +0100 Subject: [PATCH 2/2] Try to download resources first This should avoid travis timeouts and also help identifying failures. --- conda-recipe/run_test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index 3dfc2d959c..33ebdca5d2 100644 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -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