<commit_before>.PHONY: help clean build lint isort test freeze-requirements docker-build docker-run

bin = .env/bin
python = $(bin)/python
pip = $(bin)/pip
tox = $(bin)/tox
pip-compile = $(bin)/pip-compile

help:
	@echo "clean - remove build artifacts and python artifacts"
	@echo ".env - make a virtual environment"
	@echo "lint - check style with flake8"
	@echo "isort - check import order with isort"
	@echo "freeze-requirements - freeze the requirements with pip-compile"
	@echo "test - run tox"
	@echo "docker-build - build a docker container"
	@echo "docker-run - run the built docker container in the foreground"


.env:
	python3 -m venv .env --clear
	$(pip) install --upgrade pip
	$(pip) install --upgrade wheel setuptools tox pip-tools

clean:
	rm -rf build/
	rm -rf dist/
	rm -rf *.egg-info
	find . -name '__pycache__' -type d -exec rm -rf {} +
	find . -name '*.pyc' -exec rm -f {} +
	find . -name '*.pyo' -exec rm -f {} +

build: .env clean
	$(python) setup.py bdist_wheel

lint: .env
	$(tox) -e lint

isort: .env
	$(tox) -e isort

test: .env
	$(tox)

freeze-requirements: .env
	$(pip-compile) requirements.in
	$(pip-compile) test_requirements.in

docker-build: build<commit_msg>Generate hashes<commit_after>.PHONY: help clean build lint isort test freeze-requirements docker-build docker-run

bin = .env/bin
python = $(bin)/python
pip = $(bin)/pip
tox = $(bin)/tox
pip-compile = $(bin)/pip-compile

help:
	@echo "clean - remove build artifacts and python artifacts"
	@echo ".env - make a virtual environment"
	@echo "lint - check style with flake8"
	@echo "isort - check import order with isort"
	@echo "freeze-requirements - freeze the requirements with pip-compile"
	@echo "test - run tox"
	@echo "docker-build - build a docker container"
	@echo "docker-run - run the built docker container in the foreground"


.env:
	python3 -m venv .env --clear
	$(pip) install --upgrade pip
	$(pip) install --upgrade wheel setuptools tox pip-tools

clean:
	rm -rf build/
	rm -rf dist/
	rm -rf *.egg-info
	find . -name '__pycache__' -type d -exec rm -rf {} +
	find . -name '*.pyc' -exec rm -f {} +
	find . -name '*.pyo' -exec rm -f {} +

build: .env clean
	$(python) setup.py bdist_wheel

lint: .env
	$(tox) -e lint

isort: .env
	$(tox) -e isort

test: .env
	$(tox)

freeze-requirements: .env
	$(pip-compile) --generate-hashes requirements.in
	$(pip-compile) --generate-hashes test_requirements.in

docker-build: build
{'fraction_non_alphanumeric': 0.14061207609594706, 'fraction_numerical': 0.0016542597187758478, 'mean_word_length': 3.319642857142857, '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': '6631808', 'n_tokens_mistral': 909, 'n_tokens_neox': 848, 'n_words': 300}