<commit_before>import abc
import typing as tp

import attr

from benchbuild.environments.domain import events


# pylint: disable=too-few-public-methods
@attr.s
class Layer(abc.ABC):
    pass


# pylint: enable=too-few-public-methods


@attr.s(frozen=True)
class FromLayer(Layer):
    base: str = attr.ib()

    def __str__(self) -> str:
        return f'FROM {self.base}'
<commit_msg>model: document layers<commit_after>import abc
import typing as tp

import attr

from benchbuild.environments.domain import events


# pylint: disable=too-few-public-methods
@attr.s
class Layer(abc.ABC):
    """
    A layer represents a filesystem layer in a container image.

    Layers can be 'virtual' in the sense that they do not lead to changes
    in the container image filesystem, e.g. setting up the build context.

    This more or less represents commands/statements available in buildah
    or Dockerfiles.

    Examples:
        buildah add -> AddLayer
        buildah copy -> CopyLayer
        buildah from -> FromLayer
    """


# pylint: enable=too-few-public-methods


@attr.s(frozen=True)
class FromLayer(Layer):
    base: str = attr.ib()

    def __str__(self) -> str:
        return f'FROM {self.base}'

{'fraction_non_alphanumeric': 0.09511993382961124, 'fraction_numerical': 0.0, 'mean_word_length': 3.245614035087719, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, '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': '236367', 'n_tokens_mistral': 392, 'n_tokens_neox': 366, 'n_words': 121}