Draft: New debug tree
-
Review changes -
-
Download -
Patches
-
Plain diff
Summary
This MR implements a completely overworked and heavily improved debug tree that can be used to:
- trace errors in the crawler code
- find the causes of bugs and unexpected behavior in cfood files
- write unit tests for the crawler
The functionality is implemented in the scanner module which receives an additional argument for the new_debug_tree
. This argument is used recursively to generate a tree structure of roughly the following form:
- SE1:
matching_converters:
- C1:
- SE1a
- SE1b
- SE1c
- ...
- SE2
- SE3
- ...
So every level of structure elements (SEx) includes all information about a specific structure element that was scanned.
The attribute matching_converters
includes all information about matching converters (which recurses in its subtree
).
There is a function in the scanner module now that allows turning this information into an HTML-file with collapsible tree elements (using CSS).
Here is an example of how the output looks like:
This MR furthermore implements a small change that allows to deactivate specific levels in the CFood using the "deactivate" key.
Test Environment
This should be manually tested by generating the scanner output files using the function save_debug_tree. Furthermore, there are some unit tests.
Check List for the Author
Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines
-
All automated tests pass -
Reference related issues -
Up-to-date CHANGELOG.md (or not necessary) -
Up-to-date JSON schema (or not necessary) -
Appropriate user and developer documentation (or not necessary) - How do I use the software? Assume "stupid" users.
- How do I develop or debug the software? Assume novice developers.
-
Annotations in code (Gitlab comments) - Intent of new code
- Problems with old code
- Why this implementation?
Check List for the Reviewer
-
I understand the intent of this MR -
All automated tests pass -
Up-to-date CHANGELOG.md (or not necessary) -
Appropriate user and developer documentation (or not necessary) -
The test environment setup works and the intended behavior is reproducible in the test environment -
In-code documentation and comments are up-to-date. -
Check: Are there specifications? Are they satisfied?
For further good practices have a look at our review guidelines.
Merge request reports
- version 187ab9dd2a
- version 17f200440c
- version 164c925e19
- version 154c925e19
- version 140bec5c0c
- version 133c20c092
- version 129de1475b
- version 11f77077de
- version 107db29bc8
- version 9f0475a78
- version 829701033
- version 79128606e
- version 6364f1de9
- version 54dc4b250
- version 45a5fa92e
- version 3443594b3
- version 2c3258dc6
- version 1b353c617
- dev (HEAD)
- latest version258ba2689 commits,
- version 187ab9dd2a8 commits,
- version 17f200440c21 commits,
- version 164c925e1920 commits,
- version 154c925e1920 commits,
- version 140bec5c0c19 commits,
- version 133c20c09217 commits,
- version 129de1475b16 commits,
- version 11f77077de15 commits,
- version 107db29bc814 commits,
- version 9f0475a7813 commits,
- version 82970103312 commits,
- version 79128606e11 commits,
- version 6364f1de910 commits,
- version 54dc4b2509 commits,
- version 45a5fa92e7 commits,
- version 3443594b36 commits,
- version 2c3258dc65 commits,
- version 1b353c6174 commits,
- Side-by-side
- Inline