<commit_before>#!/usr/bin/make
# WARN: gmake syntax
########################################################
# Makefile for ztpserver
#
# useful targets:
#   make sdist -- builds a source distribution
#   make pyflakes, make pep8 -- source code checks
#   make pylint -- source code checks
#   make tests -- run the tests
#   make test_server -- run all server tests (including neighbordb)
#   make test_server TESTNAME=<name of test>
#   make test_client -- run client tests
#   make test_client TESTNAME=<name of test>
#   make test_actions -- run action tests only
#   make test_actions TESTNAME=<name of test>
#   make test_neighbordb -- run neighbordb tests only
#   make clean -- cleans distutils
#
########################################################
# variable section

NAME = "ztpserver"
PYTHON = python
TESTNAME = discover

VERSION := $(shell cat VERSION)

########################################################

all: clean python

pep8:
	@echo "#############################################"
	@echo "# Running PEP8 Compliance Tests"
	@echo "#############################################"
	-pep8 -r --ignore=E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225,E261,E241 ztpserver/ bin/
	-pep8 -r --ignore=E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225,E261,E241 --filename "*" client/

pyflakes:
	pyflakes ztpserver/* bin/*

pylint:
	find . -name \*.py | xargs pylint --rcfile .pylintrc

clean:
	@echo "Cleaning up distutils stuff"
	rm -rf build
	rm -rf dist
	rm -rf MANIFEST
	@echo "Cleaning up byte compiled python stuff"
	find . -type f -regex ".*\.py[co]$$" -delete

test_neighbordb: clean
	PYTHONPATH=./ $(PYTHON)  ./test/server/test_neighbordb.py

test_client: clean
ifeq ($(TESTNAME),discover)
	$(PYTHON)  -m unittest discover test/client -v
else
	$(PYTHON)  test/client/$(TESTNAME) -v
endif

test_actions: clean
ifeq ($(TESTNAME),discover)
	$(PYTHON)  -m unittest discover test/actions -v
else
	$(PYTHON)  test/actions/$(TESTNAME) -v
endif

test_server: clean<commit_msg>updates Makefile<commit_after>#!/usr/bin/make
# WARN: gmake syntax
########################################################
# Makefile for ztpserver
#
# useful targets:
#   make sdist -- builds a source distribution
#   make pylint -- source code checks
#   make tests -- run the tests
#   make test_server -- run all server tests (including neighbordb)
#   make test_server TESTNAME=<name of test>
#   make test_client -- run client tests
#   make test_client TESTNAME=<name of test>
#   make test_actions -- run action tests only
#   make test_actions TESTNAME=<name of test>
#   make test_neighbordb -- run neighbordb tests only
#   make clean -- cleans distutils
#
########################################################
# variable section

NAME = "ztpserver"
PYTHON = python
TESTNAME = discover

VERSION := $(shell cat VERSION)

########################################################

all: clean python

pylint:
	find ./ztpserver -name \*.py | xargs pylint --rcfile .pylintrc
	find ./test -name \*.py | xargs pylint --rcfile .pylintrc
	find ./actions -name \*.py | xargs pylint --rcfile .pylintrc
	find ./client -name \*.py | xargs pylint --rcfile .pylintrc

clean:
	@echo "Cleaning up distutils stuff"
	rm -rf build
	rm -rf dist
	rm -rf MANIFEST
	@echo "Cleaning up byte compiled python stuff"
	find . -type f -regex ".*\.py[co]$$" -delete

test_neighbordb: clean
	PYTHONPATH=./ $(PYTHON)  ./test/server/test_neighbordb.py

test_client: clean
ifeq ($(TESTNAME),discover)
	$(PYTHON)  -m unittest discover test/client -v
else
	$(PYTHON)  test/client/$(TESTNAME) -v
endif

test_actions: clean
ifeq ($(TESTNAME),discover)
	$(PYTHON)  -m unittest discover test/actions -v
else
	$(PYTHON)  test/actions/$(TESTNAME) -v
endif

test_server: clean
{'fraction_non_alphanumeric': 0.221424774056353, 'fraction_numerical': 0.023657628920786815, 'mean_word_length': 4.307475317348378, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5838975', 'n_tokens_mistral': 1332, 'n_tokens_neox': 1243, 'n_words': 368}