Skip to content
Snippets Groups Projects
Commit cff4ce0c authored by u214892's avatar u214892
Browse files

#97 tox-conda #94 use miniconda instead of anaconda

parent 93535d7e
No related branches found
No related tags found
No related merge requests found
...@@ -22,13 +22,15 @@ before_script: ...@@ -22,13 +22,15 @@ before_script:
tests: tests:
stage: tests stage: tests
script: before_script:
- apt update - apt update
- apt install -y libgl1-mesa-glx xvfb graphviz xdg-utils libcairo2-dev libjpeg-dev libgif-dev - 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 - 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 - bash /tmp/Miniconda3-latest-Linux-x86_64.sh -b -p /tmp/miniconda3
- export PATH=/tmp/miniconda3/bin:$PATH; bash getting_started/getting_started.sh - export PATH=/tmp/miniconda3/bin:$PATH; bash getting_started/getting_started.sh
- pip install tox - pip install tox awscli
- conda install -c conda-forge tox-conda
script:
- xvfb-run tox -v --recreate - xvfb-run tox -v --recreate
build_and_deploy_docs: build_and_deploy_docs:
...@@ -40,8 +42,12 @@ build_and_deploy_docs: ...@@ -40,8 +42,12 @@ build_and_deploy_docs:
- tests - tests
before_script: before_script:
- apt update - apt update
- apt install -y graphviz libgl1-mesa-glx xvfb xdg-utils libcairo2-dev libjpeg-dev libgif-dev - 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
- export PATH=/tmp/miniconda3/bin:$PATH; bash getting_started/getting_started.sh
- pip install tox awscli - pip install tox awscli
- conda install -c conda-forge tox-conda
script: script:
- echo "Bucket=${BUCKET_NAME}" - echo "Bucket=${BUCKET_NAME}"
- echo "AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}" - echo "AWS_DEFAULT_REGION=${AWS_DEFAULT_REGION}"
...@@ -59,10 +65,15 @@ benchmarks_and_profiling: ...@@ -59,10 +65,15 @@ benchmarks_and_profiling:
only: only:
variables: variables:
- $BENCHMARKS_AND_PROFILING - $BENCHMARKS_AND_PROFILING
script: before_script:
- apt update - apt update
- apt install -y libgl1-mesa-glx xvfb graphviz xdg-utils libcairo2-dev libjpeg-dev libgif-dev - apt install -y libgl1-mesa-glx xvfb graphviz xdg-utils libcairo2-dev libjpeg-dev libgif-dev
- pip install tox - 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
- export PATH=/tmp/miniconda3/bin:$PATH; bash getting_started/getting_started.sh
- pip install tox awscli
- conda install -c conda-forge tox-conda
script:
- xvfb-run tox -e benchmarks,profiling -v --recreate - xvfb-run tox -e benchmarks,profiling -v --recreate
...@@ -64,20 +64,17 @@ Ready to contribute? Here's how to set up `flatland` for local development. ...@@ -64,20 +64,17 @@ Ready to contribute? Here's how to set up `flatland` for local development.
$ git clone git@gitlab.aicrowd.com:flatland/flatland.git $ git clone git@gitlab.aicrowd.com:flatland/flatland.git
3. Install the software dependencies via Anaconda. (This assumes you have Anaconda installed by following the instructions `here <https://www.anaconda.com/distribution>`_) 3. Install the software dependencies via Anaconda-3 or Miniconda-3. (This assumes you have Anaconda installed by following the instructions `here <https://www.anaconda.com/distribution>`_)
$ conda create python=3.6 --name flatland-rl $ conda install -c conda-forge tox-conda
$ conda activate flatland-rl $ conda install tox
$ conda install -c conda-forge cairosvg pycairo $ tox -v --recreate
$ conda install -c anaconda tk
$ cd flatland
$ pip install -e .
These steps are performed if you run These steps are performed if you run
$ getting_started/getting_started.bat/.sh $ getting_started/getting_started.bat/.sh
from Anaconda prompt. Only prerequisites: git and Miniconda-3 or Anaconda-3. from Anaconda prompt.
4. Create a branch for local development:: 4. Create a branch for local development::
......
...@@ -8,8 +8,6 @@ echo "************ TESTING PREREQUISITES PYTHON3 + GIT + GIT ******************* ...@@ -8,8 +8,6 @@ echo "************ TESTING PREREQUISITES PYTHON3 + GIT + GIT *******************
git --version || goto :error git --version || goto :error
python --version || goto :error python --version || goto :error
rem deactivate in case we're in virtualenv
call conda deactivate || call deactivate
@echo off @echo off
......
...@@ -14,4 +14,6 @@ svgutils>=0.3.1 ...@@ -14,4 +14,6 @@ svgutils>=0.3.1
screeninfo>=0.3.1 screeninfo>=0.3.1
pyarrow>=0.13.0 pyarrow>=0.13.0
importlib-metadata>=0.17 importlib-metadata>=0.17
importlib_resources>=1.0.2 importlib-resources>=1.0.1
six>=1.12.0
attrs
...@@ -73,7 +73,13 @@ passenv = ...@@ -73,7 +73,13 @@ passenv =
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies ; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
HTTP_PROXY HTTP_PROXY
HTTPS_PROXY HTTPS_PROXY
whitelist_externals = sh conda_deps=
cairosvg
pycairo
tk
conda_channels:
conda-forge
anaconda
deps = deps =
-r{toxinidir}/requirements_dev.txt -r{toxinidir}/requirements_dev.txt
-r{toxinidir}/requirements_continuous_integration.txt -r{toxinidir}/requirements_continuous_integration.txt
...@@ -90,13 +96,19 @@ passenv = ...@@ -90,13 +96,19 @@ passenv =
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies ; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
HTTP_PROXY HTTP_PROXY
HTTPS_PROXY HTTPS_PROXY
whitelist_externals = sh conda_deps=
cairosvg
pycairo
tk
conda_channels:
conda-forge
anaconda
deps = deps =
-r{toxinidir}/requirements_dev.txt -r{toxinidir}/requirements_dev.txt
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
changedir = {envtmpdir}/c236d3c240d61a0969d4cb59e2180ce5
commands = commands =
; run examples from subfolder to ensure that resources are accessed via resources and not via relative paths python {toxinidir}/benchmarks/run_all_examples.py
sh -c 'mkdir -p {envtmpdir}/c236d3c240d61a0969d4cb59e2180ce5'
sh -c 'cd {envtmpdir}/c236d3c240d61a0969d4cb59e2180ce5 && python {toxinidir}/benchmarks/run_all_examples.py'
[testenv:notebooks] [testenv:notebooks]
basepython = python basepython = python
...@@ -112,20 +124,27 @@ whitelist_externals = sh ...@@ -112,20 +124,27 @@ whitelist_externals = sh
deps = deps =
-r{toxinidir}/requirements_dev.txt -r{toxinidir}/requirements_dev.txt
-r{toxinidir}/requirements_continuous_integration.txt -r{toxinidir}/requirements_continuous_integration.txt
conda_deps=
cairosvg
pycairo
tk
conda_channels:
conda-forge
anaconda
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
changedir = {envtmpdir}/6f59bc68108c3895b1828abdd04b9a06
commands = commands =
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths ; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
sh -c 'mkdir -p {envtmpdir}/6f59bc68108c3895b1828abdd04b9a06'
sh -c 'jupyter nbextension install --py --sys-prefix widgetsnbextension' sh -c 'jupyter nbextension install --py --sys-prefix widgetsnbextension'
sh -c 'jupyter nbextension enable --py --sys-prefix widgetsnbextension' sh -c 'jupyter nbextension enable --py --sys-prefix widgetsnbextension'
sh -c 'jupyter nbextension install --py --sys-prefix jpy_canvas' sh -c 'jupyter nbextension install --py --sys-prefix jpy_canvas'
sh -c 'jupyter nbextension enable --py --sys-prefix jpy_canvas' sh -c 'jupyter nbextension enable --py --sys-prefix jpy_canvas'
; https://stackoverflow.com/questions/35545402/how-to-run-an-ipynb-jupyter-notebook-from-terminal/35545463 ; https://stackoverflow.com/questions/35545402/how-to-run-an-ipynb-jupyter-notebook-from-terminal/35545463
sh -c 'ls notebooks/*.ipynb | xargs -n 1 jupyter nbconvert --to python' sh -c 'ls notebooks/*.ipynb | xargs -n 1 jupyter nbconvert --to python'
sh -c 'cd {envtmpdir}/6f59bc68108c3895b1828abdd04b9a06 && ls {toxinidir}/notebooks/*.py | xargs -I{} -n 1 sh -c "echo -e \"\n====== Running {} ========\n\"; ipython {}"' sh -c 'ls {toxinidir}/notebooks/*.py | xargs -I{} -n 1 sh -c "echo -e \"\n====== Running {} ========\n\"; ipython {}"'
[testenv] [testenv]
whitelist_externals = sh whitelist_externals = pip
pip
setenv = setenv =
PYTHONPATH = {toxinidir} PYTHONPATH = {toxinidir}
passenv = passenv =
...@@ -134,9 +153,16 @@ passenv = ...@@ -134,9 +153,16 @@ passenv =
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies ; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
HTTP_PROXY HTTP_PROXY
HTTPS_PROXY HTTPS_PROXY
conda_deps=
cairosvg
pycairo
tk
conda_channels:
conda-forge
anaconda
deps = deps =
-r{toxinidir}/requirements_dev.txt -r{toxinidir}/requirements_dev.txt
commands =
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths ; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
sh -c 'mkdir -p {envtmpdir}/fefed3ba12bf1ed81dbcc20fb52706ea' changedir = {envtmpdir}/fefed3ba12bf1ed81dbcc20fb52706ea
sh -c 'cd {envtmpdir}/fefed3ba12bf1ed81dbcc20fb52706ea && py.test --basetemp={envtmpdir} {toxinidir}' commands =
py.test --basetemp={envtmpdir} {toxinidir}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment