Restructure package and add CI-pipeline with docker container
closes #6 (closed) #7 (closed)
Changes:
-
setup.py
now uses theentry_points
argument for the gui and cli scripts. The cogran cli can now be invoked withcogran
and the gui withcogran-gui
. -
cogran_cli
andcogran_gui
are now part of thecogran
package namespace and can be installed correctly. - Requirements files for development are added.
-
yml
files for conda-environments are created to facilitate the creation of environments which is especially helpful for windows users as conda can resolve the binary dependencies in contrast to pip. - Requirements for development include pytest as testing tool because it is much easier to use. For this the file
pytest.ini
is created where all pytest related configurations can be made. For this thesetup.py
argumentstest_suite
andtests_require
are removed as they are unittest specific and not needed anymore. - .pre-commit-config.yaml has been added to configure respective pre-commit hooks (atm black and flake8)
- README.md has been updated reflecting the changes.
It is also possible to create a wheel file via python setup.py bdist_wheel
.
EDIT:
I also played around with docker and created a small image that has gdal and all requirements for the end user + pytest and flake8 installed. The corresponding Dockerfile is attached and also displayed in the following:
FROM ubuntu:18.10
RUN apt-get -qy update && \
apt-get install -y python3 python3-pip && \
apt-get clean && \
rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN pip3 install flake8 pytest pytest-cov fiona shapely pyqt5==5.9.2 \
qtmodern click tqdm>=4.27.0 testfixtures
In the gitlab sidebar under packages is the project docker registry (limit of 10GB). Also shown there are respective commands to build, tag and push a specified image.
I already pushed the respective image to the g2lab docker registry. At the moment this image has a quite big size of ~400Mb...
Edited by Philipp Loose