<commit_before>SHELL := /bin/sh

PROJECT := django_budget

LOCALPATH := $(CURDIR)/django-budget
PYTHONPATH := $(LOCALPATH)/
SETTINGS := production
DJANGO_SETTINGS_MODULE = $(PROJECT).settings.$(SETTINGS)
DJANGO_POSTFIX := --settings=$(DJANGO_SETTINGS_MODULE) --pythonpath=.$(PYTHONPATH)
LOCAL_SETTINGS := local
DJANGO_LOCAL_SETTINGS_MODULE = $(PROJECT).settings.$(LOCAL_SETTINGS)
DJANGO_LOCAL_POSTFIX := --settings=$(DJANGO_LOCAL_SETTINGS_MODULE) --pythonpath=$(PYTHONPATH)
TEST_SETTINGS := test
DJANGO_TEST_SETTINGS_MODULE = $(PROJECT).settings.$(TEST_SETTINGS)
DJANGO_POSTFIX := --settings=$(DJANGO_SETTINGS_MODULE) --pythonpath=$(PYTHONPATH)
DJANGO_TEST_POSTFIX := --settings=$(DJANGO_TEST_SETTINGS_MODULE) --pythonpath=$(PYTHONPATH)
PYTHON_BIN := $(VIRTUAL_ENV)/bin

.PHONY: clean showenv coverage test pip

showenv:
	@echo 'Environment:'
	@echo '-----------------------'
	@$(PYTHON_BIN)/python -c "import sys; print 'sys.path:', sys.path"
	@echo 'PYTHONPATH:' $(PYTHONPATH)
	@echo 'PROJECT:' $(PROJECT)
	@echo 'DJANGO_SETTINGS_MODULE:' $(DJANGO_SETTINGS_MODULE)
	@echo 'DJANGO_LOCAL_SETTINGS_MODULE:' $(DJANGO_LOCAL_SETTINGS_MODULE)
	@echo 'DJANGO_TEST_SETTINGS_MODULE:' $(DJANGO_TEST_SETTINGS_MODULE)

collectstatic:
	-mkdir -p .$(LOCALPATH)/assets/
	$(PYTHON_BIN)/django-admin.py collectstatic -c --noinput $(DJANGO_POSTFIX)

runserver:
	$(PYTHON_BIN)/django-admin.py runserver $(DJANGO_POSTFIX)

localrunserver:
	$(PYTHON_BIN)/django-admin.py runserver $(DJANGO_LOCAL_POSTFIX)

syncdb:
	$(PYTHON_BIN)/django-admin.py syncdb $(DJANGO_POSTFIX)

localsyncdb:
	$(PYTHON_BIN)/django-admin.py syncdb $(DJANGO_LOCAL_POSTFIX)

cmd:
	$(PYTHON_BIN)/django-admin.py $(CMD) $(DJANGO_POSTFIX)

shell:
	$(PYTHON_BIN)/django-admin.py shell_plus $(DJANGO_LOCAL_POSTFIX)

clean:
	find . -name "*.pyc" -print0 | xargs -0 rm -rf
	-rm -rf htmlcov
	-rm -rf .coverage
	-rm -rf build
	-rm -rf dist
	-rm -rf src/*.egg-info
	-rm -rf *.orig

test: clean
	$(PYTHON_BIN)/coverage run --source=$(LOCALPATH) --omit="*/admin.py,*/tests_*,*/functional_*,*/django_budget/*,*/manage.py" $(PYTHON_BIN)/django-admin.py test $(APP) $(DJANGO_TEST_POSTFIX)

test.functional: clean
	$(PYTHON_BIN)/django-admin.py test --pattern="functional_*.py" $(APP) $(DJANGO_TEST_POSTFIX)

test.all: test test.functional

report:
	$(PYTHON_BIN)/coverage report -m

pip: requirements/$(SETTINGS).txt
	pip install -r requirements/$(SETTINGS).txt

localpip: requirements/$(LOCAL_SETTINGS).txt
	pip install -r requirements/$(LOCAL_SETTINGS).txt<commit_msg>change makefile options and parameters<commit_after>SHELL := /bin/sh

PROJECT := django_budget

LOCALPATH := $(CURDIR)/django-budget
PYTHONPATH := $(LOCALPATH)/
SETTINGS := production
DJANGO_SETTINGS_MODULE = $(PROJECT).settings.$(SETTINGS)
DJANGO_POSTFIX := --settings=$(DJANGO_SETTINGS_MODULE) --pythonpath=.$(PYTHONPATH)
LOCAL_SETTINGS := local
DJANGO_LOCAL_SETTINGS_MODULE = $(PROJECT).settings.$(LOCAL_SETTINGS)
DJANGO_LOCAL_POSTFIX := --settings=$(DJANGO_LOCAL_SETTINGS_MODULE) --pythonpath=$(PYTHONPATH)
TEST_SETTINGS := test
DJANGO_TEST_SETTINGS_MODULE = $(PROJECT).settings.$(TEST_SETTINGS)
DJANGO_POSTFIX := --settings=$(DJANGO_SETTINGS_MODULE) --pythonpath=$(PYTHONPATH)
DJANGO_TEST_POSTFIX := --settings=$(DJANGO_TEST_SETTINGS_MODULE) --pythonpath=$(PYTHONPATH)
PYTHON_BIN := $(VIRTUAL_ENV)/bin
TEST_VERBOSITY := 1

.PHONY: collectstatic run localrun syncdb localsyncdb cmd shell clean test test.functional test.all report install

showenv:
	@echo 'Environment:'
	@echo '-----------------------'
	@$(PYTHON_BIN)/python -c "import sys; print 'sys.path:', sys.path"
	@echo 'PYTHONPATH:' $(PYTHONPATH)
	@echo 'PROJECT:' $(PROJECT)
	@echo 'DJANGO_SETTINGS_MODULE:' $(DJANGO_SETTINGS_MODULE)
	@echo 'DJANGO_LOCAL_SETTINGS_MODULE:' $(DJANGO_LOCAL_SETTINGS_MODULE)
	@echo 'DJANGO_TEST_SETTINGS_MODULE:' $(DJANGO_TEST_SETTINGS_MODULE)

collectstatic:
	-mkdir -p .$(LOCALPATH)/assets/
	$(PYTHON_BIN)/django-admin.py collectstatic -c --noinput $(DJANGO_POSTFIX)

runserver:
	$(PYTHON_BIN)/django-admin.py runserver $(DJANGO_POSTFIX)

localrunserver:
	$(PYTHON_BIN)/django-admin.py runserver $(DJANGO_LOCAL_POSTFIX)

syncdb:
	$(PYTHON_BIN)/django-admin.py syncdb $(DJANGO_POSTFIX)

localsyncdb:
	$(PYTHON_BIN)/django-admin.py syncdb $(DJANGO_LOCAL_POSTFIX)

cmd:
	$(PYTHON_BIN)/django-admin.py $(CMD) $(DJANGO_POSTFIX)

shell:
	$(PYTHON_BIN)/django-admin.py shell_plus $(DJANGO_LOCAL_POSTFIX)

clean:
	find . -name "*.pyc" -print0 | xargs -0 rm -rf
	-rm -rf htmlcov
	-rm -rf .coverage
	-rm -rf build
	-rm -rf dist
	-rm -rf src/*.egg-info
	-rm -rf *.orig

test: clean
	$(PYTHON_BIN)/coverage run --source=$(LOCALPATH) --omit="*/admin.py,*/tests_*,*/functional_*,*/django_budget/*,*/manage.py" $(PYTHON_BIN)/django-admin.py test --verbosity=$(TEST_VERBOSITY) $(APP) $(DJANGO_TEST_POSTFIX)

test.functional: clean
	$(PYTHON_BIN)/django-admin.py test --verbosity=$(TEST_VERBOSITY) --pattern="functional_*.py" $(APP) $(DJANGO_TEST_POSTFIX)

test.all: test test.functional

report:
	$(PYTHON_BIN)/coverage report -m

install: requirements/$(SETTINGS).txt
	pip install -r requirements/$(SETTINGS).txt
{'fraction_non_alphanumeric': 0.16428151342873945, 'fraction_numerical': 0.0009801999607920015, 'mean_word_length': 5.775564409030545, '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': '2569995', 'n_tokens_mistral': 2005, 'n_tokens_neox': 1977, 'n_words': 333}