Skip to content
This repository has been archived by the owner on Jan 29, 2022. It is now read-only.

Commit

Permalink
Makefile: remove unused test targets
Browse files Browse the repository at this point in the history
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
  • Loading branch information
virtualtam committed Aug 24, 2016
1 parent cdcf697 commit 31556b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 75 deletions.
39 changes: 1 addition & 38 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
PACKAGE=botibal
NPROC := $(shell nproc)
PYTHONFILES := \
$(shell find . \
-not -path "*build*" \
-not -path "*docs*" \
-not -path "*.tox*" \
-name '*.py')

all: sdist build
.PHONY: clean distclean
all: lint coverage sdist build

clean:
@rm -rf build dist
Expand Down Expand Up @@ -40,31 +31,3 @@ test_twine: sdist bdist_wheel
# sphinx documentation
sphinx_%: clean
@cd docs && $(MAKE) $*

# static analysis
lint: isort pep8 pep257 pylint

isort: clean
@echo "=== isort ==="
@isort $(PYTHONFILES) --check-only --diff

pep%: clean
@echo "=== PEP$* ==="
@pep$* $(PYTHONFILES)

pylint: clean
@echo "=== Pylint ==="
@pylint -j $(NPROC) $(PYTHONFILES)

# testing
coverage: clean
@echo "=== Coverage ==="
@coverage run --source=$(PACKAGE) -m unittest discover -s tests
@coverage report

coverage_html: clean coverage
@rm -rf htmlcov
@coverage html

test: clean
@python -m unittest discover -s tests
37 changes: 0 additions & 37 deletions docs/developer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,43 +35,6 @@ Tests:
* `coverage`_;
* `unittest`_.

Make targets
^^^^^^^^^^^^^

A Makefile is available with useful dev/test targets:

Static analysis:

.. code-block:: bash
# run isort import checks
$ make isort
# run PEP8 syntax checks
$ make pep257
# run PEP8 syntax checks
$ make pep8
# run pylint syntax checks
$ make pylint
# run all syntax checkers
$ make lint
Tests:

.. code-block:: bash
# run all unitary tests
$ make test
# run all unit tests, generate an HTML coverage report
$ make coverage
# take a look at the report
$ <browser> htmlcov/index.html
Tox
^^^

Expand Down

0 comments on commit 31556b7

Please sign in to comment.