Commit 8465e516 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added first version of CI files (not yet working).

updated __version__ and __versionalias__
parent ca3294e1
Pipeline #137 failed with stages
- git lfs pull
- source /root/anaconda3/bin/activate
- export GDAL_DATA=/root/anaconda3/share/gdal
- export PYTHONPATH=$PYTHONPATH:/root # /root <- directory needed later
- make coverage
- make docs
- htmlcov/
- docs/_build/html/
stage: deploy
- test_geoarray
- mkdir -p public/coverage
- cp -r htmlcov/* public/coverage/
- mkdir -p public/doc
- cp -r docs/_build/html/* public/doc/
- public
expire_in: 30 days
- master
......@@ -51,16 +51,16 @@ lint: ## check style with flake8
flake8 geoarray tests
test: ## run tests quickly with the default Python
python test
test-all: ## run tests on every Python version with tox
coverage: ## check code coverage quickly with the default Python
coverage run --source geoarray test
coverage report -m
coverage html
$(BROWSER) htmlcov/index.html
......@@ -87,3 +87,6 @@ dist: clean ## builds source and wheel package
install: clean ## install the package to the active Python's site-packages
python install
gitlab_CI_docker: ## Build a docker image for CI use within gitlab
cd ./tests/CI_docker/; bash ./
......@@ -2,8 +2,8 @@
__author__ = """Daniel Scheffler"""
__email__ = ''
__version__ = '0.3.3'
__versionalias__ = 'v20170616.01'
__version__ = '0.4.0'
__versionalias__ = 'v20170616.02'
from .baseclasses import GeoArray
......@@ -20,7 +20,7 @@ test_requirements = [
description="Fast Python interface for geodata - either on disk or in memory.",
long_description=readme + '\n\n' + history,
author="Daniel Scheffler",
#!/usr/bin/env bash
# get py_tools_ds project
rm -rf context/py_tools_ds
git clone ./context/py_tools_ds
echo "#### Build runner docker image"
sudo docker rmi ${tag}
sudo docker build -f ${context_dir}/${dockerfile} -m 20G -t ${tag} ${context_dir}
echo "#### Create gitlab-runner (daemon) container with tag; ${tag}"
sudo docker stop ${gitlab_runner}
sudo docker rm ${gitlab_runner}
sudo docker run -d --name ${gitlab_runner} --restart always \
-v /var/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner:latest
echo "#### Register container at gitlab, get token here"
read -p "Please enter gitlab token: " token
echo ""
read -p "Please enter gitlab runner name: " runner_name
echo "New gitlab runner image will named ${gitlab_runner}"
sudo docker exec -it ${gitlab_runner} /bin/bash -c "export RUNNER_EXECUTOR=docker && gitlab-ci-multi-runner register -n \
--url '' \
--registration-token '${token}' \
--run-untagged=true \
--locked=true \
--tag-list gts2_client \
--description '${runner_name}' \
--docker-image '${tag}' "
FROM centos:7
RUN yum update -y && \
yum install -y wget vim bzip2 gcc gcc-c++ make libgl1-mesa-glx mesa-libGL qt5-qtbase-gui git # TODO
ENV anaconda_dl ''
RUN /bin/bash -i -c "cd /root; wget$anaconda_dl ; \
bash -i /root/$anaconda_dl -b ; \
rm -f /root/$anaconda_dl"
# 'conda install --yes -c conda-forge 'icu=58.*' lxml' fixing a bug for conda-forge gdal build, as of 06/2017
RUN /bin/bash -i -c "source /root/anaconda3/bin/activate ; \
conda install --yes pyqt coverage ; \
conda install --yes -c conda-forge gdal ; \
conda install --yes -c conda-forge 'icu=58.*' lxml ; \
conda install --yes -c conda-forge glymur pygrib rasterio pyproj cachetools ; \
pip install shapely geopandas dicttoxml jsmin cerberus pyprind pint iso8601 tqdm mpld3 sphinx-argparse"
# copy sicor tables to /root # FIXME
#COPY *.pkl /root/ # FIXME
#COPY *.h5 /root/ # FIXME
# copy py_tools_ds code to /tmp
#COPY py_tools_ds /tmp/py_tools_ds
# install git lfs
RUN /bin/bash -i -c "curl -s | bash"
# installing git large file support, see here: , change version number below for future upgrades
ENV git_lfs_v='2.1.1'
RUN /bin/bash -i -c "wget${git_lfs_v}/git-lfs-linux-amd64-${git_lfs_v}.tar.gz; \
tar -zxvf git-lfs-linux-amd64-${git_lfs_v}.tar.gz; \
cd git-lfs-${git_lfs_v}; \
bash ./"
# set matplotlib backend to Agg as default, Qt won't work in headless docker containers
RUN bash -i -c 'source /root/anaconda3/bin/activate; \
sed -i "/backend : tkagg/c\backend : Agg" $(python -c "import matplotlib; print(matplotlib.matplotlib_fname())"); \
sed -i "/backend : Qt4Agg/c\backend : Agg" $(python -c "import matplotlib; print(matplotlib.matplotlib_fname())"); \
sed -i "/backend : qt5agg/c\backend : Agg" $(python -c "import matplotlib; print(matplotlib.matplotlib_fname())")'
RUN bash -i -c "source /root/anaconda3/bin/activate; \
cd /tmp/py_tools_ds/; python install;"
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