<commit_before>PROJECT = eavro

REBAR = $(shell which rebar 2>/dev/null || echo $(PWD)/rebar)
DIALYZER = dialyzer
APACHE_DOWNLOAD_SITE = http://apache-mirror.rbc.ru/pub/apache/avro/avro-1.7.7/java

.PHONY: test deps

compile:
	@$(REBAR) compile

deps:
	@$(REBAR) get-deps

clean:
	@$(REBAR) clean

test:
	@$(REBAR) xref eunit skip_deps=true

run: compile
	./start

avro_tools:
	mkdir avro_tools
	(cd avro_tools && wget $(APACHE_DOWNLOAD_SITE)/avro-tools-1.7.7.jar && wget $(APACHE_DOWNLOAD_SITE)/avro-1.7.7.jar)
generate_avro_data: avro_tools
	 java -jar avro_tools/avro-tools-1.7.7.jar fromjson test/data/transformers.json --schema-file test/data/transformer.avsc > test/data/transformers.avro

generate_avro_data_deflate: avro_tools
	 java -jar avro_tools/avro-tools-1.7.7.jar fromjson test/data/transformers.json --codec deflate --schema-file test/data/transformer.avsc > test/data/transformers-deflated.avro

build-plt:
	@$(DIALYZER) --build_plt --output_plt $(PROJECT).plt \
        --apps erts kernel stdlib compiler crypto

dialyze:
	@$(DIALYZER) --src src --plt $(PROJECT).plt \
        -Werror_handling -Wrace_conditions -Wunmatched_returns
<commit_msg>Check presense of avro_tools before mkdir<commit_after>PROJECT = eavro

REBAR = $(shell which rebar 2>/dev/null || echo $(PWD)/rebar)
DIALYZER = dialyzer
APACHE_DOWNLOAD_SITE = http://apache-mirror.rbc.ru/pub/apache/avro/avro-1.7.7/java

.PHONY: test deps avro_tools

compile:
	@$(REBAR) compile

deps:
	@$(REBAR) get-deps

clean:
	@$(REBAR) clean

test:
	@$(REBAR) xref eunit skip_deps=true

run: compile
	./start

avro_tools:
	@[ -d avro_tools ] || mkdir avro_tools
	(cd avro_tools && wget $(APACHE_DOWNLOAD_SITE)/avro-tools-1.7.7.jar && wget $(APACHE_DOWNLOAD_SITE)/avro-1.7.7.jar)
generate_avro_data: avro_tools
	java -jar avro_tools/avro-tools-1.7.7.jar fromjson test/data/transformers.json --schema-file test/data/transformer.avsc > test/data/transformers.avro

generate_avro_data_deflate: avro_tools
	 java -jar avro_tools/avro-tools-1.7.7.jar fromjson test/data/transformers.json --codec deflate --schema-file test/data/transformer.avsc > test/data/transformers-deflated.avro

build-plt:
	@$(DIALYZER) --build_plt --output_plt $(PROJECT).plt \
        --apps erts kernel stdlib compiler crypto

dialyze:
	@$(DIALYZER) --src src --plt $(PROJECT).plt \
        -Werror_handling -Wrace_conditions -Wunmatched_returns

{'fraction_non_alphanumeric': 0.13926174496644295, 'fraction_numerical': 0.013422818791946308, 'mean_word_length': 4.162337662337662, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '839565', 'n_tokens_mistral': 999, 'n_tokens_neox': 974, 'n_words': 176}