<commit_before>NAME=redash
VERSION=`python ./manage.py version`
FULL_VERSION=$(VERSION)+b$(CIRCLE_BUILD_NUM)
FILENAME=$(CIRCLE_ARTIFACTS)/$(NAME).$(FULL_VERSION).tar.gz

deps:
	cd rd_ui && npm install
	cd rd_ui && npm install grunt-cli bower
	cd rd_ui && bower install
	cd rd_ui && grunt build

pack:
	sed -ri "s/^__version__ = '([0-9.]*)'/__version__ = '$(FULL_VERSION)'/" redash/__init__.py
	tar -zcv -f $(FILENAME) --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="rd_ui/node_modules" --exclude="rd_ui/dist/bower_components" --exclude="rd_ui/app" *

upload:
	python bin/upload_version.py $(FULL_VERSION) $(FILENAME)

test:
	nosetests --with-coverage --cover-package=redash tests/*.py<commit_msg>Fix version name in tarball<commit_after>NAME=redash
VERSION=`python ./manage.py version`
FULL_VERSION=$(VERSION)+b$(CIRCLE_BUILD_NUM)
# VERSION gets evaluated every time it's referenced, therefore we need to use VERSION here instead of FULL_VERSION.
FILENAME=$(CIRCLE_ARTIFACTS)/$(NAME).$(VERSION).tar.gz

deps:
	cd rd_ui && npm install
	cd rd_ui && npm install grunt-cli bower
	cd rd_ui && bower install
	cd rd_ui && grunt build

pack:
	sed -ri "s/^__version__ = '([0-9.]*)'/__version__ = '$(FULL_VERSION)'/" redash/__init__.py
	tar -zcv -f $(FILENAME) --exclude=".git*" --exclude="*.pyc" --exclude="*.pyo" --exclude="venv" --exclude="rd_ui/node_modules" --exclude="rd_ui/dist/bower_components" --exclude="rd_ui/app" *

upload:
	python bin/upload_version.py $(VERSION) $(FILENAME)

test:
	nosetests --with-coverage --cover-package=redash tests/*.py
{'fraction_non_alphanumeric': 0.17848101265822786, 'fraction_numerical': 0.002531645569620253, 'mean_word_length': 4.988636363636363, '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': '6210261', 'n_tokens_mistral': 623, 'n_tokens_neox': 580, 'n_words': 126}