Skip to content

data_source

DataCollection

Bases: DataSource

A container for a number of related data sources. Uses a factory to generate the data sources, and then spools out their results.

DataSource

Bases: object

An abstract class that defines how data sources are handled.

origins property

Generates a list of semantic origins the DataSource knows how to instantiate

Returns:

Type Description

interfaces(ref)

Generates a list of interfaces known for the given reference. the reference must be in the list of origins.

Parameters:

Name Type Description Default
ref
required

Returns:

Type Description

make_resources(ref)

Generates an exhaustive sequence of LcResource objects for a given reference.

Parameters:

Name Type Description Default
ref
required

Returns:

Type Description

test_params(ref, interface)

User supplies a reference and interface. This function returns a 2-tuple: - kwargs to pass as input arguments - expected output

This function can't be written until the tests are designed.

Parameters:

Name Type Description Default
ref
required
interface
required

Returns:

Type Description