<commit_before>
DRIVER_BUILD_DIR=_driver

.PHONY: all clean build install uninstall setup default

default: build

all: build

# This should be called something else.
setup:
	opam install kaputt
	opam install bisect

oml.cmxa:
	ocamlbuild -I src/lib oml.cmo oml.cmx oml.cma oml.cmxa oml.cmxs

build: oml.cmxa

joiner.native:
	ocamlbuild -build-dir $(DRIVER_BUILD_DIR) -I tools joiner.native

driver.test: joiner.native
	ocamlbuild -build-dir $(DRIVER_BUILD_DIR) -use-ocamlfind -package kaputt -I src/lib -I src/test driver.test

test: driver.test
	./driver.test

clean:
	ocamlbuild -clean
	ocamlbuild -build-dir $(DRIVER_BUILD_DIR) -clean
	rm -rf driver.test

install:
	ocamlfind install oml META \
		_build/src/lib/oml.a \
		_build/src/lib/oml.o \
		_build/src/lib/oml.cma \
		_build/src/lib/oml.cmxa \
		_build/src/lib/oml.cmxs \
		_build/src/lib/*.cmi \
		_build/src/lib/*.cmo \
		_build/src/lib/*.cmx

uninstall:
	ocamlfind remove oml

report_dir:
	mkdir report_dir

report: report_dir
	bisect-report -I $(DRIVER_BUILD_DIR) -html report_dir $(shell ls -t bisect*.out | head -1)

clean_reports:
	rm -rf report_dir bisect*.out<commit_msg>Fix the off by one alignment of HTML reports bug.<commit_after>
DRIVER_BUILD_DIR=_driver

.PHONY: all clean build install uninstall setup default

default: build

all: build

# This should be called something else.
setup:
	opam install kaputt
	opam install bisect

oml.cmxa:
	ocamlbuild -I src/lib oml.cmo oml.cmx oml.cma oml.cmxa oml.cmxs

build: oml.cmxa

joiner.native:
	ocamlbuild -build-dir $(DRIVER_BUILD_DIR) -I tools joiner.native

driver.test: joiner.native
	ocamlbuild -build-dir $(DRIVER_BUILD_DIR) -use-ocamlfind -package kaputt -I src/lib -I src/test driver.test

test: driver.test
	./driver.test

clean:
	ocamlbuild -clean
	ocamlbuild -build-dir $(DRIVER_BUILD_DIR) -clean
	rm -rf driver.test

install:
	ocamlfind install oml META \
		_build/src/lib/oml.a \
		_build/src/lib/oml.o \
		_build/src/lib/oml.cma \
		_build/src/lib/oml.cmxa \
		_build/src/lib/oml.cmxs \
		_build/src/lib/*.cmi \
		_build/src/lib/*.cmo \
		_build/src/lib/*.cmx

uninstall:
	ocamlfind remove oml

report_dir:
	mkdir report_dir

# By running bisect-report in the actual directory with the modified source path
# (ie. the *.ml has the *.mlt inside of it with our label), we get proper
# alignment of the html!
report: report_dir
	cd $(DRIVER_BUILD_DIR) && \
	bisect-report -html ../report_dir ../$(shell ls -t bisect*.out | head -1) && \
	cd -

clean_reports:
	rm -rf report_dir bisect*.out
{'fraction_non_alphanumeric': 0.11115522032552601, 'fraction_numerical': 0.0007939658594680428, 'mean_word_length': 3.476021314387211, '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': '577794', 'n_tokens_mistral': 1024, 'n_tokens_neox': 997, 'n_words': 258}