-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
38 lines (30 loc) · 886 Bytes
/
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
37
SHELL = /bin/bash
VENV_PATH = .venv
help:
@echo "Thanks for your interest in the Rossum Python SDK!"
@echo
@echo "make install: Install all needed dependencies including tests"
@echo "make lint: Run linters"
@echo "make test: Run basic tests (not testing most integrations)"
@echo "make format: Run code formatters (destructive)"
@echo
@echo "Also make sure to read ./CONTRIBUTING.md"
.venv:
virtualenv -ppython3 $(VENV_PATH)
$(VENV_PATH)/bin/pip install tox
install:
$(VENV_PATH)/bin/pip install -e '.[tests]'
format: .venv
$(VENV_PATH)/bin/tox -e linting --notest
.tox/linting/bin/black .
.PHONY: format
test: .venv
pytest tests
.PHONY: test
lint: .venv
@set -e && $(VENV_PATH)/bin/tox -e linting || ( \
echo "================================"; \
echo "Bad formatting? Run: make format"; \
echo "================================"; \
false)
.PHONY: lint