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

Initial commit for plugin internals refactor #763

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Schamper
Copy link
Member

@Schamper Schamper commented Jul 25, 2024

Initial commit for the plugin internals refactor. This removes a lot of slow and hard to understand code with (hopefully) faster and easier to understand code. Also fixes some consistency issues I came across while working on this.

There are some things I want to add, but I may do those in a separate PR:

  • Re-add support for Nested namespaces do not work #758 (it was lost in between version 2 and 3)
  • Add support for "plugin directories", similar to _os.py, but then _plugin.py or something similar (Add support for plugin directories #788)
  • Add helper functions for getting runtime information from functions, e.g. the class object, the record descriptor objects, etc. This will finally allow us to query plugins by e.g. ones that generate records that have a path field, for example.

This should also cover #759.

Closes #889.

@Schamper Schamper force-pushed the refactor-plugin-registration branch from bfa1029 to f4c1af4 Compare July 25, 2024 14:50
Copy link

codecov bot commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 85.64516% with 89 lines in your changes missing coverage. Please review.

Project coverage is 75.50%. Comparing base (6968253) to head (e830c4e).

Files Patch % Lines
dissect/target/plugin.py 88.73% 41 Missing ⚠️
dissect/target/target.py 74.64% 18 Missing ⚠️
dissect/target/tools/query.py 72.72% 12 Missing ⚠️
dissect/target/helpers/docs.py 85.36% 6 Missing ⚠️
dissect/target/plugins/general/plugins.py 86.84% 5 Missing ⚠️
dissect/target/tools/build_pluginlist.py 0.00% 3 Missing ⚠️
dissect/target/tools/utils.py 81.25% 3 Missing ⚠️
dissect/target/plugins/os/windows/registry.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #763      +/-   ##
==========================================
- Coverage   75.51%   75.50%   -0.02%     
==========================================
  Files         305      305              
  Lines       26348    26295      -53     
==========================================
- Hits        19897    19853      -44     
+ Misses       6451     6442       -9     
Flag Coverage Δ
unittests 75.50% <85.64%> (-0.02%) ⬇️

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.

@Schamper Schamper added plugin Related to a plugin core Related to a core component of dissect.target and removed plugin Related to a plugin labels Aug 5, 2024
@Schamper Schamper force-pushed the refactor-plugin-registration branch 2 times, most recently from 68299b4 to 84e83ea Compare August 5, 2024 15:11
@Schamper Schamper force-pushed the refactor-plugin-registration branch 3 times, most recently from 2192994 to 85f4ebc Compare August 8, 2024 13:37
@Schamper Schamper mentioned this pull request Aug 27, 2024
@Schamper Schamper force-pushed the refactor-plugin-registration branch from 85f4ebc to 43b0585 Compare August 27, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to a core component of dissect.target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor plugin internals
1 participant