1
0
Fork 0
mirror of https://github.com/mikegerber/ocrd_calamari.git synced 2025-07-25 01:49:55 +02:00

📝 readme, makefile, synopsis for cli

Conflicts:
	Makefile
	README.md
	requirements.txt
This commit is contained in:
Konstantin Baierer 2019-08-20 15:36:24 +02:00 committed by Gerber, Mike
parent f7b13b8d3b
commit e34998d58f
3 changed files with 31 additions and 54 deletions

View file

@ -1,6 +1,3 @@
# '$(PYTHON)'
PYTHON = python
# '$(PIP_INSTALL)'
PIP_INSTALL = pip install
@ -17,16 +14,9 @@ help:
@echo " calamari Clone calamari repo"
@echo " calamari_models Clone calamari_models repo"
@echo " calamari/build pip install calamari"
@echo " deps-test Install testing python deps via pip"
@echo " repo/assets Clone OCR-D/assets to ./repo/assets"
@echo " test/assets Setup test assets"
@echo " assets-clean Remove symlinks in test/assets"
@echo " test Run unit tests"
@echo " coverage Run unit tests and determine test coverage"
@echo ""
@echo " Variables"
@echo ""
@echo " PYTHON '$(PYTHON)'"
@echo " PIP_INSTALL '$(PIP_INSTALL)'"
@echo " GIT_CLONE '$(GIT_CLONE)'"
@ -50,41 +40,3 @@ calamari_models:
# pip install calamari
calamari/build: calamari calamari_models
cd calamari && $(PIP_INSTALL) .
#
# Assets and Tests
#
# Install testing python deps via pip
deps-test:
$(PIP) install -r requirements_test.txt
# Clone OCR-D/assets to ./repo/assets
repo/assets:
mkdir -p $(dir $@)
git clone https://github.com/OCR-D/assets "$@"
# Setup test assets
test/assets: repo/assets
mkdir -p $@
cp -r -t $@ repo/assets/data/*
# Remove symlinks in test/assets
assets-clean:
rm -rf test/assets
# Run unit tests
test: test/assets calamari_models
# declare -p HTTP_PROXY
$(PYTHON) -m pytest --continue-on-collection-errors test $(PYTEST_ARGS)
# Run unit tests and determine test coverage
coverage: test/assets calamari_models
coverage erase
make test PYTHON="coverage run"
coverage report
coverage html
.PHONY: assets-clean test