<commit_before>.PHONY: tags
setup:
	npm install
	npm run setup

watch:
	npm run watch

run:
	./manage.py runserver 0.0.0.0:8000

db: deps
	./manage.py migrate
	./manage.py loaddata accounts/fixtures/superadmin.json

clean:
	find . -name "*.pyc" -delete

cleanthumbs:
	./manage.py thumbnail clear
	./manage.py thumbnail cleanup
	rm -rf ./media/cache/

test:
	SEND_EMAILS=0 ./manage.py test --failfast $(test)

jenkins:
	./manage.py jenkins $(test)

builddeps:
	sudo apt install -y libpq-dev python3-dev libjpeg-dev libxml2-dev libxslt1-dev libffi-dev

serverdeps:
	sudo apt-get update
	sudo apt-get -y --allow-unauthenticated install nginx supervisor locales
	pip3 install -r config/requirements/production.pip --exists-action=s

deps:
	pip3 install -r config/requirements/devel.pip --exists-action=w

migration:
	-./manage.py makemigrations
	./manage.py migrate

fixtures:
	./manage.py dumpdata --indent=2 games > initial_data.json

check-deps-update:
	pip3 list --outdated

deploy:
	fab -H lutris.net deploy

deploy_dev:
	DOCKER_HOST="ssh://strider@anaheim" COMPOSE_PROJECT_NAME=lutrisweb_dev POSTGRES_HOST_PORT=5434 HTTP_PORT=82 DEPLOY_ENV=staging docker-compose -f docker-compose.prod.yml up -d

deploy_staging:
	DOCKER_HOST="ssh://strider@anaheim" COMPOSE_PROJECT_NAME=lutrisweb_staging POSTGRES_HOST_PORT=5433 HTTP_PORT=81 DEPLOY_ENV=prod docker-compose -f docker-compose.prod.yml up -d

client:
	if [ -e lutris_client/.git ]; then cd lutris_client; git pull; else git clone https://github.com/lutris/lutris lutris_client; fi

docs:
	rst2html.py --template=config/rst_template.txt lutris_client/docs/installers.rst > templates/docs/installers.html
<commit_msg>Remove orphan containers on deploy<commit_after>.PHONY: tags
setup:
	npm install
	npm run setup

watch:
	npm run watch

run:
	./manage.py runserver 0.0.0.0:8000

db: deps
	./manage.py migrate
	./manage.py loaddata accounts/fixtures/superadmin.json

clean:
	find . -name "*.pyc" -delete

cleanthumbs:
	./manage.py thumbnail clear
	./manage.py thumbnail cleanup
	rm -rf ./media/cache/

test:
	SEND_EMAILS=0 ./manage.py test --failfast $(test)

jenkins:
	./manage.py jenkins $(test)

builddeps:
	sudo apt install -y libpq-dev python3-dev libjpeg-dev libxml2-dev libxslt1-dev libffi-dev

serverdeps:
	sudo apt-get update
	sudo apt-get -y --allow-unauthenticated install nginx supervisor locales
	pip3 install -r config/requirements/production.pip --exists-action=s

deps:
	pip3 install -r config/requirements/devel.pip --exists-action=w

migration:
	-./manage.py makemigrations
	./manage.py migrate

fixtures:
	./manage.py dumpdata --indent=2 games > initial_data.json

check-deps-update:
	pip3 list --outdated

deploy:
	fab -H lutris.net deploy

deploy_dev:
	DOCKER_HOST="ssh://strider@anaheim" COMPOSE_PROJECT_NAME=lutrisweb_dev POSTGRES_HOST_PORT=5434 HTTP_PORT=82 DEPLOY_ENV=staging docker-compose -f docker-compose.prod.yml up -d --remove-orphans

deploy_staging:
	DOCKER_HOST="ssh://strider@anaheim" COMPOSE_PROJECT_NAME=lutrisweb_staging POSTGRES_HOST_PORT=5433 HTTP_PORT=81 DEPLOY_ENV=prod docker-compose -f docker-compose.prod.yml up -d --remove-orphans

client:
	if [ -e lutris_client/.git ]; then cd lutris_client; git pull; else git clone https://github.com/lutris/lutris lutris_client; fi

docs:
	rst2html.py --template=config/rst_template.txt lutris_client/docs/installers.rst > templates/docs/installers.html

{'fraction_non_alphanumeric': 0.11107828655834565, 'fraction_numerical': 0.017134416543574595, 'mean_word_length': 4.298904538341158, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '1899538', 'n_tokens_mistral': 1382, 'n_tokens_neox': 1258, 'n_words': 294}