<commit_before>builder = builder
tester  = tester

docker = docker run \
	        --tty \
	        --rm \
		--env BINARY=/opt/signature-validator/$(exec) \
		--volume "$(shell pwd)/src:/opt/signature-validator/src:ro" \
		--volume "$(shell pwd)/dist:/opt/signature-validator/dist:rw" \
		--volume "$(shell pwd)/features:/features:ro"

exec = dist/build/bioboxes-signature-parser/bioboxes-signature-parser

ssh:
	$(docker) --interactive $(builder) /bin/bash

feature: $(exec)
	$(docker) $(tester) cucumber /features

test:
	$(docker) $(builder) doctest $(shell find src -type f)

build: $(exec)

$(exec): $(shell find src -type f) bioboxes-signature-parser.cabal
	$(docker) $(builder) cabal build

bootstrap: .image-builder .image-tester

.image-%: images/%/Dockerfile bioboxes-signature-parser.cabal
	cp bioboxes-signature-parser.cabal $(dir $<)
	docker build --tag $* $(dir $<)
	touch $@

.PHONY: test feature bootstrap build<commit_msg>Add makefile target for testing parsing<commit_after>builder = builder
tester  = tester

docker = docker run \
	        --tty \
	        --rm \
		--env BINARY=/opt/signature-validator/$(exec) \
		--volume "$(shell pwd)/src:/opt/signature-validator/src:ro" \
		--volume "$(shell pwd)/dist:/opt/signature-validator/dist:rw" \
		--volume "$(shell pwd)/features:/features:ro"

exec = dist/build/bioboxes-signature-parser/bioboxes-signature-parser


try: $(exec)
	$(docker) --interactive $(builder) \
		$(exec) --signature="$(SIG)" --schema=input

ssh: $(exec)
	$(docker) --interactive $(builder) /bin/bash

feature: $(exec)
	$(docker) $(tester) cucumber /features

test:
	$(docker) $(builder) doctest $(shell find src -type f)

build: $(exec)

$(exec): $(shell find src -type f) bioboxes-signature-parser.cabal
	$(docker) $(builder) cabal build

bootstrap: .image-builder .image-tester

.image-%: images/%/Dockerfile bioboxes-signature-parser.cabal
	cp bioboxes-signature-parser.cabal $(dir $<)
	docker build --tag $* $(dir $<)
	touch $@

.PHONY: test feature bootstrap build
{'fraction_non_alphanumeric': 0.17720258835241415, 'fraction_numerical': 0.0, 'mean_word_length': 3.7183098591549295, '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': '1603802', 'n_tokens_mistral': 752, 'n_tokens_neox': 684, 'n_words': 161}