diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..72b2c5a --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,28 @@ +version: 2 + +jobs: + + build-python36: + docker: + - image: python:3.6 + steps: + - checkout + - restore_cache: + keys: + - model-cache + - run: make models + - save_cache: + key: model-cache + paths: + models_eynollah.tar.gz + models_eynollah + - run: make install + - run: make smoke-test + +workflows: + version: 2 + build: + jobs: + - build-python36 + #- build-python37 + #- build-python38 # no tensorflow for python 3.8 diff --git a/.gitignore b/.gitignore index 57e34df..9a437ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.egg-info __pycache__ sbb_newspapers_org_image/pylint.log +models_eynollah* diff --git a/Makefile b/Makefile index 9a96602..4806d07 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ help: @echo "" @echo " Targets" @echo "" + @echo " models Download and extract models to $(PWD)/models_eynollah" @echo " install Install with pip" @echo " install-dev Install editable with pip" @echo "" @@ -12,6 +13,16 @@ help: # END-EVAL + +# Download and extract models to $(PWD)/models_eynollah +models: models_eynollah + +models_eynollah: models_eynollah.tar.gz + tar xf models_eynollah.tar.gz + +models_eynollah.tar.gz: + wget 'https://qurator-data.de/eynollah/models_eynollah.tar.gz' + # Install with pip install: pip install . @@ -19,3 +30,6 @@ install: # Install editable with pip install-dev: pip install -e . + +smoke-test: + eynollah -i tests/resources/kant_aufklaerung_1784_0020.tif -o . -m $(PWD)/models_eynollah diff --git a/tests/resources/kant_aufklaerung_1784_0020.tif b/tests/resources/kant_aufklaerung_1784_0020.tif new file mode 100644 index 0000000..13db797 Binary files /dev/null and b/tests/resources/kant_aufklaerung_1784_0020.tif differ