Skip to content

Commit

Permalink
Implement review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Etschbeijer committed Oct 21, 2024
1 parent a0eeeed commit cb87cba
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/Spreadsheet/Template.fs
Original file line number Diff line number Diff line change
Expand Up @@ -271,19 +271,15 @@ module Template =

/// Reads an assay from a spreadsheet
let fromFsWorkbook (doc : FsWorkbook) =
// Reading the "Assay" metadata sheet. Here metadata
let templateInfo, ers, tags, authors =

match doc.TryGetWorksheetByName metaDataSheetName with
// Reading the "Template" metadata sheet. Here metadata
let templateInfo, ers, tags, authors =
match tryGetMetadataSheet doc with
| Option.Some sheet ->
fromMetadataSheet sheet
| None ->
match doc.TryGetWorksheetByName obsoletemetaDataSheetName with
| Option.Some sheet ->
fromMetadataSheet sheet
| None ->
Metadata.Template.TemplateInfo.empty, [], [], []

| None ->
printfn "Could not find metadata sheet with sheetname \"isa_template\" or deprecated sheetname \"Template\""
Metadata.Template.TemplateInfo.empty, [], [], []

let tryTableNameMatches (ws : FsWorksheet) =
if ws.Tables |> Seq.exists (fun t -> t.Name = templateInfo.Table) then Some ws else None

Expand Down

0 comments on commit cb87cba

Please sign in to comment.