camel_tools.data

This sub-module contains utilities for locating datastes for the various CAMeL Tools components.

Classes

class camel_tools.data.ComponentInfo

Named tuple containing information about a component.

name

The name used to query this component.

Type:str
datasets

A set of all datasets for this component.

Type:frozenset of DatasetInfo
default

Name of the default dataset for this component.

Type:str
class camel_tools.data.DatasetInfo

Named tuple containing information about a dataset.

component

The component name this dataset belongs to.

Type:str
name

The name used to query this dataset.

Type:str
description

A description of this dataset.

Type:str
license

The license this dataset is distributed under.

Type:str
version

This dataset’s version number.

Type:str
path

The path to this dataset.

Type:Path
class camel_tools.data.DataCatalogue

This class allows querying datasets provided by CAMeL Tools.

static get_component_info(component)

Get the catalogue entry for a given component.

Parameters:component (str) – Name of the component to lookup in the catalogue.
Returns:The catalogue entry associated with the given component.
Return type:ComponentInfo
Raises:DataLookupException – If component is not a valid component name.
static get_dataset_info(component, dataset=None)

Get the catalogue entry for a given dataset for a given component.

Parameters:
  • component (str) – Name of the component dataset belongs to.
  • dataset (str, optional) – Name of the dataset for component to lookup. If None, the entry for the default dataset for component is returned. Defaults to None.
Returns:

The catalogue entry associated with the given dataset.

Return type:

DatasetInfo

Raises:

DataLookupException – If component is not a valid component name or if dataset is not a valid dataset name for component.