forked from openedx/edx-enterprise-data
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (39 loc) · 2.23 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
37
38
39
40
41
42
43
44
45
46
47
48
49
.DEFAULT_GOAL := help
help: ## display this help message
@echo "Please use \`make <target>' where <target> is one of"
@perl -nle'print $& if m{^[\.a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}'
clean: ## remove generated byte code, coverage reports, and build artifacts
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '__pycache__' -exec rm -rf {} +
find . -name '*~' -exec rm -f {} +
coverage erase
rm -fr build/
rm -fr dist/
rm -fr *.egg-info
coverage: clean ## generate and view HTML coverage report
py.test --cov-report html
$(BROWSER) htmlcov/index.html
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in
pip install -q pip-tools
pip-compile --upgrade -o requirements/base.txt requirements/base.in
pip-compile --upgrade -o requirements/dev.txt requirements/base.in requirements/dev-enterprise_data.in requirements/dev-enterprise_reporting.in requirements/quality.in
pip-compile --upgrade -o requirements/quality.txt requirements/base.in requirements/dev-enterprise_data.in requirements/quality.in requirements/test.in
pip-compile --upgrade -o requirements/travis.txt requirements/travis.in
pip-compile --upgrade -o requirements/test.txt requirements/base.in requirements/test.in
pip-compile --upgrade -o requirements/test-reporting.txt requirements/test-reporting.in
pip-compile --upgrade -o requirements/test-master.txt requirements/base.in requirements/test-master.in requirements/test.in
requirements: ## install development environment requirements
pip install -qr requirements/base.txt --exists-action w
pip-sync requirements/base.txt requirements/dev.txt requirements/test.txt
test: clean ## run tests in the current virtualenv
pip install -qr requirements/test.txt --exists-action w
py.test
test-all: clean ## run tests on every supported Python/Django combination
tox
tox -e quality
validate: test ## run tests and quality checks
tox -e quality
isort: ## call isort on packages/files that are checked in quality tests
isort --recursive tests enterprise_reporting enterprise_data enterprise_data_roles manage.py setup.py
.PHONY: requirements upgrade help