You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The file could be read without storing it I think. I assume that you will receive 1 workflow in CWL and you can verify and parse it without storing it locally, something similar to:
async def score_workflows(file: UploadFile = File(...)):
# Read the contents of the uploaded file
contents = await file.read()
# Parse the YAML content as a CWL workflow (this tests whether the file is a YAML file)
try:
cwl_content = yaml.safe_load(contents)
except yaml.YAMLError as e:
return {"error": "Invalid YAML file", "details": str(e)}
# Extract information from the CWL workflow
extracted_info = extract_info_from_cwl(cwl_content)
_Originally posted by @vedran-kasalica in https://github.com/Workflomics/workflomics-QCmetric/pull/22#discussion_r1716904798_
The text was updated successfully, but these errors were encountered:
pubmetric.workflows.parse_cwl currently takes a filepath and then opens them inside the method. Need to make this optional or change to take an open file.
The text was updated successfully, but these errors were encountered: