From 4625614fb26ae776ce22f643aa4b3785bd214472 Mon Sep 17 00:00:00 2001 From: Oliver Lantwin <oliver.lantwin@cern.ch> Date: Wed, 29 May 2019 14:16:10 +0200 Subject: [PATCH 1/2] Try CI fix --- .gitlab-ci.yml | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 31992c6..99d5513 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,6 @@ stages: - deploy test27: -# image: continuumio/anaconda image: continuumio/miniconda:latest stage: test script: @@ -12,10 +11,9 @@ test27: - apt install -y python-dev > tmp.txt && echo 'apt deps installed' - conda config --set always_yes yes --set changeps1 no - conda info -a - - conda config --add channels https://conda.anaconda.org/NLeSC # ROOT channel -# - conda create -n test27 python=2.7 root=6 root-numpy libgcc gcc make cmake > tmp.txt && echo 'env created' - - conda create -n test27 python=2.7 root=6 root-numpy > tmp.txt && echo 'env created' - - conda update -f libstdcxx-ng -y + - conda config --add channels conda-forge # ROOT channel + - conda create -n test27 python=2.7 root=6 > tmp.txt && echo 'env created' + - pip install root-numpy > tmp.txt && echo 'root-numpy installed' - source activate test27 > tmp.txt && echo 'activated' # HACK, psutil fails to build currently @@ -45,9 +43,9 @@ test36: - apt install -y python3-dev > tmp.txt && echo 'apt deps installed' - conda config --set always_yes yes --set changeps1 no - conda info -a - - conda config --add channels https://conda.anaconda.org/NLeSC # ROOT channel - - conda create -n test36 python=3.6 root=6 root-numpy libgcc gcc make cmake > tmp.txt && echo 'env created' - - conda create -n test36 python=3.6 root=6 root-numpy > tmp.txt && echo 'env created' + - conda config --add channels conda-forge # ROOT channel + - conda create -n test36 python=3.6 root=6 > tmp.txt && echo 'env created' + - pip install root-numpy > tmp.txt && echo 'root-numpy installed' - source activate test36 > tmp.txt && echo 'activated' # HACK, psutil fails to build currently @@ -76,8 +74,9 @@ test36_data_fail: - apt install -y python3-dev > tmp.txt && echo 'apt deps installed' - conda config --set always_yes yes --set changeps1 no - conda info -a - - conda config --add channels https://conda.anaconda.org/NLeSC # ROOT channel - - conda create -n test36 python=3.6 root=6 root-numpy libgcc gcc make cmake > tmp.txt && echo 'env created' + - conda config --add channels conda-forge # ROOT channel + - conda create -n test36 python=3.6 root=6 > tmp.txt && echo 'env created' + - pip install root-numpy > tmp.txt && echo 'root-numpy installed' - source activate test36 > tmp.txt && echo 'activated' # HACK, psutil fails to build currently @@ -105,12 +104,3 @@ build_apidoc: - echo "========== Building docs ==========" - echo "NotImplementedNotImplementedNotImplementedNotImplemented" - echo "========== Finished building and deploying docs ==========" - -# Job: run PyLint - -#run_pylint: -# image: continuumio/miniconda3:latest -# type: test -# script: -# - conda install -y pylint -# - pylint analysis/*/*.py || echo "========= Pylint run with error code > 0 ========" -- GitLab From 1a52bac7c781cea676fe7cdac6a48bed50efc6d9 Mon Sep 17 00:00:00 2001 From: Oliver Lantwin <oliver.lantwin@cern.ch> Date: Wed, 29 May 2019 12:41:14 +0000 Subject: [PATCH 2/2] Fix HDFStore usage (for test_data.py) --- analysis/data/hdf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/analysis/data/hdf.py b/analysis/data/hdf.py index d5136b2..f3d6d91 100644 --- a/analysis/data/hdf.py +++ b/analysis/data/hdf.py @@ -43,14 +43,14 @@ def modify_hdf(file_name, compress=True): """ mode = 'w' if os.path.exists(file_name): - with pd.HDFStore(file_name, mode='a', format='table') as test_len_file: + with pd.HDFStore(file_name, mode='a') as test_len_file: if len(test_len_file) > 0: mode = 'a' else: logger.info("File %s exists but seems empty -> not construct with pytables?" "Overwriting existing file!", file_name) test_len_file.flush(fsync=True) - with pd.HDFStore(file_name, mode=mode, format='table') as data_file: + with pd.HDFStore(file_name, mode=mode) as data_file: yield data_file data_file.flush(fsync=True) logger.debug('Compressing...') -- GitLab