<commit_before>setup:
	sudo apt-get -y install make
	sudo apt-get -y install git
	sudo apt-get -y install python-django
	sudo apt-get -y install python-djangorestframework
	sudo apt-get -y install python-requests
	sudo apt-get -y install python-nose
	sudo apt-get -y install pylint
	sudo apt-get -y install python-markdown
	sudo apt-get -y install python-coverage

setup_jenkins:
	wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
	sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
	sudo apt-get update
	sudo apt-get -y install jenkins

clean:
	-rm coverage.xml
	-rm nosetests.xml

unittest: clean
	export DJANGO_SETTINGS_MODULE=web.settings; nosetests --with-doctest --doctest-tests --with-xunit --with-coverage --nocapture -w web  --cover-package calculator
	python -m coverage xml

functest:
	cd web; python manage.py runserver 0.0.0.0:8888 &
	sleep 3
	nosetests --with-doctest --doctest-tests --with-xunit --nocapture -w functional_tests
	ps aux | grep -ie "0.0.0.0:8888"  | awk '{print $$2}' | xargs kill -9
<commit_msg>add apache to setup<commit_after>setup:
	sudo apt-get -y install make
	sudo apt-get -y install git
	sudo apt-get -y install python-django
	sudo apt-get -y install python-djangorestframework
	sudo apt-get -y install python-requests
	sudo apt-get -y install python-nose
	sudo apt-get -y install pylint
	sudo apt-get -y install python-markdown
	sudo apt-get -y install python-coverage
	sudo apt-get -y install apache2

setup_jenkins:
	wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
	sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
	sudo apt-get update
	sudo apt-get -y install jenkins

clean:
	-rm coverage.xml
	-rm nosetests.xml

unittest: clean
	export DJANGO_SETTINGS_MODULE=web.settings; nosetests --with-doctest --doctest-tests --with-xunit --with-coverage --nocapture -w web  --cover-package calculator
	python -m coverage xml

functest:
	cd web; python manage.py runserver 0.0.0.0:8888 &
	sleep 3
	nosetests --with-doctest --doctest-tests --with-xunit --nocapture -w functional_tests
	ps aux | grep -ie "0.0.0.0:8888"  | awk '{print $$2}' | xargs kill -9

{'fraction_non_alphanumeric': 0.11775121735281098, 'fraction_numerical': 0.017264276228419653, 'mean_word_length': 3.312977099236641, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 4, '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': '2152480', 'n_tokens_mistral': 874, 'n_tokens_neox': 826, 'n_words': 248}