Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flatland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elrichgro
Flatland
Commits
33ee71fd
Commit
33ee71fd
authored
5 years ago
by
u214892
Browse files
Options
Downloads
Patches
Plain Diff
#97 tox-conda #94 use miniconda instead of anaconda
parent
cff4ce0c
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+12
-0
12 additions, 0 deletions
.gitlab-ci.yml
getting_started/getting_started.bat
+4
-40
4 additions, 40 deletions
getting_started/getting_started.bat
getting_started/getting_started.sh
+4
-47
4 additions, 47 deletions
getting_started/getting_started.sh
tox.ini
+34
-10
34 additions, 10 deletions
tox.ini
with
54 additions
and
97 deletions
.gitlab-ci.yml
+
12
−
0
View file @
33ee71fd
...
@@ -11,6 +11,7 @@ image: themattrix/tox
...
@@ -11,6 +11,7 @@ image: themattrix/tox
stages
:
stages
:
-
tests
-
tests
-
integration_testing
-
benchmarks_and_profiling
-
benchmarks_and_profiling
-
deploy_docs
-
deploy_docs
cache
:
cache
:
...
@@ -32,6 +33,7 @@ tests:
...
@@ -32,6 +33,7 @@ tests:
-
conda install -c conda-forge tox-conda
-
conda install -c conda-forge tox-conda
script
:
script
:
-
xvfb-run tox -v --recreate
-
xvfb-run tox -v --recreate
-
xvfb-run tox -e notebooks -v --recreate
build_and_deploy_docs
:
build_and_deploy_docs
:
image
:
"
python:latest"
image
:
"
python:latest"
...
@@ -76,4 +78,14 @@ benchmarks_and_profiling:
...
@@ -76,4 +78,14 @@ benchmarks_and_profiling:
script
:
script
:
-
xvfb-run tox -e benchmarks,profiling -v --recreate
-
xvfb-run tox -e benchmarks,profiling -v --recreate
test_conda_setup
:
stage
:
integration_testing
before_script
:
-
apt update
-
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
script
:
-
export PATH=/tmp/miniconda3/bin:$PATH; bash getting_started/getting_started.sh
This diff is collapsed.
Click to expand it.
getting_started/getting_started.bat
+
4
−
40
View file @
33ee71fd
...
@@ -2,47 +2,11 @@
...
@@ -2,47 +2,11 @@
set
FLATLAND_BASEDIR
=
%~dp0
\..
set
FLATLAND_BASEDIR
=
%~dp0
\..
@echo
off
cd
%FLATLAND_BASEDIR%
echo
"************ TESTING PREREQUISITES PYTHON3 + GIT + GIT *************************"
@echo
on
git
--version
||
goto
:error
python
--version
||
goto
:error
@echo
off
echo
"************ SETUP VIRTUAL ENVIRONMENT FLATLAND *************************"
@echo
on
(
conda
info
--envs
|
findstr
flatland
-rl
)
||
conda
create
python
=
3
.6
-y --name
flatland
-rl
||
goto
:error
(
call
conda
activate
flatland
-rl
||
call
activate
flatland
-rl
)
||
goto
:error
@echo
off
echo
"************ INSTALL FLATLAND AND DEPENDENCIES IN THE VIRTUALENV *************************"
@echo
on
rem TODO we should get rid of having to install these packages outside of setup.py with conda!
call
conda
install
-y -c
conda
-forge
cairosvg
pycairo
||
goto
:error
call
conda
install
-y -c
anaconda
tk
||
goto
:error
call
python
-m
pip
install
--upgrade
pip
||
goto
:error
python
setup
.py
install
||
goto
:error
#
ensure
jupyter
is
installed
in
the
virtualenv
python
-m
pip
install
--upgrade -r
%FLATLAND_BASEDIR%
/requirements
_dev.txt
-r
%FLATLAND_BASEDIR%
/requirements
_continuous_integration.txt
||
goto
:error
conda
install
-c
conda
-forge
tox
-conda
||
goto
:error
@echo
off
conda
install
tox
||
goto
:error
echo
"************ INSTALL JUPYTER EXTENSION *************************"
tox
-v -e
start_jupyter
--recreate
||
goto
:error
@echo
on
jupyter
nbextension
install
--py --sys-prefix
widgetsnbextension
||
goto
:error
jupyter
nbextension
enable
--py --sys-prefix
widgetsnbextension
||
goto
:error
jupyter
nbextension
install
--py --sys-prefix
jpy_canvas
||
goto
:error
jupyter
nbextension
enable
--py --sys-prefix
jpy_canvas
||
goto
:error
@echo
off
echo
"************ RUN JUPYTER NOTEBOOKS *************************"
@echo
on
jupyter
notebook
||
goto
:error
goto
:EOF
goto
:EOF
...
...
This diff is collapsed.
Click to expand it.
getting_started/getting_started.sh
+
4
−
47
View file @
33ee71fd
...
@@ -6,51 +6,8 @@ set -x # echo commands
...
@@ -6,51 +6,8 @@ set -x # echo commands
# https://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself
# https://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself
FLATLAND_BASEDIR
=
$(
dirname
"
$0
"
)
/..
FLATLAND_BASEDIR
=
$(
dirname
"
$0
"
)
/..
FLATLAND_BASEDIR
=
$(
realpath
"
$FLATLAND_BASEDIR
"
)
FLATLAND_BASEDIR
=
$(
realpath
"
$FLATLAND_BASEDIR
"
)
echo
"BASEDIR=
${
FLATLAND_BASEDIR
}
"
cd
${
FLATLAND_BASEDIR
}
set
+x
conda
install
-c
conda-forge tox-conda
echo
"************ TESTING PREREQUISITES PYTHON3 + GIT *************************"
conda
install
tox
set
-x
tox
-v
-e
start_jupyter &
git
--version
python
--version
conda
--version
echo
$PATH
set
+x
echo
"************ SETUP VIRTUAL ENVIRONMENT FLATLAND *************************"
set
-x
source
deactivate
(
conda info
--envs
| fgrep flatland-rl
)
||
conda create
python
=
3.6
-y
--name
flatland-rl
source
activate flatland-rl
set
+x
echo
"************ INSTALL FLATLAND IN THE VIRTUALENV *************************"
set
-x
# TODO we should get rid of having to install these packages outside of setup.py with conda!
conda
install
-y
-c
conda-forge cairosvg pycairo
conda
install
-y
-c
anaconda tk
python
-m
pip
install
--upgrade
pip
python
${
FLATLAND_BASEDIR
}
/setup.py
install
# ensure jupyter is installed in the virtualenv
python
-m
pip
install
--upgrade
-r
${
FLATLAND_BASEDIR
}
/requirements_dev.txt
-r
requirements_continuous_integration.txt
set
+x
echo
"************ INSTALL JUPYTER EXTENSION *************************"
set
-x
jupyter nbextension
install
--py
--sys-prefix
widgetsnbextension
jupyter nbextension
enable
--py
--sys-prefix
widgetsnbextension
jupyter nbextension
install
--py
--sys-prefix
jpy_canvas
jupyter nbextension
enable
--py
--sys-prefix
jpy_canvas
set
+x
echo
"************ RUN JUPYTER NOTEBOOKS *************************"
set
-x
jupyter notebook &
This diff is collapsed.
Click to expand it.
tox.ini
+
34
−
10
View file @
33ee71fd
[tox]
[tox]
envlist
=
py36, py37, examples,
notebooks,
flake8, docs, coverage
envlist
=
py36, py37, examples, flake8, docs, coverage
[travis]
[travis]
python
=
python
=
...
@@ -73,11 +73,11 @@ passenv =
...
@@ -73,11 +73,11 @@ 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
=
conda_deps
=
cairosvg
cairosvg
pycairo
pycairo
tk
tk
conda_channels:
conda_channels
:
conda-forge
conda-forge
anaconda
anaconda
deps
=
deps
=
...
@@ -96,11 +96,11 @@ passenv =
...
@@ -96,11 +96,11 @@ 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
=
conda_deps
=
cairosvg
cairosvg
pycairo
pycairo
tk
tk
conda_channels:
conda_channels
:
conda-forge
conda-forge
anaconda
anaconda
deps
=
deps
=
...
@@ -124,11 +124,11 @@ whitelist_externals = sh
...
@@ -124,11 +124,11 @@ 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
=
conda_deps
=
cairosvg
cairosvg
pycairo
pycairo
tk
tk
conda_channels:
conda_channels
:
conda-forge
conda-forge
anaconda
anaconda
; 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
...
@@ -140,9 +140,33 @@ commands =
...
@@ -140,9 +140,33 @@ commands =
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
{toxinidir}/
notebooks/*.ipynb
|
xargs
-n
1
jupyter
nbconvert
--to
python'
sh
-c
'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:start_jupyter]
basepython
=
python
setenv
=
PYTHONPATH
=
{toxinidir}
passenv
=
DISPLAY
XAUTHORITY
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
HTTP_PROXY
HTTPS_PROXY
whitelist_externals
=
sh
deps
=
-r{toxinidir}/requirements_dev.txt
-r{toxinidir}/requirements_continuous_integration.txt
conda_deps
=
cairosvg
pycairo
tk
conda_channels
:
conda-forge
anaconda
commands
=
jupyter
notebook
[testenv]
[testenv]
whitelist_externals
=
pip
whitelist_externals
=
pip
setenv
=
setenv
=
...
@@ -153,11 +177,11 @@ passenv =
...
@@ -153,11 +177,11 @@ 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
=
conda_deps
=
cairosvg
cairosvg
pycairo
pycairo
tk
tk
conda_channels:
conda_channels
:
conda-forge
conda-forge
anaconda
anaconda
deps
=
deps
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment