<commit_before>NIX_PATH=~/.nix-defexpr/channels/
# add npm and node to PATH
export PATH := ../nix/env-3/bin:$(PATH)


all: nix-build test_pyvenv test_install frontend_install

nix-build:
	nix-channel --update; \
	NIX_PATH=${NIX_PATH} nix-build -A policycompass-env -A policycompass -A nodejs-env --out-link nix/env dev.nix;\

test_pyvenv:
	[ ! -f ./bin/python3.4 ] && ./nix/env-2/bin/pyvenv-3.4 . ;\
	echo ../../../nix/env-2/lib/python3.4/site-packages > lib/python3.4/site-packages/result-2.pth ;\

test_install:
	./bin/pip3.4 install --upgrade wheel ;\
	#./bin/pip3.4 install --download-cache ./cache/downloads -r requirements.txt ;\
	#./bin/pip3.4 wheel --wheel-dir=./cache/wheels -r requirements.txt ;\
	bin/pip3.4 install --no-index --find-links=./cache/wheels -r requirements.txt

frontend_install:
	cd policycompass-frontend/ ;\
	npm install ;\
	node_modules/bower/bin/bower install bower ;\
	cd ..

print-python-syspath:
	./bin/python -c 'import sys,pprint;pprint.pprint(sys.path)'

.PHONY: print-python-syspath test_install test_pyvenv frontend_install nix-build all<commit_msg>Fix bower install in makefile<commit_after>NIX_PATH=~/.nix-defexpr/channels/
# add npm and node to PATH
export PATH := ../nix/env-3/bin:$(PATH)


all: nix-build test_pyvenv test_install frontend_install

nix-build:
	nix-channel --update; \
	NIX_PATH=${NIX_PATH} nix-build -A policycompass-env -A policycompass -A nodejs-env --out-link nix/env dev.nix;\

test_pyvenv:
	[ ! -f ./bin/python3.4 ] && ./nix/env-2/bin/pyvenv-3.4 . ;\
	echo ../../../nix/env-2/lib/python3.4/site-packages > lib/python3.4/site-packages/result-2.pth ;\

test_install:
	./bin/pip3.4 install --upgrade wheel ;\
	#./bin/pip3.4 install --download-cache ./cache/downloads -r requirements.txt ;\
	#./bin/pip3.4 wheel --wheel-dir=./cache/wheels -r requirements.txt ;\
	bin/pip3.4 install --no-index --find-links=./cache/wheels -r requirements.txt

frontend_install:
	cd policycompass-frontend/ ;\
	npm install ;\
	node_modules/.bin/bower install ;\
	cd ..

print-python-syspath:
	./bin/python -c 'import sys,pprint;pprint.pprint(sys.path)'

.PHONY: print-python-syspath test_install test_pyvenv frontend_install nix-build all
{'fraction_non_alphanumeric': 0.16980266177145478, 'fraction_numerical': 0.018357044515832952, 'mean_word_length': 3.2745098039215685, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6279907', 'n_tokens_mistral': 890, 'n_tokens_neox': 855, 'n_words': 160}