Commit 290fdd5a authored by Lukas Riedel's avatar Lukas Riedel

Merge remote-tracking branch 'origin/feature/squash-testing-pipeline' into development/dorie-v1.0

parents 36d40082 da3396cd
......@@ -8,47 +8,89 @@ before_script:
stages:
- build
- test
- deploy
build:main:
stage: build
tags:
- docker
- demeter
script:
- CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --only=dorie all
- export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
- ./dune-common/bin/dunecontrol --only=dorie make doc
stage: build
artifacts:
name: "$CI_BUILD_NAME"
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/doc/html/
expire_in: 1 week
- $CI_PROJECT_DIR/build-cmake
expire_in: 3 days
build:update_dune:
stage: build
tags:
- docker
- demeter
only:
- master
script:
- ./dune-common/bin/dunecontrol update || true
- ./dune-common/bin/dunecontrol update
- ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
- CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol all
- export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
stage: build
- CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --module=dorie all
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake
expire_in: 3 days
build:debug:
stage: build
tags:
- docker
- demeter
script:
- CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" ./dune-common/bin/dunecontrol --only=dorie all
stage: build
- CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --only=dorie all
deploy:docs:
test:main:
stage: test
tags:
- docker
- demeter
dependencies:
- build:main
allow_failure: true
script:
- cd $CI_PROJECT_DIR && bash .deploy_docs
stage: deploy
- ./dune-common/bin/dunecontrol --only=dorie configure
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/Testing
expire_in: 1 week
test:update_dune:
stage: test
tags:
- demeter
dependencies:
- build:update_dune
only:
- master
allow_failure: true
script:
- ./dune-common/bin/dunecontrol --only=dorie configure
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/Testing
expire_in: 1 week
deploy:build_docs:
stage: deploy
tags:
- demeter
dependencies:
- build:main
script:
- ./dune-common/bin/dunecontrol --only=dorie configure
- ./dune-common/bin/dunecontrol --only=dorie make doc
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/doc
expire_in: 1 week
\ No newline at end of file
FROM dorie/dune-env:2.5
FROM dorie/dune-env:2.5.1
MAINTAINER Dion Häfner
WORKDIR /opt/dune
ADD . /opt/dune/dorie/
RUN source /opt/dune/venv/dorie/bin/activate && ./dune-common/bin/dunecontrol --only=dorie all
RUN CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" ./dune-common/bin/dunecontrol --only=dorie all
ENV PATH="/opt/dune/dorie/build-cmake/bin:${PATH}"
WORKDIR /sim
ENTRYPOINT ["/opt/dune/dorie/build-cmake/bin/dorie"]
\ No newline at end of file
......@@ -34,9 +34,9 @@ In the section 'Usage' you will find a list of possible commands. Note that inpu
## Docker Installation - Interactive Setup
This setup is intended for advanced users. You will gain access to the DORiE module outside the container, and be able to make changes to the source code.
We have prepared a [DORiE DUNE Environment Image on Dockerhub](https://hub.docker.com/r/dorie/dune-env/), which is a modified image of the Ubuntu OS that has all dependencies readily installed. The current version is 2.5 (referencing the DUNE module version 2.5). We will run a new container from this image and mount some local directory `<hostdir>/dorie` into it by calling
We have prepared a [DORiE DUNE Environment Image on Dockerhub](https://hub.docker.com/r/dorie/dune-env/), which is a modified image of the Ubuntu OS that has all dependencies readily installed. The current version is 2.5.1 (referencing the DUNE module version 2.5). We will run a new container from this image and mount some local directory `<hostdir>/dorie` into it by calling
docker run -v <hostdir>/dorie:/opt/dune/dorie -i -t dorie/dune-env:2.5 /bin/bash
docker run -v <hostdir>/dorie:/opt/dune/dorie -i -t dorie/dune-env:2.5.1 /bin/bash
Docker will automatically download the image if necessary. Now you can access the content of the (still empty) folder of the virtual machine from your local `<hostdir>/dorie` directory. *Mounting directories is not possible after your container has been started!*
......
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import sys
......
# install the following modules in editable mode: 'pip -e'
set(DUNE_PYTHON_INSTALL_EDITABLE TRUE)
# install required python modules
dune_python_install_package(PATH utilities)
dune_python_install_package(PATH parscraper)
......
......@@ -2,6 +2,11 @@ import os
import h5py
import numpy as np
try: # Python 2.x compatibility
input = raw_input
except NameError:
pass
def read_parameter_file(in_path):
data_dict = {}
with h5py.File(in_path, 'r') as f:
......@@ -32,7 +37,7 @@ def write_parameter_file(group,data_dict,out_path,attrs=None,overwrite=False):
"""
if os.path.isfile(out_path) and not overwrite:
ow = raw_input("The output file {} already exists. Overwrite? [y/N] ".format(out_path))
ow = input("The output file {} already exists. Overwrite? [y/N] ".format(out_path))
if not ow.lower() in ["y","yes"]:
raise RuntimeError("Aborting")
......
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from setuptools import setup
......
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from setuptools import setup
......
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from setuptools import setup
......
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
......
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment