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

Phonology: warnings and exceptions report #1100

Closed
myrix opened this issue Jan 16, 2024 · 1 comment · Fixed by ispras/lingvodoc#1486
Closed

Phonology: warnings and exceptions report #1100

myrix opened this issue Jan 16, 2024 · 1 comment · Fixed by ispras/lingvodoc#1486
Assignees
Labels
backend bug is related to backend enhancement this label means that resolving the issue would improve some part of the system

Comments

@myrix
Copy link
Contributor

myrix commented Jan 16, 2024

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:

  1. 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.

  2. 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:

  1. 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.

  2. 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:

  • /dictionary/330/3/perspective/330/4/view
  • /dictionary/3104/11/perspective/3104/12/view
@myrix myrix added enhancement this label means that resolving the issue would improve some part of the system backend bug is related to backend labels Jan 16, 2024
@vmonakhov
Copy link

All the points are resolved

2024-01-19_15-32-25

vmonakhov added a commit to ispras/lingvodoc that referenced this issue Jan 19, 2024
…1486)

* first

* cleanup

* cached massages

* minor

* minor

* minor

* cleanup

* cleanup

* cleanup

* correct warnings

* save to file

* dict

* xlsx

* remove debug

* remove debug
vmonakhov added a commit to ispras/lingvodoc that referenced this issue Jan 22, 2024
…1486)

* first

* cleanup

* cached massages

* minor

* minor

* minor

* cleanup

* cleanup

* cleanup

* correct warnings

* save to file

* dict

* xlsx

* remove debug

* remove debug
vmonakhov added a commit to ispras/lingvodoc that referenced this issue Jan 23, 2024
* first

* Phonology exceptions report -- resolved  ispras/lingvodoc-react#1100 (#1486)

* first

* cleanup

* cached massages

* minor

* minor

* minor

* cleanup

* cleanup

* cleanup

* correct warnings

* save to file

* dict

* xlsx

* remove debug

* remove debug

* Revert "first"

This reverts commit 784a2bb.

* custom pympi in requirements

* some refactoring

* !! markup_stream has <class 'http.client.HTTPResponse'> type

* refactoring

* got rid of tgt

* minus dep

* cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug is related to backend enhancement this label means that resolving the issue would improve some part of the system
Projects
None yet
2 participants