<commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-

# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki

# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com <EMAIL>

from setuptools import setup, Extension
from thumbor import __version__

import glob
import os
import logging


tests_require = [
    "redis>=2.4.9,<3.0.0",
    "tornado-pyvows>=0.6.0",
    "coverage",
    "mock>=1.0.1,<3.0.0",
    "raven",
    "nose",
    "nose-focus",
    "colorama",
    "numpy",
    "scipy>=0.16.1,<1.0.0",
    "flake8",
    "yanc",
    "remotecv",
    "pyssim",
    "cairosvg",
]


def filter_extension_module(name, lib_objs, lib_headers):
    return Extension(
        'thumbor.ext.filters.%s' % name,
        ['thumbor/ext/filters/%s.c' % name] + lib_objs,
        libraries=['m'],
        include_dirs=['thumbor/ext/filters/lib'],
        depends=['setup.py'] + lib_objs + lib_headers,
        extra_compile_args=['-Wall', '-Wextra', '-Werror', '-Wno-unused-parameter'])


def gather_filter_extensions():
    files = glob.glob('thumbor/ext/filters/_*.c')
    lib_objs = glob.glob('thumbor/ext/filters/lib/*.c')
    lib_headers = glob.glob('thumbor/ext/filters/lib/*.h')

    return [filter_extension_module(f[0:-2].split('/')[-1], lib_objs, lib_headers) for f in files]
<commit_msg>Make dependency on preggy explicit<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-

# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki

# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com <EMAIL>

from setuptools import setup, Extension
from thumbor import __version__

import glob
import os
import logging


tests_require = [
    "redis>=2.4.9,<3.0.0",
    "tornado-pyvows>=0.6.0",
    "coverage",
    "mock>=1.0.1,<3.0.0",
    "raven",
    "nose",
    "nose-focus",
    "colorama",
    "numpy",
    "scipy>=0.16.1,<1.0.0",
    "flake8",
    "yanc",
    "remotecv",
    "pyssim",
    "cairosvg",
    "preggy>=1.3.0",
]


def filter_extension_module(name, lib_objs, lib_headers):
    return Extension(
        'thumbor.ext.filters.%s' % name,
        ['thumbor/ext/filters/%s.c' % name] + lib_objs,
        libraries=['m'],
        include_dirs=['thumbor/ext/filters/lib'],
        depends=['setup.py'] + lib_objs + lib_headers,
        extra_compile_args=['-Wall', '-Wextra', '-Werror', '-Wno-unused-parameter'])


def gather_filter_extensions():
    files = glob.glob('thumbor/ext/filters/_*.c')
    lib_objs = glob.glob('thumbor/ext/filters/lib/*.c')
    lib_headers = glob.glob('thumbor/ext/filters/lib/*.h')

    return [filter_extension_module(f[0:-2].split('/')[-1], lib_objs, lib_headers) for f in files]

{'fraction_non_alphanumeric': 0.18396226415094338, 'fraction_numerical': 0.02358490566037736, 'mean_word_length': 3.2415384615384615, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '7067843', 'n_tokens_mistral': 1073, 'n_tokens_neox': 1067, 'n_words': 175}