This repository was archived by the owner on Dec 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
59 lines (44 loc) · 1.22 KB
/
makefile
File metadata and controls
59 lines (44 loc) · 1.22 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
.PHONY: all setup tests
# make tests >debug.log 2>&1
ifeq ($(OS),Windows_NT)
PYTHON = venv/Scripts/python.exe
PTEST = venv/Scripts/pytest.exe
COVERAGE = venv/Scripts/coverage.exe
else
PYTHON = ./venv/bin/python
PTEST = ./venv/bin/pytest
COVERAGE = ./venv/bin/coverage
endif
SOURCE = oeg_feature_class
TESTS = tests
PYTEST = $(PTEST) --cov=$(SOURCE) --cov-report term:skip-covered
PIP = $(PYTHON) -m pip install
all: tests
test:
$(PYTEST) -s --cov-append $(TESTS)/test/$(T)
$(COVERAGE) html --skip-covered
tests: flake8 lint
$(PYTEST) --durations=5 $(TESTS)
$(COVERAGE) html --skip-covered
flake8:
$(PYTHON) -m flake8 --max-line-length=120 $(TESTS)
$(PYTHON) -m flake8 --max-line-length=120 $(SOURCE)
lint:
$(PYTHON) -m pylint $(TESTS)/test
$(PYTHON) -m pylint $(SOURCE)
dist:
$(PYTHON) setup.py sdist bdist_wheel
upload_piptest: tests dist
$(PYTHON) -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
upload_pip: tests dist
$(PYTHON) -m twine upload dist/*
setup: setup_python setup_pip
setup3: setup_python3 setup_pip
setup_pip:
$(PIP) --upgrade pip
$(PIP) -r tests/requirements.txt
$(PIP) -r deploy.txt
setup_python3:
$(PYTHON_BIN) -m venv ./venv
setup_python:
$(PYTHON_BIN) -m virtualenv ./venv