<commit_before>NPM_ROOT = ./node_modules
STATIC_DIR = src/lemur/static/app
SHELL=/bin/bash
USER := $(shell whoami)

develop: update-submodules setup-git
	@echo "--> Installing dependencies"
ifeq ($(USER), root)
	@echo "WARNING: It looks like you are installing Lemur as root. This is not generally advised."
	npm install --unsafe-perm
else
	npm install
endif
	pip install "setuptools>=0.9.8"
	# order matters here, base package must install first
	pip install -e .
	pip install "file://`pwd`#egg=lemur[dev]"
	pip install "file://`pwd`#egg=lemur[tests]"
	node_modules/.bin/gulp build
	node_modules/.bin/gulp package --urlContextPath=$(urlContextPath)
	@echo ""

release:
	@echo "--> Installing dependencies"
ifeq ($(USER), root)
	@echo "WARNING: It looks like you are installing Lemur as root. This is not generally advised."
	npm install --unsafe-perm
else
	npm install
endif
	pip install "setuptools>=0.9.8"
	# order matters here, base package must install first
	pip install -e .
	node_modules/.bin/gulp build
	node_modules/.bin/gulp package --urlContextPath=$(urlContextPath)
	@echo ""

dev-docs:
	pip install -r requirements-docs.txt

reset-db:
	@echo "--> Dropping existing 'lemur' database"
	dropdb lemur || true
	@echo "--> Creating 'lemur' database"
	createdb -E utf-8 lemur
	@echo "--> Enabling pg_trgm extension"
	psql lemur -c "create extension IF NOT EXISTS pg_trgm;"
	@echo "--> Applying migrations"
	cd lemur && lemur db upgrade

setup-git:
	@echo "--> Installing git hooks"
	git config branch.autosetuprebase always
	cd .git/hooks && ln -sf ../../hooks/* ./
	@echo ""
<commit_msg>fixing setup-git so build continues if ./git/hooks does not exist.<commit_after>NPM_ROOT = ./node_modules
STATIC_DIR = src/lemur/static/app
SHELL=/bin/bash
USER := $(shell whoami)

develop: update-submodules setup-git
	@echo "--> Installing dependencies"
ifeq ($(USER), root)
	@echo "WARNING: It looks like you are installing Lemur as root. This is not generally advised."
	npm install --unsafe-perm
else
	npm install
endif
	pip install "setuptools>=0.9.8"
	# order matters here, base package must install first
	pip install -e .
	pip install "file://`pwd`#egg=lemur[dev]"
	pip install "file://`pwd`#egg=lemur[tests]"
	node_modules/.bin/gulp build
	node_modules/.bin/gulp package --urlContextPath=$(urlContextPath)
	@echo ""

release:
	@echo "--> Installing dependencies"
ifeq ($(USER), root)
	@echo "WARNING: It looks like you are installing Lemur as root. This is not generally advised."
	npm install --unsafe-perm
else
	npm install
endif
	pip install "setuptools>=0.9.8"
	# order matters here, base package must install first
	pip install -e .
	node_modules/.bin/gulp build
	node_modules/.bin/gulp package --urlContextPath=$(urlContextPath)
	@echo ""

dev-docs:
	pip install -r requirements-docs.txt

reset-db:
	@echo "--> Dropping existing 'lemur' database"
	dropdb lemur || true
	@echo "--> Creating 'lemur' database"
	createdb -E utf-8 lemur
	@echo "--> Enabling pg_trgm extension"
	psql lemur -c "create extension IF NOT EXISTS pg_trgm;"
	@echo "--> Applying migrations"
	cd lemur && lemur db upgrade

setup-git:
	if [ -d .git/hooks ]; then \
		@echo "--> Installing git hooks"; \
		git config branch.autosetuprebase always; \
		cd .git/hooks && ln -sf ../../hooks/* ./; \
		@echo ""; \
	fi


{'fraction_non_alphanumeric': 0.1323618700667881, 'fraction_numerical': 0.004250151791135397, 'mean_word_length': 3.859882005899705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '149643', 'n_tokens_mistral': 1175, 'n_tokens_neox': 1103, 'n_words': 362}