Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Scheffler
py_tools_ds
Commits
f93e68eb
Commit
f93e68eb
authored
Jun 26, 2017
by
Daniel Scheffler
Browse files
Revision of CI setup,
parent
36f4d209
Pipeline
#215
failed with stages
in 19 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
f93e68eb
...
...
@@ -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
setup.py
View file @
f93e68eb
#!/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-Alph
a'
,
'Development Status ::
4
-
Bet
a'
,
'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
)
tests/CI_docker/build_testsuite_image.sh
View file @
f93e68eb
...
...
@@ -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
}
...
...
tests/CI_docker/context/py_tools_ds_ci.docker
View file @
f93e68eb
...
...
@@ -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
...
...
tests/test_py_tools_ds.py
View file @
f93e68eb
...
...
@@ -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
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment