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

Add support for plugin directories #788

Open
wants to merge 3 commits into
base: refactor-plugin-registration
Choose a base branch
from

Conversation

Schamper
Copy link
Member

@Schamper Schamper commented Aug 5, 2024

General idea is that you create your plugin in a file called _plugin.py in a certain directory. That directory can then hold other files such as specific helpers. The plugin path/name is then derived from the directory path up until the module name, instead of including it.

For example:

apps/something/myapp
- _plugin.py
- helpers.py

The plugin will register under the apps.something.myapp path.

Closes #890.

@Schamper Schamper force-pushed the refactor-plugin-registration branch from 84e83ea to 2ea8410 Compare August 8, 2024 13:11
@Schamper Schamper force-pushed the refactor-plugin-registration branch from 2ea8410 to 2192994 Compare August 8, 2024 13:13
@Schamper Schamper marked this pull request as ready for review August 8, 2024 13:13
@Schamper Schamper force-pushed the refactor-plugin-registration branch from 2192994 to 85f4ebc Compare August 8, 2024 13:37
@Schamper Schamper added the core Related to a core component of dissect.target label Aug 8, 2024
Copy link

codecov bot commented Aug 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.43%. Comparing base (85f4ebc) to head (34b3e4d).

Additional details and impacted files
@@                      Coverage Diff                      @@
##           refactor-plugin-registration     #788   +/-   ##
=============================================================
  Coverage                         75.43%   75.43%           
=============================================================
  Files                               296      296           
  Lines                             25591    25593    +2     
=============================================================
+ Hits                              19305    19307    +2     
  Misses                             6286     6286           
Flag Coverage Δ
unittests 75.43% <100.00%> (+<0.01%) ⬆️

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 force-pushed the refactor-plugin-registration branch 2 times, most recently from 43b0585 to e830c4e Compare August 27, 2024 14:56
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.

1 participant