<commit_before>.PHONY: venv install test lint dist upload requirements clean flake8 isort

venv:
	virtualenv venv --python=python3.5
	. venv/bin/activate && pip install -U pip

install:
	pip install -r requirements/base.txt

test:
	tox

lint: flake8 isort
	bandit -r factory_djoy
	python setup.py check --metadata --restructuredtext --strict

flake8:
	flake8 factory_djoy
	flake8 tests

isort:
	isort -rc --diff factory_djoy > isort.out
	if [ "$$(wc -l isort.out)" != "0 isort.out" ]; then cat isort.out; exit 1; fi

dist:
	python setup.py sdist bdist_wheel

test-upload:
	twine upload --repository-url https://test.pypi.org/legacy/ dist/factory_djoy-*

# Need to manually install dependencies since they are not on test pypi
test-install:
	pip install Django factory-boy
	pip install factory-djoy -i https://test.pypi.org/simple

upload:
	twine upload dist/factory_djoy-*

requirements:
	$(MAKE) -C requirements

clean:
	python setup.py clean
	-rm -r build
	-rm -r dist
	-rm -r .tox
	find . -name '*.pyc' -delete<commit_msg>Clean up Makefile, add a recipe for install with python 2<commit_after>.PHONY: venv
venv:
	virtualenv venv --python=python3.5
	. venv/bin/activate && pip install -U pip

.PHONY: install
install:
	pip install -r requirements/base.txt

.PHONY: install2
install2:
	pip install -r requirements/base2.txt

.PHONY: test
test:
	tox

.PHONY: lint
lint: flake8 isort
	bandit -r factory_djoy
	python setup.py check --metadata --restructuredtext --strict

.PHONY: flake8
flake8:
	flake8 factory_djoy
	flake8 tests

.PHONY: isort
isort:
	isort -rc --diff factory_djoy > isort.out
	if [ "$$(wc -l isort.out)" != "0 isort.out" ]; then cat isort.out; exit 1; fi

.PHONY: dist
dist:
	python setup.py sdist bdist_wheel

.PHONY: test-upload
test-upload:
	twine upload --repository-url https://test.pypi.org/legacy/ dist/factory_djoy-*

# Need to manually install dependencies since they are not on test pypi
.PHONY: test-install
test-install:
	pip install Django factory-boy
	pip install factory-djoy -i https://test.pypi.org/simple

.PHONY: upload
upload:
	twine upload dist/factory_djoy-*

.PHONY: requirements
requirements:
	$(MAKE) -C requirements

.PHONY: clean
clean:
	python setup.py clean
	-rm -r build
	-rm -r dist
	-rm -r .tox
	find . -name '*.pyc' -delete
{'fraction_non_alphanumeric': 0.11042674879014518, 'fraction_numerical': 0.009678838539375276, 'mean_word_length': 3.5754527162977867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '385813', 'n_tokens_mistral': 873, 'n_tokens_neox': 846, 'n_words': 269}