Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add workflow type #501

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions latch/types/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,13 @@ def wf(read1: LatchFile):
"""
_non_standard: Dict[str, object] = field(default_factory=dict)

def __post_init__(self):
self.workflow_type = "flyte"

@property
def dict(self):
metadata_dict = asdict(self)
metadata_dict["workflow_type"] = self.workflow_type
# remove parameters since that will be handled by each parameters' dict() method
del metadata_dict["parameters"]
metadata_dict["license"] = {"id": self.license}
Expand Down Expand Up @@ -803,6 +807,7 @@ def validate(self):
raise click.exceptions.Exit(1)

def __post_init__(self):
self.workflow_type = "snakemake"
self.validate()

if self.name is None:
Expand Down Expand Up @@ -873,6 +878,7 @@ def dict(self):
return d

def __post_init__(self):
self.workflow_type = "nextflow"
self.validate()

if self.name is None:
Expand Down
Loading