<commit_before>.PHONY: all build deploy install list migrate push start test up


all: list

build:
	docker build -t okibot/collectors .

deploy:
	$${CI?"Deploy is avaiable only on CI/CD server"}
	docker-cloud stack stop --sync collectors
	make migrate
	# docker-cloud stack start --sync collectors

install:
	pip install --upgrade -r requirements.dev.txt

list:
	@grep '^\.PHONY' Makefile | cut -d' ' -f2- | tr ' ' '\n'

migrate:
	alembic upgrade head

push:
	$${CI?"Push is avaiable only on CI/CD server"}
	docker login -e $$DOCKER_EMAIL -u $$DOCKER_USER -p $$DOCKER_PASS
	docker push okibot/collectors
	docker-cloud stack inspect collectors || docker-cloud stack create --sync -n collectors
	docker-cloud stack update --sync collectors

start:
	python -m collectors.base.cli $(filter-out $@,$(MAKECMDGOALS))

test:
	pylama collectors<commit_msg>fixed travis<commit_after>.PHONY: all build deploy install list migrate push start test up


all: list

build:
	docker build -t okibot/collectors .

deploy:
	$${CI?"Deploy is avaiable only on CI/CD server"}
	docker-cloud stack stop --sync collectors || echo 'not running'
	make migrate
	# docker-cloud stack start --sync collectors

install:
	pip install --upgrade -r requirements.dev.txt

list:
	@grep '^\.PHONY' Makefile | cut -d' ' -f2- | tr ' ' '\n'

migrate:
	alembic upgrade head

push:
	$${CI?"Push is avaiable only on CI/CD server"}
	docker login -e $$DOCKER_EMAIL -u $$DOCKER_USER -p $$DOCKER_PASS
	docker push okibot/collectors
	docker-cloud stack inspect collectors || docker-cloud stack create --sync -n collectors
	docker-cloud stack update --sync collectors

start:
	python -m collectors.base.cli $(filter-out $@,$(MAKECMDGOALS))

test:
	pylama collectors
{'fraction_non_alphanumeric': 0.11415259172976121, 'fraction_numerical': 0.0011648223645894002, 'mean_word_length': 3.9367816091954024, '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': '577709', 'n_tokens_mistral': 625, 'n_tokens_neox': 578, 'n_words': 203}