From 326bb08bfba0ae69bab6bbcae399f9a5b659b046 Mon Sep 17 00:00:00 2001 From: u214892 <u214892@sbb.ch> Date: Thu, 11 Jul 2019 20:43:12 +0200 Subject: [PATCH] #97 tox-conda #94 use miniconda instead of anaconda --- .gitlab-ci.yml | 4 ++++ setup.py | 18 +++++++++--------- tox.ini | 4 +++- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10477c7..ff90e75 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -30,6 +30,7 @@ tests: - bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /tmp/miniconda3 - export PATH=/tmp/miniconda3/bin:$PATH - pip install tox awscli + - conda update -n conda -y - conda install -c conda-forge tox-conda script: - xvfb-run tox -v --recreate @@ -50,6 +51,7 @@ build_and_deploy_docs: - bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /tmp/miniconda3 - export PATH=/tmp/miniconda3/bin:$PATH - pip install tox awscli + - conda update -n conda -y - conda install -c conda-forge tox-conda script: - echo "Bucket=${BUCKET_NAME}" @@ -75,6 +77,7 @@ benchmarks_and_profiling: - bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /tmp/miniconda3 - export PATH=/tmp/miniconda3/bin:$PATH - pip install tox awscli + - conda update -n conda -y - conda install -c conda-forge tox-conda script: - xvfb-run tox -e benchmarks,profiling -v --recreate @@ -86,6 +89,7 @@ test_conda_setup: - apt install -y libgl1-mesa-glx xvfb graphviz xdg-utils libcairo2-dev libjpeg-dev libgif-dev - wget -nv https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/Miniconda3-latest-Linux-x86_64.sh - bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /tmp/miniconda3 + - conda update -n conda -y script: - export PATH=/tmp/miniconda3/bin:$PATH - bash getting_started/getting_started.sh diff --git a/setup.py b/setup.py index 937d45e..dcbfffd 100644 --- a/setup.py +++ b/setup.py @@ -14,25 +14,25 @@ with open('README.rst') as readme_file: def get_all_svg_files(directory='./svg/'): ret = [] - for f in os.listdir(directory): - if os.path.isfile(os.path.join(directory, f)): - ret.append(directory + f) + for dirpath, subdirs, files in os.walk(directory): + for f in files: + ret.append(os.path.join(dirpath,f)) return ret def get_all_images_files(directory='./images/'): ret = [] - for f in os.listdir(directory): - if os.path.isfile(os.path.join(directory, f)): - ret.append(directory + f) + for dirpath, subdirs, files in os.walk(directory): + for f in files: + ret.append(os.path.join(dirpath,f)) return ret def get_all_notebook_files(directory='./notebooks/'): ret = [] - for f in os.listdir(directory): - if os.path.isfile(os.path.join(directory, f)): - ret.append(directory + f) + for dirpath, subdirs, files in os.walk(directory): + for f in files: + ret.append(os.path.join(dirpath,f)) return ret diff --git a/tox.ini b/tox.ini index 2f6b138..fb4959f 100644 --- a/tox.ini +++ b/tox.ini @@ -77,6 +77,7 @@ deps = -r{toxinidir}/requirements_dev.txt -r{toxinidir}/requirements_continuous_integration.txt commands = + python --version python benchmarks/benchmark_all_examples.py [testenv:profiling] @@ -207,4 +208,5 @@ deps = ; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths changedir = {envtmpdir}/fefed3ba12bf1ed81dbcc20fb52706ea commands = - py.test --basetemp={envtmpdir} {toxinidir} + python --version + python -m pytest --basetemp={envtmpdir} {toxinidir} -- GitLab