Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #36 +/- ##
==========================================
+ Coverage 78.81% 78.84% +0.02%
==========================================
Files 15 16 +1
Lines 1284 1418 +134
==========================================
+ Hits 1012 1118 +106
- Misses 272 300 +28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3457f2c to
ddf1b35
Compare
bd439f9 to
01dec74
Compare
70ae493 to
4d1b6cb
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR improves the support for searching indexes by enhancing test coverage and refactoring the index, table, cursor, and BTree implementations. Key changes include new tests for index searching, replacing the use of Cursor with BTree in long value retrieval, and modifying parsing behavior for multi‐value tagged fields.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_table.py | Added tests for find_index with various column orders |
| tests/test_index.py | Updated index search tests to retrieve records and check values (including a change to the long binary test) |
| tests/test_cursor.py | Added tests for cursor navigation and search functionality |
| dissect/esedb/tools/sru.py | Minor formatting update in repr |
| dissect/esedb/table.py | Added properties/methods for primary_index, cursor, and find_index; switched to BTree for certain searches |
| dissect/esedb/record.py | Changed _parse_multivalue to return a list and raise an error for unrecognized flags |
| dissect/esedb/page.py | Updated repr formatting |
| dissect/esedb/index.py | Updated index flag usage and repr formatting |
| dissect/esedb/cursor.py | Refactored cursor implementation to rely on BTree and enhance search methods |
| dissect/esedb/c_esedb.py | Added new flag definitions for IDBFLAG and IDXFLAG |
| dissect/esedb/btree.py | Introduced a new BTree class for B+Tree navigation |
Comments suppressed due to low confidence (2)
tests/test_index.py:86
- The test for 'IxLongBinary' now expects a long binary value concatenated with 1000 bytes, instead of the previous 1024. Please confirm that this truncation is intended and update the test or underlying logic if necessary.
record = table.indexes[14].search(LongBinary=b"test long binary data " + (b"a" * 1000))
dissect/esedb/record.py:285
- Introducing an exception for unknown tag field flags changes existing behavior; please ensure that test coverage is provided for this new code path and that this change is compatible with existing data.
raise ValueError(f"Unknown flags for tag field: {tag_field}")
4d1b6cb to
d295381
Compare
|
I don't agree with most of your comments since those docstrings are talking about those topics in a more general form, not referring to any of those classes or implementations specifically. And most will be covered by argument and return type hinting being clickable in the docs. |
d295381 to
27390c5
Compare
27390c5 to
d51d52c
Compare
Fixes #35