nfdi4plants/arc-validate

Refactor fillTokens function from ValidationPackage POC into ARCExpect

Closed this issue · 2 comments

Not sure about the naming though. Reminder @omaus , this is the section:

let fillTokenList onto tokens =
let ontoGraph = OboGraph.ontologyToFGraphByName onto
let ipsAdded = ARCGraph.addMissingTerms onto tokens
let partitionedIps = Seq.groupWhen (ARCGraph.isHeader ontoGraph) ipsAdded
let partitionallyFilledIps = partitionedIps |> Seq.map (ARCGraph.addMissingTermsInGroup ontoGraph)
let groupedIps = partitionallyFilledIps |> Seq.map ARCGraph.groupTerms
let matchedIps = groupedIps |> Seq.map (ARCGraph.matchTerms onto)
let subgraphs = Seq.map (ARCGraph.constructIntermediateMetadataSubgraph ontoGraph) matchedIps
let filledSubgraphs = Seq.map (fst >> ARCGraph.addEmptyIpsToNodeData) subgraphs
let splitSubgraphs = Seq.map ARCGraph.splitMetadataSubgraph filledSubgraphs
Seq.map ARCGraph.metadataSubgraphToList splitSubgraphs

Wouldn't this fail? This function needs ARCTokenization functionality (okay so far) and ARCExpect functionality (as of now, since ARCGraph is still part of ARCExpect). But ARCExpect itself also depends on ARCTokenization, so both libraries would depend on each other.

Yeah i meant arcexpect sorry