<commit_before>SHELL := /bin/bash

all: build db run

run: build
	docker-compose up

build: .built .bundled

.built: Dockerfile.development
	docker-compose build
	touch .built

.bundled: Gemfile Gemfile.lock
	docker-compose run web bundle
	touch .bundled

stop:
	docker-compose stop

restart: build
	docker-compose restart web

mac-open:
	$(shell \
				IP=`docker-machine ip default` ;\
				PORT=`docker-compose port web 3000 | cut -d: -f2` ;\
				if [ "$$PORT" == "" ] ;\
				then echo "@echo 'App NOT running. Check the logs'" ;\
				else echo "open http://$${IP}:$${PORT}" ;\
				fi)



clean: stop
	rm -f tmp/pids/*
	docker-compose rm -f -v bundle_cache
	rm -f .bundled
	docker-compose rm -f
	rm -f .built

test: build db
	docker-compose run web rails test

ptest: build
	docker-compose run -e RAILS_ENV=test web parallel_test -e "bin/rails db:environment:set RAILS_ENV=test"	
	docker-compose run web rake parallel:prepare
	docker-compose run web rake parallel:test

logs:
	docker-compose logs

db: build
	docker-compose run web rake db:create db:migrate

production-build: Dockerfile.production
	docker build  -f Dockerfile.production  -t egob/interoperabilidad  .
<commit_msg>Modify Makefile to create databases for parallel testing<commit_after>SHELL := /bin/bash

all: build db run

run: build
	docker-compose up

build: .built .bundled

.built: Dockerfile.development
	docker-compose build
	touch .built

.bundled: Gemfile Gemfile.lock
	docker-compose run web bundle
	touch .bundled

stop:
	docker-compose stop

restart: build
	docker-compose restart web

mac-open:
	$(shell \
				IP=`docker-machine ip default` ;\
				PORT=`docker-compose port web 3000 | cut -d: -f2` ;\
				if [ "$$PORT" == "" ] ;\
				then echo "@echo 'App NOT running. Check the logs'" ;\
				else echo "open http://$${IP}:$${PORT}" ;\
				fi)



clean: stop
	rm -f tmp/pids/*
	docker-compose rm -f -v bundle_cache
	rm -f .bundled
	docker-compose rm -f
	rm -f .built

test: build db
	docker-compose run web rails test

ptest: build
	docker-compose run -e RAILS_ENV=test web parallel_test -e "rake db:create"
	docker-compose run -e RAILS_ENV=test web parallel_test -e "bin/rails db:environment:set RAILS_ENV=test"	
	docker-compose run web rake parallel:prepare
	docker-compose run web rake parallel:test

logs:
	docker-compose logs

db: build
	docker-compose run web rake db:create db:migrate

production-build: Dockerfile.production
	docker build  -f Dockerfile.production  -t egob/interoperabilidad  .

{'fraction_non_alphanumeric': 0.10753121224325413, 'fraction_numerical': 0.004027386226339106, 'mean_word_length': 3.491862567811935, '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': '2686691', 'n_tokens_mistral': 982, 'n_tokens_neox': 883, 'n_words': 280}