<commit_before>PYTHON=pyenv/bin/python
PIP=pyenv/bin/pip
MANAGE=pyenv/bin/python manage.py

web: $(PYTHON) static/bower_components
	$(MANAGE) runserver

$(PYTHON):
	virtualenv pyenv
	$(PIP) install --upgrade pip
	$(PIP) install -r requirements.txt

static/bower_components:
	cd static
	bower install

clean:
	rm -rf pyenv
	find ./ -iname '*.pyc' -exec rm -rf '{}' \;
	rm -rf static/bower_components

testdata:
	./manage.py loaddata id/fixtures/* 
	./manage.py loaddata data/fixtures/*
	(cd data/importers/ID1_Import && python UserProfiles_to_DjangoUsers.py ../../exporters/raw/UserProfile.csv)
	(cd data/importers/ID1_Import && python Tickets_to_ID2Tickets.py ../../exporters/raw/Ticket.csv)

<commit_msg>use sandboxed python for testdata import<commit_after>PYTHON=`pwd`/pyenv/bin/python
PIP=`pwd`/pyenv/bin/pip
MANAGE=`pwd`/pyenv/bin/python manage.py


web: $(PYTHON) static/bower_components
	$(MANAGE) runserver

$(PYTHON):
	virtualenv pyenv
	$(PIP) install --upgrade pip
	$(PIP) install -r requirements.txt

static/bower_components:
	cd static
	bower install

clean:
	rm -rf pyenv
	find ./ -iname '*.pyc' -exec rm -rf '{}' \;
	rm -rf static/bower_components

testdata:
	$(MANAGE) loaddata id/fixtures/* 
	$(MANAGE) loaddata data/fixtures/*
	(cd data/importers/ID1_Import && $(PYTHON) UserProfiles_to_DjangoUsers.py ../../exporters/raw/UserProfile.csv)
	(cd data/importers/ID1_Import && $(PYTHON) Tickets_to_ID2Tickets.py ../../exporters/raw/Ticket.csv)


{'fraction_non_alphanumeric': 0.14883401920438957, 'fraction_numerical': 0.00411522633744856, 'mean_word_length': 4.248201438848921, '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': '1228388', 'n_tokens_mistral': 591, 'n_tokens_neox': 565, 'n_words': 115}