<commit_before>DEFAULT_GOAL: help
TAG ?= $(shell git rev-parse HEAD)
IMAGE = securedrop

.PHONY: lint
lint: ## Run the python linter with the project's default error settings
	find . -name '*.py' | xargs pylint --reports=no --errors-only \
	   --disable=import-error \
	   --disable=no-name-in-module \
	   --disable=unexpected-keyword-arg \
	   --disable=too-many-function-args \
	   --disable=import-error \
	   --max-line-length=100

.PHONY: lint-full
lint-full:  ## Run the python linter with nothing disabled
	find . -name '*.py' | xargs pylint

.PHONY: test
test: ## Run the test suite in a Ubuntu 16.04 (Xenial) dockerized environment
	./bin/dev-shell ./bin/run-test -v $${TESTFILES:-tests}

.PHONY: test-trusty
test-trusty: ## Run the test suite in a Ubuntu 14.04 (Trusty) dockerized environment (to be removed April 30, 2019)
	BASE_OS=trusty ./bin/dev-shell ./bin/run-test -v $${TESTFILES:-tests}

.PHONY: translation-test
translation-test: ## Run all pages-layout tests in all supported languages
	./bin/dev-shell ./bin/translation-test $${TESTFILES:-tests/pageslayout}

.PHONY: dev
dev: ## Run the dev server
	 DOCKER_RUN_ARGUMENTS='-p127.0.0.1:8080:8080 -p127.0.0.1:8081:8081' ./bin/dev-shell ./bin/run
<commit_msg>dev: add makefile target for running test suite under python 3<commit_after>DEFAULT_GOAL: help
TAG ?= $(shell git rev-parse HEAD)
IMAGE = securedrop

.PHONY: lint
lint: ## Run the python linter with the project's default error settings
	find . -name '*.py' | xargs pylint --reports=no --errors-only \
	   --disable=import-error \
	   --disable=no-name-in-module \
	   --disable=unexpected-keyword-arg \
	   --disable=too-many-function-args \
	   --disable=import-error \
	   --max-line-length=100

.PHONY: lint-full
lint-full:  ## Run the python linter with nothing disabled
	find . -name '*.py' | xargs pylint

.PHONY: test
test: ## Run the test suite in a Ubuntu 16.04 (Xenial) dockerized environment
	./bin/dev-shell ./bin/run-test -v $${TESTFILES:-tests}

.PHONY: test-trusty
test-trusty: ## Run the test suite in a Ubuntu 14.04 (Trusty) dockerized environment (to be removed April 30, 2019)
	BASE_OS=trusty ./bin/dev-shell ./bin/run-test -v $${TESTFILES:-tests}

.PHONY: test-python3
test-python3: ## Run the Python 3 test suite in a Ubuntu 16.04 (Xenial) dockerized environment
	PYTHON_VERSION=3 BASE_OS=xenial ./bin/dev-shell ./bin/run-test -v $${TESTFILES:-tests}

.PHONY: translation-test
translation-test: ## Run all pages-layout tests in all supported languages
	./bin/dev-shell ./bin/translation-test $${TESTFILES:-tests/pageslayout}

.PHONY: dev
dev: ## Run the dev server
	 DOCKER_RUN_ARGUMENTS='-p127.0.0.1:8080:8080 -p127.0.0.1:8081:8081' ./bin/dev-shell ./bin/run

{'fraction_non_alphanumeric': 0.1447562776957164, 'fraction_numerical': 0.03655834564254062, 'mean_word_length': 3.5, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '1313927', 'n_tokens_mistral': 1069, 'n_tokens_neox': 948, 'n_words': 268}