<commit_before>.DEFAULT_GOAL := initialize

COMPOSE_FILE=docker-compose.yml
ANSIBLE_INVENTORY=inventory
ANSIBLE_EXTRA_VARS=-e girder_host=girder -e girder_port=8989 -e celery_broker="amqp://guest:guest@rabbit/"

initialize:
	pip install -U -r requirements.txt
	ansible-galaxy install --force --roles-path ./scripts/roles girder.girder

run:
	if [ $(RUN_IN_CI) -eq 1 ]; then \
		docker-compose -f $(COMPOSE_FILE) up -d; \
	else \
		docker-compose -f $(COMPOSE_FILE) -f docker-compose.docker.yml up -d; \
	fi
	cd scripts/ && ansible-playbook -i $(ANSIBLE_INVENTORY) $(ANSIBLE_EXTRA_VARS) setup.yml


worker_restart:
	docker-compose -f $(COMPOSE_FILE) restart girder_worker


clean:
	docker-compose -f $(COMPOSE_FILE) stop
	docker-compose -f $(COMPOSE_FILE) rm -vf
	-docker rmi -f integration_girder_worker_data_volume

nuke: clean
	-docker rmi \
	  girder/girder:gw_integration_test \
	  girder/girder_worker:gw_integration_test

test:
	pytest -v -x -n4  -m 'not docker'


.PHONY: initialize dev clean nuke test init run<commit_msg>Enable docker tests on CI<commit_after>.DEFAULT_GOAL := initialize

COMPOSE_FILE=docker-compose.yml
ANSIBLE_INVENTORY=inventory
ANSIBLE_EXTRA_VARS=-e girder_host=girder -e girder_port=8989 -e celery_broker="amqp://guest:guest@rabbit/"

initialize:
	pip install -U -r requirements.txt
	ansible-galaxy install --force --roles-path ./scripts/roles girder.girder

run:
	if [ $(RUN_IN_CI) -eq 1 ]; then \
		docker-compose -f $(COMPOSE_FILE) up -d; \
	else \
		docker-compose -f $(COMPOSE_FILE) -f docker-compose.docker.yml up -d; \
	fi
	cd scripts/ && ansible-playbook -i $(ANSIBLE_INVENTORY) $(ANSIBLE_EXTRA_VARS) setup.yml


worker_restart:
	docker-compose -f $(COMPOSE_FILE) restart girder_worker


clean:
	docker-compose -f $(COMPOSE_FILE) stop
	docker-compose -f $(COMPOSE_FILE) rm -vf
	-docker rmi -f integration_girder_worker_data_volume

nuke: clean
	-docker rmi \
	  girder/girder:gw_integration_test \
	  girder/girder_worker:gw_integration_test

test:
	pytest -v -x -n4


.PHONY: initialize dev clean nuke test init run
{'fraction_non_alphanumeric': 0.11338199513381995, 'fraction_numerical': 0.00583941605839416, 'mean_word_length': 4.298969072164948, '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': '487824', 'n_tokens_mistral': 885, 'n_tokens_neox': 799, 'n_words': 182}