Mock Data Artifact

This module contains a mock version of the artifact manager for use with testing vivarium_public_health components.

class vivarium_public_health.testing.mock_artifact.MockArtifact[source]
load(entity_key)[source]
write(entity_key, data)[source]
class vivarium_public_health.testing.mock_artifact.MockArtifactManager[source]
property name
setup(builder)[source]

Performs this component’s simulation setup.

load(entity_key, *args, **kwargs)[source]

Loads data associated with the given entity key.

Parameters:
  • entity_key – The key associated with the expected data.

  • column_filters – Filters that subset the data by a categorical column and then remove the column from the raw data. They are supplied as keyword arguments to the load method in the form “column=value”.

Returns:

The data associated with the given key, filtered down to the requested subset if the data is a dataframe.

Return type:

Any

write(entity_key, data)[source]