<commit_before>SHELL := /bin/bash
PACHYDERM_VERSION = $(shell jq -r .pachyderm version.json)

docs:
	rm -rf build dist
	python3 setup.py clean build install
	pdoc3 --html --html-dir docs python_pachyderm

docker-build-proto:
	cd proto && \
		docker build -t pachyderm_python_proto .

src/python_pachyderm/proto: docker-build-proto
	@echo "Building with pachyderm core v$(PACHYDERM_VERSION)"
	cd proto/pachyderm && \
		git fetch --all && \
		git checkout v$(PACHYDERM_VERSION)
	find ./proto/pachyderm/src/client -regex ".*\.proto" \
	| xargs tar cf - \
	| docker run -i pachyderm_python_proto \
	| tar xf -
	mv src/python_pachyderm/client src/python_pachyderm/proto
	find src/python_pachyderm/proto -type d -exec touch {}/__init__.py \;

init:
	git submodule update --init

ci-install:
	sudo apt-get install jq
	cd proto/pachyderm && \
		sudo ./etc/testing/travis_before_install.sh && \
		curl -o /tmp/pachctl.deb -L https://github.com/pachyderm/pachyderm/releases/download/v$(PACHYDERM_VERSION)/pachctl_$(PACHYDERM_VERSION)_amd64.deb  && \
		sudo dpkg -i /tmp/pachctl.deb
	pip install tox tox-travis

ci-setup:
	docker version
	which pachctl
	cd proto/pachyderm && make launch-kube
	pachctl deploy local
	until timeout 1s ./proto/pachyderm/etc/kube/check_ready.sh app=pachd; do sleep 1; done
	PACHD_ADDRESS=$$(minikube ip):30650 pachctl version

release:
	rm -rf build dist
	python setup.py sdist
	twine upload dist/*

.PHONY: docker-build-proto init ci-install ci-setup release<commit_msg>Added lint targets<commit_after>SHELL := /bin/bash
PACHYDERM_VERSION = $(shell jq -r .pachyderm version.json)

docs:
	rm -rf build dist
	python3 setup.py clean build install
	pdoc3 --html --html-dir docs python_pachyderm

docker-build-proto:
	cd proto && \
		docker build -t pachyderm_python_proto .

src/python_pachyderm/proto: docker-build-proto
	@echo "Building with pachyderm core v$(PACHYDERM_VERSION)"
	cd proto/pachyderm && \
		git fetch --all && \
		git checkout v$(PACHYDERM_VERSION)
	find ./proto/pachyderm/src/client -regex ".*\.proto" \
	| xargs tar cf - \
	| docker run -i pachyderm_python_proto \
	| tar xf -
	mv src/python_pachyderm/client src/python_pachyderm/proto
	find src/python_pachyderm/proto -type d -exec touch {}/__init__.py \;

init:
	git submodule update --init

ci-install:
	sudo apt-get install jq
	cd proto/pachyderm && \
		sudo ./etc/testing/travis_before_install.sh && \
		curl -o /tmp/pachctl.deb -L https://github.com/pachyderm/pachyderm/releases/download/v$(PACHYDERM_VERSION)/pachctl_$(PACHYDERM_VERSION)_amd64.deb  && \
		sudo dpkg -i /tmp/pachctl.deb
	pip install tox tox-travis

ci-setup:
	docker version
	which pachctl
	cd proto/pachyderm && make launch-kube
	pachctl deploy local
	until timeout 1s ./proto/pachyderm/etc/kube/check_ready.sh app=pachd; do sleep 1; done
	PACHD_ADDRESS=$$(minikube ip):30650 pachctl version

release:
	rm -rf build dist
	python setup.py sdist
	twine upload dist/*

lint:
	flake8 src/python_pachyderm --exclude=src/python_pachyderm/proto --max-line-length=120 --max-doc-length=79

proto-lint:
	PYTHONPATH=./src:$(PYTHONPATH) etc/proto_lint/proto_lint.py

.PHONY: docker-build-proto init ci-install ci-setup release lint proto-lint
{'fraction_non_alphanumeric': 0.11536050156739812, 'fraction_numerical': 0.00877742946708464, 'mean_word_length': 3.834848484848485, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '688889', 'n_tokens_mistral': 1332, 'n_tokens_neox': 1229, 'n_words': 288}