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

Restore partial functionality of button Validate / Restore Ontology Term #517

Merged
merged 5 commits into from
Oct 7, 2024

Conversation

Etschbeijer
Copy link
Collaborator

Closes #511

@Etschbeijer Etschbeijer requested review from Freymaurer, HLWeil and kMutagene and removed request for Freymaurer September 4, 2024 13:45
@Etschbeijer Etschbeijer self-assigned this Sep 4, 2024
@Etschbeijer
Copy link
Collaborator Author

It is only a partial fix, the second half of the functionality of the button will be fixed in this Issue: #522
Reason: Lack of knowledge

@Etschbeijer Etschbeijer marked this pull request as ready for review September 11, 2024 15:55

return messages
}
)

let fillEmptyBuildingBlocks () =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to autoCompleteFromExistingTerms, add extensive comment in xml style to explain functionality.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

//When msg > 0 there is an error and we can skip the filling of the rows because the columns are not valid
if messages.Length > 0 then return messages
else
let! excelTable = getActiveAnnotationTable context
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must parse table a second time after validateAnnotationTable. Maybe have validateAnnotationTable have return the table if validated successful. This would require a new ouput using Result

let tryString (x: string) =
  if x.StartsWith "y" then
    Result.Ok true
  else
    Result.Error false


match tryString "yes" with
| Result.Ok x -> printfn "Ok: %A" x
| Result.Error x -> printfn "Error: %A" x

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use match case instead of if-else on line 1971

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

//Arctable enables a fast check for term and unit building blocks
let! arcTable = ArcTable.tryGetFromExcelTable(excelTable, context)

let arcTable =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already checked

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -55,7 +55,7 @@ let private shortCutIconList model dispatch =
Html.i [prop.className "fa-solid fa-pen"]
],
(fun _ ->
SpreadsheetInterface.ValidateAnnotationTable |> InterfaceMsg |> dispatch
//SpreadsheetInterface.ValidateAnnotationTable |> InterfaceMsg |> dispatch
SpreadsheetInterface.UpdateTermColumns |> InterfaceMsg |> dispatch
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe coin a term for this process. Because we verify the table, we clean it up with leftover terms and try to fill TSR TAN from term name (in the future). We might need a word for this, that we both start using for this process.

@Freymaurer Freymaurer merged commit 7eee2d1 into developer Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants