drepr.models.parsers.v1.preprocessing_parser#

Classes

PreprocessingParser(path_parser)

Preprocessing are defined as a list

class PreprocessingParser(path_parser: PathParser)[source]#

Bases: object

Preprocessing are defined as a list

``` - type: <preprocessing_type>

# other properties

```

  1. If <preprocessing_type> is pmap, its other properties are:

    ``` - type: pmap

    [resource_id]: <resource_id> path: <path> [output]: <output> (default is None) [change_structure]: null|true|false (default is null) code: str

    ```

  2. If <preprocessing_type> is pfilter, its properties are:

    ``` - type: pfilter

    [resource_id]: <resource_id> path: <path> [output]: <output> (default is None) code: str

    ```

  3. If <preprocessing_type> is rmap, its properties are:

    ``` - type: rmap

    resource_id: <resource_id> path: <path> func_id: <func_id> [output]: <output> (default is None)

    ```

where output is either <resource_id> or an object of

resource_id: <resource_id> attr: <attr_id> [attr_path]: <path>

Parameters:

path_parser (PathParser) –

PREPRO_TYPES = {'pfilter', 'pmap', 'psplit', 'rmap'}#
parse(default_resource_id: str, resources: List[Resource], attrs: ParsedAttrs, conf: list) List[Preprocessing][source]#
Parameters:
Return type:

List[Preprocessing]

parse_pmap(resource_id: str, path: Path, prepro: dict, trace0: str) PMap[source]#
Parameters:
  • resource_id (str) –

  • path (Path) –

  • prepro (dict) –

  • trace0 (str) –

Return type:

PMap

parse_pfilter_psplit(resource_id: str, path: Path, prepro: dict, trace0: str, cls: Union[Type[PFilter], Type[PSplit]]) drepr.models.preprocessing.PFilter | drepr.models.preprocessing.PSplit[source]#
Parameters:
Return type:

drepr.models.preprocessing.PFilter | drepr.models.preprocessing.PSplit

parse_rmap(resource_id: str, path: Path, prepro: dict, trace0: str) RMap[source]#
Parameters:
  • resource_id (str) –

  • path (Path) –

  • prepro (dict) –

  • trace0 (str) –

Return type:

RMap

parse_output(output: Any, trace: str) POutput[source]#
Parameters:
  • output (Any) –

  • trace (str) –

Return type:

POutput