<commit_before>DOCKER_TAG ?= rox_server-dev-$(USER)

build:
	git rev-parse HEAD > version
	docker build -t $(DOCKER_TAG) .

clean:
	rm -rf virtualenv_run/
	find . | grep "__pycache__" | xargs rm -rf

dev-venv: requirements.txt requirements-dev.txt
	virtualenv --python python3.4 virtualenv_run
	virtualenv_run/bin/pip install --requirement=requirements-dev.txt

itest: build
	docker run -i -t $(DOCKER_TAG) tox

run-docker: build
	docker run -p 0.0.0.0:5000:5000 -i -t $(DOCKER_TAG) 

run-local:
	python server/by

run-docker-interactive: build 
	docker run -p 0.0.0.0:5000:5000 -v $(PWD)/rox_server:/code/rox_server:rw -v $(PWD)/tests:/code/tests:rw -i -t $(DOCKER_TAG) /bin/bash

test:
	tox

test-debug:
	python -m pytest -v tests/<commit_msg>added makefile take for running tox in docker<commit_after>DOCKER_TAG ?= rox_server-dev-$(USER)

build:
	git rev-parse HEAD > version
	docker build -t $(DOCKER_TAG) .

clean:
	rm -rf virtualenv_run/
	find . | grep "__pycache__" | xargs rm -rf

dev-venv: requirements.txt requirements-dev.txt
	virtualenv --python python3.4 virtualenv_run
	virtualenv_run/bin/pip install --requirement=requirements-dev.txt

run-docker: build
	docker run -p 0.0.0.0:5000:5000 -i -t $(DOCKER_TAG) 

run-local:
	python -m rox_server.server

run-docker-interactive: build 
	docker run -p 0.0.0.0:5000:5000 -v $(PWD)/rox_server:/code/rox_server:rw -v $(PWD)/tests:/code/tests:rw -i -t $(DOCKER_TAG) /bin/bash

test:
	tox

test-in-docker: build
	docker run -i -t $(DOCKER_TAG) tox

test-debug:
	python -m pytest -v tests/
{'fraction_non_alphanumeric': 0.13683527885862518, 'fraction_numerical': 0.03372243839169909, 'mean_word_length': 3.7623456790123457, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '991675', 'n_tokens_mistral': 680, 'n_tokens_neox': 616, 'n_words': 153}