<commit_before>DB_ECHO = True
DB_REBUILD = True
PYTHON = python
PYTHONPATH = lib/python

shell:
	@env PYTHONPATH=$(PYTHONPATH) ipython

clean:
	@echo "running clean"
	@find . -name "*.pyc" -exec rm {} \;
	@find . -name "*.pyo" -exec rm {} \;
	@find . -name "*~" -exec rm {} \;

jobs: dev.make_jobs

tables:
	@echo "rebuilding tables"
	@env PYTHONPATH=$(PYTHONPATH) $(PYTHON) -c 'from pyfarm.db import tables; tables.init(rebuild=True)'

db: tables dev.make_jobs
	@echo "rebuilding database"

bin.%: SCRIPT=bin/pyf$(subst bin.,,$@)
bin.%:
	@echo "running $(SCRIPT)"
	@$(PYTHON) $(SCRIPT)

dev.%: SCRIPT=dev/bin/$(subst dev.,,$@).py
dev.%:
	@echo "running $(SCRIPT)"
	@env PYTHONPATH=$(PYTHONPATH) $(PYTHON) $(SCRIPT)

test.%: SCRIPT=tests/test_$(subst test.,,$@).py
test.%:
	@echo "running $(SCRIPT)"
	@env PYTHONPATH=$(PYTHONPATH) $(PYTHON) $(SCRIPT)

tests: test.preferences<commit_msg>removing echo<commit_after>DB_ECHO = True
DB_REBUILD = True
PYTHON = python
PYTHONPATH = lib/python

shell:
	@env PYTHONPATH=$(PYTHONPATH) ipython

clean:
	@find . -name "*.pyc" -exec rm {} \;
	@find . -name "*.pyo" -exec rm {} \;
	@find . -name "*~" -exec rm {} \;

jobs: dev.make_jobs

tables:
	@echo "rebuilding tables"
	@env PYTHONPATH=$(PYTHONPATH) $(PYTHON) -c 'from pyfarm.db import tables; tables.init(rebuild=True)'

db: tables dev.make_jobs
	@echo "rebuilding database"

bin.%: SCRIPT=bin/pyf$(subst bin.,,$@)
bin.%:
	@echo "running $(SCRIPT)"
	@$(PYTHON) $(SCRIPT)

dev.%: SCRIPT=dev/bin/$(subst dev.,,$@).py
dev.%:
	@echo "running $(SCRIPT)"
	@env PYTHONPATH=$(PYTHONPATH) $(PYTHON) $(SCRIPT)

test.%: SCRIPT=tests/test_$(subst test.,,$@).py
test.%:
	@echo "running $(SCRIPT)"
	@env PYTHONPATH=$(PYTHONPATH) $(PYTHON) $(SCRIPT)

tests: test.preferences
{'fraction_non_alphanumeric': 0.20616790405482582, 'fraction_numerical': 0.0, 'mean_word_length': 4.651612903225806, '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': '3148949', 'n_tokens_mistral': 785, 'n_tokens_neox': 740, 'n_words': 165}