<commit_before>URL=http://127.0.0.1:5000

.DEFAULT: test

.PHONY: precommit
precommit: pep8 test

.PHONY: pep8
pep8:
	pep8 --max-line-length=80 ledger.py ledger_test.py

.PHONY: test
test:
	python ledger_test.py

.PHONY: setup
setup:
	ln -sf ../../precommit ./.git/hooks/pre-commit

.PHONY: seed
seed:
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Cash","code":"101","type":"asset"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Equipment","code":"102","type":"asset"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Bank Loan","code":"201","type":"liability"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Share Capital","code":"301","type":"equity"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"date":"2016-09-01","description":"Record the initial investment","items":[{"account_code":"101","amount":100000},{"account_code":"301","amount":-100000}]}' "${URL}/transactions"
	curl -H "Content-Type: application/json" -X POST -d '{"date":"2016-09-03","description":"Buy a computer","items":[{"account_code":"101","amount":-50000},{"account_code":"102","amount":200000},{"account_code":"201","amount":-150000}]}' "${URL}/transactions"<commit_msg>Add revenues and expenses to seed data<commit_after>URL=http://127.0.0.1:5000

.DEFAULT: test

.PHONY: precommit
precommit: pep8 test

.PHONY: pep8
pep8:
	pep8 --max-line-length=80 ledger.py ledger_test.py

.PHONY: test
test:
	python ledger_test.py

.PHONY: setup
setup:
	ln -sf ../../precommit ./.git/hooks/pre-commit

.PHONY: seed
seed:
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Cash","code":"101","type":"asset"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Equipment","code":"102","type":"asset"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Bank Loan","code":"201","type":"liability"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Share Capital","code":"301","type":"equity"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Consulting Revenue","code":"401","type":"revenue"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"name":"Business Travel","code":"501","type":"expense"}' "${URL}/accounts"
	curl -H "Content-Type: application/json" -X POST -d '{"date":"2016-09-01","description":"Record the initial investment","items":[{"account_code":"101","amount":100000},{"account_code":"301","amount":-100000}]}' "${URL}/transactions"
	curl -H "Content-Type: application/json" -X POST -d '{"date":"2016-09-03","description":"Buy a computer","items":[{"account_code":"101","amount":-50000},{"account_code":"102","amount":200000},{"account_code":"201","amount":-150000}]}' "${URL}/transactions"
	curl -H "Content-Type: application/json" -X POST -d '{"date":"2016-09-04","description":"Software consulting for Acme Inc.","items":[{"account_code":"101","amount":50000},{"account_code":"401","amount":-50000}]}' "${URL}/transactions"
	curl -H "Content-Type: application/json" -X POST -d '{"date":"2016-09-04","description":"On-site visit to Acme Inc.","items":[{"account_code":"101","amount":-4500},{"account_code":"501","amount":4500}]}' "${URL}/transactions"
{'fraction_non_alphanumeric': 0.2520179372197309, 'fraction_numerical': 0.06816143497757847, 'mean_word_length': 6.46875, 'pattern_counts': {'":': 76, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3759180', 'n_tokens_mistral': 1353, 'n_tokens_neox': 1154, 'n_words': 233}