<commit_before>CBD=cabal
STYLE=stylish-haskell

PROG_PREV = ./dist/build/snap-web/snap-web
PROD_PROD = .cabal-sandbox/bin/snap-web
PROG_NAME = ./snap-web

DIST=dist
SITE=_site

default: build

clean:
	cabal clean

hlint:
	$(STYLE) -i src/**/*.hs
	hlint src/ tests/ --report=$(DIST)/hlint.html

doc:
	cabal haddock --executable


###########################
## DEVELOPMENT
##
###########################

init:
	test -e cabal.sandbox.config || $(CBD) sandbox init
	cabal install -fthree transformers-compat
	cabal install scientific-0.3.2.1 -f -bytestring-builder
	$(CBD) install --only-dependencies --enable-tests --job=2

conf:
	$(CBD) --flags="development" configure

build: conf
	$(CBD) build

install: conf
	$(CBD) install

test:
	$(CBD) --flags="development" --enable-tests configure
	$(CBD) build
	$(CBD) test

p:
	$(PROG_PREV) -p 9900

cb: clean build

bp: build p

rp: clean build p

###########################<commit_msg>create default dirs<commit_after>CBD=cabal
STYLE=stylish-haskell

PROG_PREV = ./dist/build/snap-web/snap-web
PROD_PROD = .cabal-sandbox/bin/snap-web
PROG_NAME = ./snap-web

DIST=dist
SITE=_site

default: build

clean:
	cabal clean

hlint:
	$(STYLE) -i src/**/*.hs
	hlint src/ tests/ --report=$(DIST)/hlint.html

doc:
	cabal haddock --executable


###########################
## DEVELOPMENT
##
###########################

init:
	test -e cabal.sandbox.config || $(CBD) sandbox init
	cabal install -fthree transformers-compat
	cabal install scientific-0.3.2.1 -f -bytestring-builder
	mkdir data log
	$(CBD) install --only-dependencies --enable-tests --job=2

conf:
	$(CBD) --flags="development" configure

build: conf
	$(CBD) build

install: conf
	$(CBD) install

test:
	$(CBD) --flags="development" --enable-tests configure
	$(CBD) build
	$(CBD) test

p:
	$(PROG_PREV) -p 9900

cb: clean build

bp: build p

rp: clean build p

###########################
{'fraction_non_alphanumeric': 0.2229299363057325, 'fraction_numerical': 0.009554140127388535, 'mean_word_length': 4.10840108401084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2152184', 'n_tokens_mistral': 758, 'n_tokens_neox': 728, 'n_words': 173}