<commit_before>javac := javac
java := java
python := python -B
j2py = ../bin/j2py


python_files := $(addsuffix .py, $(notdir $(basename $(wildcard *.java))))
test_targets := $(sort $(notdir $(basename $(wildcard *.java))))


.PHONY: all clean
.SILENT: %:


all:
	$(MAKE) $(test_targets)

selectors:
	@cd selector && make


clean:
	@rm -f *.class *.pyc $(python_files)


packages:
	@cd Package0 && javac Class0.java
	@cd Package0 && ../$(j2py) Class0.java Class0.py


parsers:
	@cd ../java2python/lang && make -s


%.class:
	[ -s $(addsuffix .java, $(basename $@)) ] && $(javac) $(addsuffix .java, $(basename $@))


%.py: %.class
	@$(j2py) $(addsuffix .java, $(basename $@)) $@ -c configs/defaults.py -d configs

%: %.py
	@bash -c "diff -q <($(python) $(addsuffix .py, $@)) <(java -ea $@)" && echo "[PASS] $@"
<commit_msg>Uses config module instead of file.<commit_after>javac := javac
java := java
python := python -B
j2py = ../bin/j2py


python_files := $(addsuffix .py, $(notdir $(basename $(wildcard *.java))))
test_targets := $(sort $(notdir $(basename $(wildcard *.java))))

export PYTHONPATH := $(PYTHONPATH):.


.PHONY: all clean
.SILENT: %:


all:
	$(MAKE) $(test_targets)


selectors:
	@cd selector && make


clean:
	@rm -f *.class *.pyc $(python_files)


packages:
	@cd Package0 && javac Class0.java
	@cd Package0 && ../$(j2py) Class0.java Class0.py


parsers:
	@cd ../java2python/lang && make -s


%.class:
	[ -s $(addsuffix .java, $(basename $@)) ] && $(javac) $(addsuffix .java, $(basename $@))


%.py: %.class
	@$(j2py) $(addsuffix .java, $(basename $@)) $@ -c configs.defaults -d configs

%: %.py
	@bash -c "diff -q <($(python) $(addsuffix .py, $@)) <(java -ea $@)" && echo "[PASS] $@"

{'fraction_non_alphanumeric': 0.2309048178613396, 'fraction_numerical': 0.011750881316098707, 'mean_word_length': 3.6914600550964187, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2429977', 'n_tokens_mistral': 728, 'n_tokens_neox': 666, 'n_words': 178}