<commit_before>"""
Extension base-classes for compile-time and run-time experiments.
"""
import logging
import typing as tp
from abc import ABCMeta
from collections.abc import Iterable

from plumbum.commands.base import BoundCommand

from benchbuild.utils import run

LOG = logging.getLogger(__name__)


class Extension(metaclass=ABCMeta):
    """An experiment functor to implement composable experiments.

    An experiment extension is always callable with an arbitrary amount of
    arguments. The varargs component of an extension's `__call__` operator
    is fed the binary command that we currently execute and all arguments
    to the binary.
    Any customization necessary for the extension (e.g, dynamic configuration
    options) has to be passed by keyword argument.<commit_msg>refactor(pylint): remove unused import<commit_after>"""
Extension base-classes for compile-time and run-time experiments.
"""
import logging
import typing as tp
from abc import ABCMeta

from plumbum.commands.base import BoundCommand

from benchbuild.utils import run

LOG = logging.getLogger(__name__)


class Extension(metaclass=ABCMeta):
    """An experiment functor to implement composable experiments.

    An experiment extension is always callable with an arbitrary amount of
    arguments. The varargs component of an extension's `__call__` operator
    is fed the binary command that we currently execute and all arguments
    to the binary.
    Any customization necessary for the extension (e.g, dynamic configuration
    options) has to be passed by keyword argument.
{'fraction_non_alphanumeric': 0.05102040816326531, 'fraction_numerical': 0.0, 'mean_word_length': 4.544169611307421, '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': '1050979', 'n_tokens_mistral': 382, 'n_tokens_neox': 376, 'n_words': 184}