forked from apertium/apertium-apy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (27 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
langNames.db: language_names/scraped-cldr.tsv language_names/scraped-sil.tsv language_names/manual-fixes.tsv language_names/manual-additions.tsv language_names/variants.tsv
language_names/build_db.py $@ $^
@if test -f unicode.db; then echo "WARNING: unicode.db now called langNames.db"; fi
dist: langNames.db
python3 setup.py sdist
release: langNames.db
python3 setup.py sdist bdist_wheel
twine upload --sign dist/*
test-release: langNames.db
python3 setup.py sdist bdist_wheel
twine upload --sign --repository-url https://test.pypi.org/legacy/ dist/*
unit-test:
python3 -m unittest tests/test*.py
lint:
flake8 *.py apertium_apy/ language_names/ tests/
LC_ALL=C find language_names/*.tsv -print0 | xargs -0 -n1 -I {} sh -c 'tail -n +2 {} | sort -c'
mypy --config-file mypy.ini **/*.py
test: unit-test lint
coverage:
coverage run -m unittest tests/test*.py
coverage combine
coverage report --fail-under 40
ls .coverage
clean:
rm -f langNames.db
distclean: clean
rm -rf dist/ build/ *.egg-info/ .mypy_cache/ .coverage