eogrow.utils.meta

Utilities for solving different problems in eo-grow package structure, which are mostly a pure Python magic.

eogrow.utils.meta.load_pipeline_class(config)[source]

Given a config object it loads the pipeline class referenced in the config

Parameters:

config (dict) –

Return type:

type[Pipeline]

eogrow.utils.meta.collect_schema(class_with_schema)[source]

A utility that collects a schema from the given object.

The object is expected to hold a unique internal class which inherits from BaseSchema. Example:

class MyObject:
class Schema(BaseSchema):

This utility would provide MySchema. It works also if MyObject inherits from a class that holds the schema.

Parameters:

class_with_schema (type) –

Return type:

type[BaseSchema]

eogrow.utils.meta.import_object(import_path)[source]

Imports an object from a given import path

Parameters:

import_path (str) –

Return type:

Any

eogrow.utils.meta.get_package_versions()[source]

A utility function that provides dependency package versions

Returns:

A dictionary with versions

Return type:

dict[str, str]