Commit f93e68eb authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Revision of CI setup,

parent 36f4d209
Pipeline #215 failed with stages
in 19 seconds
......@@ -51,16 +51,16 @@ lint: ## check style with flake8
flake8 py_tools_ds tests
test: ## run tests quickly with the default Python
python setup.py test
test-all: ## run tests on every Python version with tox
tox
coverage: ## check code coverage quickly with the default Python
coverage run --source py_tools_ds setup.py 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 setup.py install
gitlab_CI_docker: ## Build a docker image for CI use within gitlab
cd ./tests/CI_docker/; bash ./build_testsuite_image.sh
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
......@@ -9,13 +11,9 @@ with open('README.rst') as readme_file:
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'gdal', 'numpy', 'shapely', 'six', 'rasterio', 'geopandas',
]
test_requirements = [
# TODO: put package test requirements here
]
requirements = ['gdal', 'numpy', 'shapely', 'six', 'rasterio', 'geopandas',]
setup_requirements = [] # TODO(danschef): put setup requirements (distutils extensions, etc.) here
test_requirements = ['coverage']
setup(
name='py_tools_ds',
......@@ -34,7 +32,7 @@ setup(
zip_safe=False,
keywords='py_tools_ds',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
......@@ -45,7 +43,9 @@ setup(
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
test_suite='tests',
tests_require=test_requirements
tests_require=test_requirements,
setup_requires=setup_requirements
)
......@@ -3,11 +3,11 @@
context_dir="./context"
dockerfile="py_tools_ds_ci.docker"
tag="py_tools_ds_ci:latest"
gitlab_runner="danschef_gitlab_CI_runner"
gitlab_runner="py_tools_ds_gitlab_CI_runner"
# get py_tools_ds project # TODO move this to setup.py as soon as package is public
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 # TODO move this to setup.py as soon as package is public
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}
......
......@@ -13,7 +13,7 @@ RUN /bin/bash -i -c "source /root/anaconda3/bin/activate ; \
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"
pip install shapely geopandas dicttoxml jsmin cerberus pyprind pint iso8601 tqdm mpld3 sphinx-argparse six"
# copy some needed stuff to /root
#COPY *.pkl /root/ # EXAMPLE
......
......@@ -12,7 +12,7 @@ Tests for `py_tools_ds` module.
import sys
import unittest
from py_tools_ds import py_tools_ds
from py_tools_ds 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