<commit_before>Resource helpers
================
One of the core concepts of Seaworthy is the concept of a resource helper.
These are wrappers around the resource models provided by the `Docker SDK for
Python`_. There is a helper class for each of the basic Docker resource types:

- :class:`~seaworthy.helper.ImageHelper` manages
  :class:`~docker.models.images.Image` resources
- :class:`~seaworthy.helper.NetworkHelper` manages
  :class:`~docker.models.networks.Network` resources
- :class:`~seaworthy.helper.VolumeHelper` manages
  :class:`~docker.models.volumes.Volume` resources
- :class:`~seaworthy.helper.ContainerHelper` manages
  :class:`~docker.models.containers.Container` resources

These helpers all provide two main functions:

- Namespacing of resources: by prefixing resource names, the resources are
  isolated from other Docker resources already present on the system.
- Teardown (cleanup) of resources: when the tests end, the networks, volumes,
  and containers used in those tests are removed.

Accessing the various helpers is most easily done via the
:class:`~seaworthy.helper.DockerHelper`::

    from seaworthy.helper import DockerHelper


    # Create a DockerHelper with the default namespace, 'test'
    docker_helper = DockerHelper()<commit_msg>helpers: add a small note about non-default behaviour<commit_after>Resource helpers
================
One of the core concepts of Seaworthy is the concept of a resource helper.
These are wrappers around the resource models provided by the `Docker SDK for
Python`_. There is a helper class for each of the basic Docker resource types:

- :class:`~seaworthy.helper.ImageHelper` manages
  :class:`~docker.models.images.Image` resources
- :class:`~seaworthy.helper.NetworkHelper` manages
  :class:`~docker.models.networks.Network` resources
- :class:`~seaworthy.helper.VolumeHelper` manages
  :class:`~docker.models.volumes.Volume` resources
- :class:`~seaworthy.helper.ContainerHelper` manages
  :class:`~docker.models.containers.Container` resources

These helpers all provide two main functions:

- Namespacing of resources: by prefixing resource names, the resources are
  isolated from other Docker resources already present on the system.
- Teardown (cleanup) of resources: when the tests end, the networks, volumes,
  and containers used in those tests are removed.

In addition, some of the behaviour around resource creation and removal is
changed from the Docker defaults to be a better fit for a testing environment.

Accessing the various helpers is most easily done via the
:class:`~seaworthy.helper.DockerHelper`::

    from seaworthy.helper import DockerHelper


    # Create a DockerHelper with the default namespace, 'test'
    docker_helper = DockerHelper()
{'fraction_non_alphanumeric': 0.08743169398907104, 'fraction_numerical': 0.0, 'mean_word_length': 5.226757369614512, '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': '7101776', 'n_tokens_mistral': 761, 'n_tokens_neox': 708, 'n_words': 292}