<commit_before>
PROJECT_NAME=aert-webfolder
PROJECT_VERSION=__VERSION__
PROJECT_FILENAME=$(PROJECT_NAME)_$(PROJECT_VERSION)

DEST_PATH=/opt/aert/webfolder_$(PROJECT_VERSION)
VENV_PATH=$(DEST_PATH)/env
LINK_PATH=/opt/aert/webfolder
LINK_BKP_PATH=/opt/aert/webfolder.prev


install: install_deps install_env install_wheel install_links post-install

install_deps:
	sudo apt-get install python-virtualenv python-pip

install_env:
	mkdir -p $(VENV_PATH)
	virtualenv -p python2.7 --no-site-packages $(VENV_PATH)
	$(VENV_PATH)/bin/pip install --upgrade pip
	$(VENV_PATH)/bin/pip install -I "setuptools>=0.8" "wheel>=0.22"

install_wheel:
	$(VENV_PATH)/bin/pip install --use-wheel --no-index --find-links=wheel-dir/ -r requirements.txt

install_links:
	@if [ -e $(LINK_BKP_PATH) ] ; then rm -f $(LINK_BKP_PATH); fi;
	@if [ -e $(LINK_PATH) ] ; then mv $(LINK_PATH) $(LINK_BKP_PATH); fi;
	ln -s $(DEST_PATH) $(LINK_PATH)

post-install: configure_copy_files 

configure_copy_files:
	mkdir -p $(DEST_PATH)/assets
	mkdir -p $(DEST_PATH)/uploads
	mkdir -p $(DEST_PATH)/logs
	cp -R etc/ $(DEST_PATH)/
	@if [ -e $(LINK_BKP_PATH)/etc/config.ini ] ; then cp -f $(LINK_BKP_PATH)/etc/config.ini $(DEST_PATH)/etc/config.ini; fi;

test:
	sudo apt-get install nginx
	sudo $(DEST_PATH)/etc/nginx/start_gunicorn.sh
	sudo cp -f etc/nginx/nginx-site-example.conf /etc/nginx/sites-available/webfolder-test.app
	sudo ln -s /etc/nginx/sites-available/webfolder-test.app /etc/nginx/sites-enabled/webfolder-test.app
	sudo service nginx reload
<commit_msg>Trying new install.<commit_after>
PROJECT_NAME=aert-webfolder
PROJECT_VERSION=__VERSION__
PROJECT_FILENAME=$(PROJECT_NAME)_$(PROJECT_VERSION)

DEST_PATH=/opt/aert/webfolder_$(PROJECT_VERSION)
VENV_PATH=$(DEST_PATH)/env
LINK_PATH=/opt/aert/webfolder
LINK_BKP_PATH=/opt/aert/webfolder.prev


install: install_deps install_env install_wheel install_links post-install

install_deps:
	sudo apt-get install python-virtualenv python-pip

install_env:
	mkdir -p $(VENV_PATH)
	virtualenv -p python2.7 --no-site-packages $(VENV_PATH)
	$(VENV_PATH)/bin/pip install --upgrade pip
	$(VENV_PATH)/bin/pip install -I "setuptools>=0.8" "wheel>=0.22"

install_wheel:
	$(VENV_PATH)/bin/pip install --use-wheel --no-index --find-links=wheel-dir/ -r requirements.txt

install_links:
	@if [ -f $(LINK_BKP_PATH) ] ; then rm -f $(LINK_BKP_PATH); fi;
	@if [ -f $(LINK_PATH) ] ; then mv $(LINK_PATH) $(LINK_BKP_PATH); fi;
	ln -s $(DEST_PATH) $(LINK_PATH)

post-install: configure_copy_files 

configure_copy_files:
	mkdir -p $(DEST_PATH)/assets
	mkdir -p $(DEST_PATH)/uploads
	mkdir -p $(DEST_PATH)/logs
	cp -R etc/ $(DEST_PATH)/
	@if [ -f $(LINK_BKP_PATH)/etc/config.ini ] ; then cp -f $(LINK_BKP_PATH)/etc/config.ini $(DEST_PATH)/etc/config.ini; fi;

test:
	sudo apt-get install nginx
	sudo $(DEST_PATH)/etc/nginx/start_gunicorn.sh
	sudo cp -f etc/nginx/nginx-site-example.conf /etc/nginx/sites-available/webfolder-test.app
	sudo ln -s /etc/nginx/sites-available/webfolder-test.app /etc/nginx/sites-enabled/webfolder-test.app
	sudo service nginx reload

{'fraction_non_alphanumeric': 0.14571054354944335, 'fraction_numerical': 0.0045841519318926, 'mean_word_length': 4.897683397683398, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '781416', 'n_tokens_mistral': 1278, 'n_tokens_neox': 1203, 'n_words': 228}