forked from SatelliteQE/nailgun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (41 loc) · 1.59 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
50
51
TEST_OPTIONS=-m unittest discover --start-directory tests --top-level-directory .
CPU_COUNT=$(shell python -c "from multiprocessing import cpu_count; print(cpu_count())")
help:
@echo "Please use \`make <target>' where <target> is one of:"
@echo " help to show this message"
@echo " lint to run flake8 and pylint"
@echo " test to run unit tests"
@echo " test-coverage to run unit tests and measure test coverage"
@echo " docs-html to generate HTML documentation"
@echo " docs-clean to remove documentation"
@echo " package to generate installable Python packages"
@echo " package-clean to remove generated Python packages"
@echo " publish to upload dist/* to PyPI"
docs-html:
@cd docs; $(MAKE) html
docs-clean:
@cd docs; $(MAKE) clean
lint:
flake8 --ignore=W504,E731 .
pylint -j $(CPU_COUNT) --reports=n -E \
--disable=no-member,no-name-in-module --ignore-imports=y \
nailgun tests setup.py docs/conf.py
pylint -j $(CPU_COUNT) --reports=n -E \
--disable=no-member,no-name-in-module --ignore-imports=y \
--disable=similarities \
docs/create_organization_nailgun.py \
docs/create_organization_nailgun_v2.py \
docs/create_organization_plain.py \
docs/create_user_nailgun.py \
docs/create_user_plain.py
test:
python $(TEST_OPTIONS)
test-coverage:
coverage run --source nailgun $(TEST_OPTIONS)
package:
./setup.py sdist bdist_wheel --universal
package-clean:
rm -rf build dist nailgun.egg-info
publish: package
twine upload dist/*
.PHONY: help docs-html docs-clean lint test test-coverage package package-clean publish