Skip to content

Refactor dissect.regf#32

Merged
Schamper merged 4 commits into
mainfrom
refactor
May 1, 2025
Merged

Refactor dissect.regf#32
Schamper merged 4 commits into
mainfrom
refactor

Conversation

@Schamper
Copy link
Copy Markdown
Member

Closes #31

@Schamper Schamper force-pushed the refactor branch 2 times, most recently from bf9159d to 4ebe406 Compare January 22, 2025 22:02
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 0% with 200 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (6681506) to head (45311c2).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dissect/regf/regf.py 0.00% 198 Missing ⚠️
dissect/regf/c_regf.py 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (6681506) and HEAD (45311c2). Click for more details.

HEAD has 14 uploads less than BASE
Flag BASE (6681506) HEAD (45311c2)
unittests 30 16
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #32       +/-   ##
==========================================
- Coverage   55.79%   0.00%   -55.80%     
==========================================
  Files           4       4               
  Lines         371     396       +25     
==========================================
- Hits          207       0      -207     
- Misses        164     396      +232     
Flag Coverage Δ
unittests 0.00% <0.00%> (-55.80%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors dissect.regf by updating file paths in tests, revising packaging metadata, and refactoring registry hive parsing. Key changes include:

  • Adjusting the file path used in the system hive fixture.
  • Revising the pyproject.toml license configuration and ruff version.
  • Refactoring examples/walkhive.py and the internal C structure definitions in dissect/regf/c_regf.py.

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/conftest.py Updated SYSTEM file path in the system_hive fixture.
tests/_docs/conf.py Added project configuration for Sphinx documentation.
pyproject.toml Revised license settings, updated ruff required version, and removed obsolete setuptools block.
examples/walkhive.py Replaced file I/O with pathlib and refactored registry hive iteration.
dissect/regf/c_regf.py Refactored internal C structure definitions for registry hive parsing.
Files not reviewed (1)
  • tox.ini: Language not supported
Comments suppressed due to low confidence (3)

pyproject.toml:94

  • Ensure that the removal of the [tool.setuptools] block is deliberate, and that all necessary packaging metadata is properly configured in its absence.
-[tool.setuptools]

examples/walkhive.py:16

  • [nitpick] The use of 'cell.cell' is ambiguous; consider renaming the property to a more descriptive name (e.g. 'data' or 'value') for improved clarity.
print(hex(offset), "+" if allocated else "-", cell.name, cell.cell)

tests/conftest.py:24

  • Please verify that changing the file path from "data/SYSTEM.gz" to "_data/SYSTEM.gz" is intentional, as it may affect file lookup.
yield from open_file_gz("_data/SYSTEM.gz")

Copy link
Copy Markdown
Member

@Horofic Horofic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sidenote: Currently, dissect.target (regutil.py) is not compatible anymore. We should be aware of this before merging this in.

Edit: created an issue in dissect.target for tracking (fox-it/dissect.target#1130)

Comment thread dissect/regf/regf.py Outdated
Comment thread dissect/regf/regf.py
Comment thread dissect/regf/regf.py Outdated
Comment thread dissect/regf/regf.py Outdated
Schamper and others added 2 commits May 1, 2025 14:09
Co-authored-by: Stefan de Reuver <9864602+Horofic@users.noreply.github.com>
Co-authored-by: Stefan de Reuver <9864602+Horofic@users.noreply.github.com>
@Schamper Schamper requested a review from Horofic May 1, 2025 12:09
Horofic
Horofic previously approved these changes May 1, 2025
@Schamper Schamper merged commit 3ecb4c7 into main May 1, 2025
20 of 22 checks passed
@Schamper Schamper deleted the refactor branch May 1, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor dissect.regf

3 participants