<commit_before># -*- encoding: utf-8 -*-
# ! python3

import os
import sys
import shutil
import warnings
import webbrowser

from invoke import run, task

PROJECT_NAME = 'django_brotli'


@task
def clean():
    """remove build artifacts"""
    shutil.rmtree('{PROJECT_NAME}.egg-info'.format(PROJECT_NAME=PROJECT_NAME), ignore_errors=True)
    shutil.rmtree('build', ignore_errors=True)
    shutil.rmtree('dist', ignore_errors=True)
    shutil.rmtree('htmlcov', ignore_errors=True)
    shutil.rmtree('__pycache__', ignore_errors=True)


@task
def lint():
    """check style with flake8"""
    run("flake8 {PROJECT_NAME}/ tests/".format(PROJECT_NAME=PROJECT_NAME))


@task
def test():
    run("py.test")


@task
def test_all():
    """run tests on every Python version with tox"""
    run("tox")


@task
def check():
    """Check setup"""
    run("python setup.py --no-user-cfg --verbose check --metadata --restructuredtext --strict")


@task
def coverage():
    """check code coverage quickly with the default Python"""
    run("coverage run --source {PROJECT_NAME} -m py.test".format(PROJECT_NAME=PROJECT_NAME))
    run("coverage report -m")
    run("coverage html")

    if sys.stdout.isatty():
        # Running in a real terminal
        webbrowser.open('file://' + os.path.realpath("htmlcov/index.html"), new=2)


@task
def test_install():
    """try to install built package"""
    run("pip uninstall {PROJECT_NAME} --yes".format(PROJECT_NAME=PROJECT_NAME), warn=True)
    run("pip install --use-wheel --no-cache-dir --no-index --find-links=file:./dist {PROJECT_NAME}".format(PROJECT_NAME=PROJECT_NAME))<commit_msg>remove --use-wheel option from pip<commit_after># -*- encoding: utf-8 -*-
# ! python3

import os
import sys
import shutil
import warnings
import webbrowser

from invoke import run, task

PROJECT_NAME = 'django_brotli'


@task
def clean():
    """remove build artifacts"""
    shutil.rmtree('{PROJECT_NAME}.egg-info'.format(PROJECT_NAME=PROJECT_NAME), ignore_errors=True)
    shutil.rmtree('build', ignore_errors=True)
    shutil.rmtree('dist', ignore_errors=True)
    shutil.rmtree('htmlcov', ignore_errors=True)
    shutil.rmtree('__pycache__', ignore_errors=True)


@task
def lint():
    """check style with flake8"""
    run("flake8 {PROJECT_NAME}/ tests/".format(PROJECT_NAME=PROJECT_NAME))


@task
def test():
    run("py.test")


@task
def test_all():
    """run tests on every Python version with tox"""
    run("tox")


@task
def check():
    """Check setup"""
    run("python setup.py --no-user-cfg --verbose check --metadata --restructuredtext --strict")


@task
def coverage():
    """check code coverage quickly with the default Python"""
    run("coverage run --source {PROJECT_NAME} -m py.test".format(PROJECT_NAME=PROJECT_NAME))
    run("coverage report -m")
    run("coverage html")

    if sys.stdout.isatty():
        # Running in a real terminal
        webbrowser.open('file://' + os.path.realpath("htmlcov/index.html"), new=2)


@task
def test_install():
    """try to install built package"""
    run("pip uninstall {PROJECT_NAME} --yes".format(PROJECT_NAME=PROJECT_NAME), warn=True)
    run("pip install --no-cache-dir --no-index --find-links=file:./dist {PROJECT_NAME}".format(PROJECT_NAME=PROJECT_NAME))
{'fraction_non_alphanumeric': 0.15522020326455188, 'fraction_numerical': 0.003079765937788728, 'mean_word_length': 4.1069182389937104, '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': '3325641', 'n_tokens_mistral': 1096, 'n_tokens_neox': 1065, 'n_words': 258}