<commit_before>src_dir := httpmeter

python ?= python3.5
virtualenv_dir := pyenv
pip := $(virtualenv_dir)/bin/pip
pytest := $(virtualenv_dir)/bin/py.test
linter := $(virtualenv_dir)/bin/flake8
py_requirements ?= requirements/prod.txt requirements/dev.txt
coverage := $(virtualenv_dir)/bin/coverage


test: $(virtualenv_dir)
	PYTHONPATH=$(PYTHONPATH):. $(coverage) run \
		--source $(src_dir) --branch $(pytest) -s tests
	$(coverage) report -m
.PHONY: test

lint: $(virtualenv_dir)
	$(linter) $(src_dir)
.PHONY: lint

$(virtualenv_dir): $(py_requirements)
	virtualenv $@ -p $(python)
	for r in $^ ; do \
		$(pip) install -r $$r ; \
	done<commit_msg>Add makefile target to check types with mypy<commit_after>src_dir := httpmeter

python ?= python3.5
virtualenv_dir := pyenv
pip := $(virtualenv_dir)/bin/pip
pytest := $(virtualenv_dir)/bin/py.test
linter := $(virtualenv_dir)/bin/flake8
py_requirements ?= requirements/prod.txt requirements/dev.txt
coverage := $(virtualenv_dir)/bin/coverage


test: $(virtualenv_dir)
	PYTHONPATH=$(PYTHONPATH):. $(coverage) run \
		--source $(src_dir) --branch $(pytest) -s tests
	$(coverage) report -m
.PHONY: test

lint: $(virtualenv_dir)
	$(linter) $(src_dir)
.PHONY: lint

.PHONY: check-types
check-types: $(virtualenv_dir)
	mypy --ignore-missing-imports httpmeter

$(virtualenv_dir): $(py_requirements)
	virtualenv $@ -p $(python)
	for r in $^ ; do \
		$(pip) install -r $$r ; \
	done
{'fraction_non_alphanumeric': 0.1676056338028169, 'fraction_numerical': 0.004225352112676056, 'mean_word_length': 4.823770491803279, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2900877', 'n_tokens_mistral': 552, 'n_tokens_neox': 538, 'n_words': 119}