Create a new scanner module and move functions from crawl module there
-
Review changes -
-
Download -
Patches
-
Plain diff
Summary
Refactoring of the crawler and scanner:
- I basically split the crawler into two parts:
- Scanner module that walks through the file system and other structure elements and collects all the information into record types.
- The crawler module (crawl.py) does everything else which needs a CaosDB interaction.
The main steps in refactoring were:
- Extraction of the functions related only to the scanning process.
- Slight renaming and consistency checks.
- Adapting all the tests to the new structure.
Left TODO:
-
Fixing the integration tests
Focus
The best procedure for the review probably is to go through the individual commits. I tried to keep them as fine-grained as possible. Fixing the tests actually was very repetitive, because the API was changed slightly.
There is one thing that might be solved not completely ideal:
- Setting of the runid and the crawled_directory attributes. These are member variables that were previously set by functions now contained in the independent scanner module. This might need some cross-checking with @henrik who probably introduced these variables for logging.
Test Environment
Unittests
I did not run the integration tests manually, but this is probably done by the pipeline.
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 29ffd237fe
- version 28365928c1
- version 27221345d0
- version 261350a6ad
- version 25600ce5b8
- version 24cd8c3bfe
- version 238ce6b1ea
- version 22ecbc8995
- version 215ce11a74
- version 208834d29f
- version 196d8e1fca
- version 1838286fc4
- version 176e7a2eba
- version 16e2543b35
- version 15e3bc51fc
- version 14a49b4404
- version 13dbeea36b
- version 1231614d82
- version 1173d87184
- version 10bae8cfa2
- version 973b06ec0
- version 8ee67ec55
- version 77e111959
- version 6ef8d6f66
- version 51aeaa359
- version 4f1636f29
- version 350a18727
- version 247ea54d8
- version 12fdacd93
- dev (base)
- latest version3828e51c49 commits,
- version 29ffd237fe48 commits,
- version 28365928c147 commits,
- version 27221345d039 commits,
- version 261350a6ad36 commits,
- version 25600ce5b835 commits,
- version 24cd8c3bfe34 commits,
- version 238ce6b1ea33 commits,
- version 22ecbc899532 commits,
- version 215ce11a7431 commits,
- version 208834d29f30 commits,
- version 196d8e1fca29 commits,
- version 1838286fc428 commits,
- version 176e7a2eba27 commits,
- version 16e2543b3526 commits,
- version 15e3bc51fc25 commits,
- version 14a49b440424 commits,
- version 13dbeea36b23 commits,
- version 1231614d8222 commits,
- version 1173d8718421 commits,
- version 10bae8cfa219 commits,
- version 973b06ec018 commits,
- version 8ee67ec5517 commits,
- version 77e11195916 commits,
- version 6ef8d6f6615 commits,
- version 51aeaa35914 commits,
- version 4f1636f2912 commits,
- version 350a1872711 commits,
- version 247ea54d810 commits,
- version 12fdacd933 commits,
- Side-by-side
- Inline