alan-turing-institute / whatwhat

A reimagining of nowwhat in OCaml
MIT License
0 stars 0 forks source link

correct parsing of metadata #16

Closed callummole closed 2 years ago

callummole commented 2 years ago

The parsing of metadata should no be fairly robust to human error.

If metadata exists but is not of the correct format it currently prints an informative log (but doesn't fail).

@mhauru there is a slight wrinkle, the output is currently:

Metadata Parse Warning (num: 1200): key turing-project-code, null value
Metadata Parse Warning (num: 1200): key max-FTE-percent, null value
Metadata Parse Warning (num: 1200): key min-FTE-percent, null value
Metadata Parse Error (num: 1199): Expected 8 metadata keys, got 0
Metadata Parse Warning (num: 1198): key max-FTE-percent, null value
Metadata Parse Warning (num: 1198): key min-FTE-percent, null value
Metadata Parse Error (num: 1199): Expected 8 metadata keys, got 0
Metadata Parse Warning (num: 1198): key max-FTE-percent, null value
Metadata Parse Warning (num: 1198): key min-FTE-percent, null value

The immediate conclusion is that issues get processed twice. But I cannot see where in the code this is happening.

callummole commented 2 years ago

Closes #1

callummole commented 2 years ago

PR reverted - mistakenly merged into main instead of dev.