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
Model registry
Operate
Environments
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
pranjal_dhole
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
Branches containing commit
No related tags found
Tags containing commit
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
stages
:
-
tests
-
integration_testing
-
benchmarks_and_profiling
-
deploy_docs
cache
:
...
...
@@ -32,6 +33,7 @@ tests:
-
conda install -c conda-forge tox-conda
script
:
-
xvfb-run tox -v --recreate
-
xvfb-run tox -e notebooks -v --recreate
build_and_deploy_docs
:
image
:
"
python:latest"
...
...
@@ -76,4 +78,14 @@ benchmarks_and_profiling:
script
:
-
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 @@
set
FLATLAND_BASEDIR
=
%~dp0
\..
@echo
off
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
cd
%FLATLAND_BASEDIR%
@echo
off
echo
"************ INSTALL JUPYTER EXTENSION *************************"
@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
conda
install
-c
conda
-forge
tox
-conda
||
goto
:error
conda
install
tox
||
goto
:error
tox
-v -e
start_jupyter
--recreate
||
goto
:error
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
# https://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself
FLATLAND_BASEDIR
=
$(
dirname
"
$0
"
)
/..
FLATLAND_BASEDIR
=
$(
realpath
"
$FLATLAND_BASEDIR
"
)
echo
"BASEDIR=
${
FLATLAND_BASEDIR
}
"
cd
${
FLATLAND_BASEDIR
}
set
+x
echo
"************ TESTING PREREQUISITES PYTHON3 + GIT *************************"
set
-x
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 &
conda
install
-c
conda-forge tox-conda
conda
install
tox
tox
-v
-e
start_jupyter &
This diff is collapsed.
Click to expand it.
tox.ini
+
34
−
10
View file @
33ee71fd
[tox]
envlist
=
py36, py37, examples,
notebooks,
flake8, docs, coverage
envlist
=
py36, py37, examples, flake8, docs, coverage
[travis]
python
=
...
...
@@ -73,11 +73,11 @@ passenv =
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
HTTP_PROXY
HTTPS_PROXY
conda_deps
=
conda_deps
=
cairosvg
pycairo
tk
conda_channels:
conda_channels
:
conda-forge
anaconda
deps
=
...
...
@@ -96,11 +96,11 @@ passenv =
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
HTTP_PROXY
HTTPS_PROXY
conda_deps
=
conda_deps
=
cairosvg
pycairo
tk
conda_channels:
conda_channels
:
conda-forge
anaconda
deps
=
...
...
@@ -124,11 +124,11 @@ whitelist_externals = sh
deps
=
-r{toxinidir}/requirements_dev.txt
-r{toxinidir}/requirements_continuous_integration.txt
conda_deps
=
conda_deps
=
cairosvg
pycairo
tk
conda_channels:
conda_channels
:
conda-forge
anaconda
; run tests from subfolder to ensure that resources are accessed via resources and not via relative paths
...
...
@@ -140,9 +140,33 @@ commands =
sh
-c
'jupyter
nbextension
install
--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
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 {}"'
[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]
whitelist_externals
=
pip
setenv
=
...
...
@@ -153,11 +177,11 @@ passenv =
; HTTP_PROXY+HTTPS_PROXY required behind corporate proxies
HTTP_PROXY
HTTPS_PROXY
conda_deps
=
conda_deps
=
cairosvg
pycairo
tk
conda_channels:
conda_channels
:
conda-forge
anaconda
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