<commit_before>NAME = smk_python_sdk
VERSION = $(shell python setup.py --version)
DST = dist/$(NAME)-$(VERSION)

all: seto.piqi.proto README

build/pb:
	mkdir -p build/pb
	(cd build/pb && \
		git clone git://git.corp.smarkets.com/smk_api_common.git && \
		cd smk_api_common && \
		./rebar get-deps)

eto.piqi: build/pb
	cp build/pb/smk_api_common/deps/eto_common/eto.piqi .

seto.piqi: build/pb
	cp build/pb/smk_api_common/seto.piqi .

eto.piqi.proto: eto.piqi
	piqi to-proto eto.piqi -o eto.piqi.proto

seto.piqi.proto: eto.piqi.proto seto.piqi
	piqi to-proto seto.piqi -o seto.piqi.proto

# seto/piqi_pb2.py: seto.piqi.proto
# 	mkdir -p smk/seto
# 	touch smk/seto/__init__.py
# 	protoc --python_out=. seto.piqi.proto

# eto/piqi_pb2.py: eto.piqi.proto
# 	mkdir -p smk/eto
# 	touch smk/eto/__init__.py
# 	protoc --python_out=. eto.piqi.proto

clean:
	rm -rf eto.piqi seto.piqi seto.piqi.proto eto.piqi.proto eto seto smk/*.pyc build

README: README.md
	pandoc -s README.md -w rst -o README

release:
	-find . -name "*.pyc" | xargs rm
	-find . -name "*.orig" | xargs rm
	-rm -rf smk/.cache
	-mkdir dist
	-rm -rf dist/$(NAME)-$(VERSION)
	-rm dist/$(NAME)-$(VERSION).tar.gz
	-rm dist/$(NAME)-$(VERSION).zip
	-mkdir dist/$(NAME)-$(VERSION)
	cp -r smk seto eto tests $(DST)
	cp setup.py README README.md MANIFEST CHANGELOG run_tests $(DST)
	cd dist && tar -czv -f $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
	cd dist && zip $(NAME)-$(VERSION).zip -r $(NAME)-$(VERSION)<commit_msg>Fix release target<commit_after>NAME = smk_python_sdk
VERSION = $(shell python setup.py --version)
DST = dist/$(NAME)-$(VERSION)

all: seto.piqi.proto README

build/pb:
	mkdir -p build/pb
	(cd build/pb && \
		git clone git://git.corp.smarkets.com/smk_api_common.git && \
		cd smk_api_common && \
		./rebar get-deps)

eto.piqi: build/pb
	cp build/pb/smk_api_common/deps/eto_common/eto.piqi .

seto.piqi: build/pb
	cp build/pb/smk_api_common/seto.piqi .

eto.piqi.proto: eto.piqi
	piqi to-proto eto.piqi -o eto.piqi.proto

seto.piqi.proto: eto.piqi.proto seto.piqi
	piqi to-proto seto.piqi -o seto.piqi.proto

# seto/piqi_pb2.py: seto.piqi.proto
# 	mkdir -p smk/seto
# 	touch smk/seto/__init__.py
# 	protoc --python_out=. seto.piqi.proto

# eto/piqi_pb2.py: eto.piqi.proto
# 	mkdir -p smk/eto
# 	touch smk/eto/__init__.py
# 	protoc --python_out=. eto.piqi.proto

clean:
	rm -rf eto.piqi seto.piqi seto.piqi.proto eto.piqi.proto eto seto smk/*.pyc build

README: README.md
	pandoc -s README.md -w rst -o README

release: all
	-find . -name "*.pyc" | xargs rm
	-find . -name "*.orig" | xargs rm
	-rm -rf smk/.cache
	-mkdir dist
	-rm -rf dist/$(NAME)-$(VERSION)
	-rm dist/$(NAME)-$(VERSION).tar.gz
	-rm dist/$(NAME)-$(VERSION).zip
	-mkdir dist/$(NAME)-$(VERSION)
	python setup.py build
	cp -r smk seto eto tests $(DST)
	cp setup.py README README.md MANIFEST.in CHANGELOG run_tests $(DST)
	cd dist && tar -czv -f $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
	cd dist && zip $(NAME)-$(VERSION).zip -r $(NAME)-$(VERSION)
{'fraction_non_alphanumeric': 0.17062562730010036, 'fraction_numerical': 0.0013382402141184342, 'mean_word_length': 3.211267605633803, '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': '1098311', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1337, 'n_words': 287}