Phonology: warnings and exceptions report #1100
Labels
backend
bug is related to backend
enhancement
this label means that resolving the issue would improve some part of the system
XLSX files generated by Tools -> Phonology should include a list of warning and exception infos on a separate sheet.
Each info should at least include ids and urls of the sound and the markup which were the cause of the warning/exception. For exceptions info should include stacktrace. For warnings info should include warning identification and any additional relevant data.
Types of exceptions:
General exception, processed here, https://github.com/ispras/lingvodoc/blob/ac2efa67e29382b6c49d8cd083b3b236d5999d7f/lingvodoc/views/v2/phonology.py#L4241, unless it's a special double sound-markup exception.
Special double sound-markup exception, when we failed to parse the markup, guessed that perhaps markup and sound files are swapped, try to parse sound as markup at https://github.com/ispras/lingvodoc/blob/ac2efa67e29382b6c49d8cd083b3b236d5999d7f/lingvodoc/views/v2/phonology.py#L4103 and failed again for whatever reason, landing at the general exception handler.
In that case exception info should include both stacktraces, from the 1st exception and from the 2nd.
Types of warnings:
Sound-markup swap warning, when, just as in the double exception, we failed to parse markup, tried to parse sound as markup and markup as sound and succeeded.
Three interval text warnings, currently processed here https://github.com/ispras/lingvodoc/blob/ac2efa67e29382b6c49d8cd083b3b236d5999d7f/lingvodoc/views/v2/phonology.py#L4124 by essentially doing nothing.
Should include additional data, text messages which are now just logged, or the same data in a more structured way if required.
Care should be taken so that exceptions & warnings report is properly generated also when the analysis results are retrieved from cache. Probably would need to extend phonology data stored in the cache, adding relevant info.
Perspectives which may be useful for testing:
The text was updated successfully, but these errors were encountered: