Commit 09df70b6 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

First CI setup; updated README.

parent 151a2981
Pipeline #180 canceled with stages
before_script:
- git lfs pull
test_arosics:
script:
- source /root/anaconda3/bin/activate
- export GDAL_DATA=/root/anaconda3/share/gdal
- export PYTHONPATH=$PYTHONPATH:/root # /root <- directory needed later
- make coverage
- make docs
artifacts:
paths:
- htmlcov/
- docs/_build/html/
pages:
stage: deploy
dependencies:
- test_arosics
script:
- mkdir -p public/coverage
- cp -r htmlcov/* public/coverage/
- mkdir -p public/doc
- cp -r docs/_build/html/* public/doc/
artifacts:
paths:
- public
expire_in: 30 days
only:
- master
......@@ -51,7 +51,7 @@ lint: ## check style with flake8
flake8 arosics tests
test: ## run tests quickly with the default Python
python setup.py test
test-all: ## run tests on every Python version with tox
......@@ -85,3 +85,6 @@ dist: clean ## builds source and wheel package
install: clean ## install the package to the active Python's site-packages
python setup.py install
gitlab_CI_docker: ## Build a docker image for CI use within gitlab
cd ./tests/CI_docker/; bash ./build_testsuite_image.sh
......@@ -4,7 +4,15 @@
* Free software: Apache Software License 2.0
* Documentation: https://gitext.gfz-potsdam.de/danschef/arosics/docs/
* Documentation: http://danschef.gitext.gfz-potsdam.de/arosics/doc/
### Status
![svg](https://gitext.gfz-potsdam.de/danschef/arosics/badges/master/build.svg)
![svg](https://gitext.gfz-potsdam.de/danschef/arosics/badges/master/coverage.svg)
See also the latest [coverage](http://danschef.gitext.gfz-potsdam.de/arosics/coverage/) report.
......
=======
arosics
AROSICS
=======
An Automated and Robust Open-Source Image Co-Registration Software for Multi-Sensor Satellite Data
* Free software: Apache Software License 2.0
* Documentation: http://danschef.gitext.gfz-potsdam.de/arosics/doc/
.. image:: https://img.shields.io/pypi/v/arosics.svg
Status
------
.. .. image:: https://img.shields.io/pypi/v/arosics.svg
:target: https://pypi.python.org/pypi/arosics
.. image:: https://img.shields.io/travis/danschef/arosics.svg
.. .. image:: https://img.shields.io/travis/danschef/arosics.svg
:target: https://travis-ci.org/danschef/arosics
.. image:: https://readthedocs.org/projects/arosics/badge/?version=latest
.. .. image:: https://readthedocs.org/projects/arosics/badge/?version=latest
:target: https://arosics.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/danschef/arosics/shield.svg
.. .. image:: https://pyup.io/repos/github/danschef/arosics/shield.svg
:target: https://pyup.io/repos/github/danschef/arosics/
:alt: Updates
An Automated and Robust Open-Source Image Co-Registration Software for Multi-Sensor Satellite Data
.. image:: https://gitext.gfz-potsdam.de/danschef/arosics/badges/master/build.svg
.. image:: https://gitext.gfz-potsdam.de/danschef/arosics/badges/master/coverage.svg
* Free software: Apache Software License 2.0
* Documentation: https://arosics.readthedocs.io.
See also the latest coverage_ report.
Features
......@@ -30,6 +38,25 @@ Features
* TODO
Installation
------------
* Use the pip-Installer:
pip install git+https://gitext.gfz-potsdam.de/danschef/arosics.git # for HTTPS authentification
pip install git+git@gitext.gfz-potsdam.de:danschef/arosics.git # for SSH-Key authentification
* Or clone the repository via GIT and update the PATH environment variable:
cd /your/installation/folder
git clone https://gitext.gfz-potsdam.de/danschef/arosics.git
PATH=$PATH:~/path/to/your/installation/folder/arosics
Credits
-------
......@@ -37,4 +64,5 @@ This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypack
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _coverage: http://danschef.gitext.gfz-potsdam.de/arosics/coverage/
......@@ -19,9 +19,7 @@ setup_requirements = [
# TODO(danschef): put setup requirements (distutils extensions, etc.) here
]
test_requirements = [
# TODO: put package test requirements here
]
test_requirements = ['coverage']
setup(
name='arosics',
......
#!/usr/bin/env bash
context_dir="./context"
dockerfile="arosics_ci.docker"
tag="arosics_ci:latest"
gitlab_runner="arosics_gitlab_CI_runner"
# get py_tools_ds project
rm -rf context/py_tools_ds
git clone https://gitext.gfz-potsdam.de/danschef/py_tools_ds.git ./context/py_tools_ds
# get geoarray project
rm -rf context/geoarray
git clone https://gitext.gfz-potsdam.de/danschef/geoarray.git ./context/geoarray
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 https://gitext.gfz-potsdam.de/danschef/arosics/settings/ci_cd"
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 'https://gitext.gfz-potsdam.de/ci' \
--registration-token '${token}' \
--run-untagged=true \
--locked=true \
--tag-list arosics_ci_client \
--description '${runner_name}' \
--docker-image '${tag}' "
ls
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 'Anaconda3-4.3.1-Linux-x86_64.sh'
RUN /bin/bash -i -c "cd /root; wget https://repo.continuum.io/archive/$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 some needed stuff to /root
#COPY *.pkl /root/ # EXAMPLE
#COPY *.h5 /root/ # EXAMPLE
# copy py_tools_ds and geoarray code to /tmp
COPY py_tools_ds /tmp/py_tools_ds
COPY geoarray /tmp/geoarray
# install git lfs
RUN /bin/bash -i -c "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash"
# installing git large file support, see here: https://git-lfs.github.com/ , change version number below for future upgrades
ENV git_lfs_v='2.1.1'
RUN /bin/bash -i -c "wget https://github.com/git-lfs/git-lfs/releases/download/v${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 ./install.sh"
# 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 setup.py install;"
cd /tmp/geoarray/; python setup.py install;"
......@@ -6,7 +6,8 @@
import unittest
from arosics import arosics
from arosics import COREG
from arosics import COREG_LOCAL
class TestArosics(unittest.TestCase):
......
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