Skip to content

restructure peppy constructor function (init)  #465

@khoroshevskyi

Description

@khoroshevskyi

The peppy Project constructor was initially designed to expect a project in the form of a YAML+CSV file, a CSV file, or None. This approach was conceived before considering peppy as a dictionary or another Python representation.

With the introduction of Pephub and other new packages, there is now a need to initialize the Project using alternative methods, such as pandas, dictionaries, YAML, etc. To accommodate this, we should restructure the __init__ method to accept three Python objects instead of a configuration (cfg) string. For example:

    def __init__(self, 
                        project_config: dict, 
                        sample_table: pd.DataFrame,
                        subsample_list: Union[List, None] = None
                        amendments: Union[str, Iterable[str]] = None,
                        ...
                ):
        self.project_config = project_config
        self.sample_table = sample_table
        self.subsample_table = subsample_table
        self.amendments = amendments
        ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions