Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Unify all the types #207

Open
Katolus opened this issue Feb 3, 2022 · 0 comments
Open

Unify all the types #207

Katolus opened this issue Feb 3, 2022 · 0 comments
Assignees

Comments

@Katolus
Copy link
Owner

Katolus commented Feb 3, 2022

One idea is to move all the scaffolding for classes under a file or set of files with a basic representation.

Initially, this has been an issue because the imports would drag other classes in and there would be an issue with circular dependencies. This however maybe potentially be avoided if we have a set of files, say "FunctionConfigT" that would only define just the basics and an actual implementation that would inherit from this and only define what is needed.

class FunctionConfigT
    """Represents a configuration file of a specific function"""

    config_name: ConfigName
    config_version: FunctionConfigVersion 
    deploy_variables: DeployVariables
    description: str
    env_variables: DictStrAny
    path: str
    run_variables: RunVariables

class FunctionConfig(FunctionConfigT, BaseModel):
    """Represents a configuration file of a specific function"""

    config_name: ConfigName = ConfigName.BASE
    config_version: FunctionConfigVersion = FunctionConfigVersion.latest()

However, this would only make sense if we could extract all the types from the class definitions.

@Katolus Katolus self-assigned this Feb 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant