Port --custom_artifacts_path from iLEAPP for loader parity#939
Merged
Conversation
Ports iLEAPP's plugin loader and CLI option so additional artifact directories can be loaded on demand (e.g. scripts/alternate_artifacts): - scripts/plugin_loader.py: verbatim copy of iLEAPP's loader — PluginLoader(plugin_paths=[...]) accepts a list of directories, lazy module names are namespaced by parent folder, duplicate keys within one folder still raise, and a duplicate key from an alternate folder overrides the standard one with an informational message - aleapp.py: new --custom_artifacts_path option; loader construction moved after parse_args (nothing used it earlier); default behavior is unchanged - aleapp.py: pre-existing pylint warnings resolved so the file passes the CI lint gate (encoding on path_list.txt, f-string/comment fixes, targeted inline disables for the long-standing wildcard imports and except blocks — no behavior changes) Verification (no regressions): - loaded plugin set byte-identical to main (583 plugins: module, name, category and search patterns compared) - full run on a test zip: completed-artifact set identical to main - run with --custom_artifacts_path pointing at an external folder loads exactly the additional artifacts - admin tests pass (test_artifact_imports, test_dependency_compatibility) - no-arg PluginLoader() unchanged for aleappGUI.py - -p path list generation works - pylint --disable=C,R at 10.00 for both touched files
abrignoni
added a commit
that referenced
this pull request
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports iLEAPP's
--custom_artifacts_pathCLI option and multi-path plugin loader to ALEAPP, so additional artifact directories (e.g.scripts/alternate_artifactsfrom #938) can be loaded on demand without touchingscripts/artifacts/. Companion to #938 and abrignoni/batch-leapp#2 — with this, batch-leapp enables the App Inventory artifacts via a flag instead of staging a file into the checkout.Changes
PluginLoader(plugin_paths=[...])takes a list of directories (defaults to[PLUGINPATH]), lazy module names are namespaced by parent folder, duplicate keys within one folder still raise, duplicates from an alternate folder override the standard artifact with an info message. The PyInstaller hook is already identical between the repos.parse_args()(nothing referenced the loader before that point). Also brings the file to pylint 10.00 for the CI changed-files gate: encoding on thepath_list.txtopen, two f-string/comment cleanups, and targeted inline disables for the long-standing wildcard imports and except blocks — no behavior changes.No-regression verification
--custom_artifacts_pathpointing at an external folder loads exactly the 3 additional artifacts (586 total), which write their LAVA tables correctlypython3 -m unittestadmin tests pass (test_artifact_imports,test_dependency_compatibility)PluginLoader()unchanged (aleappGUI.py path)-partifact path list generation works (772 patterns)PYTHONPATH=. pylint --disable=C,R aleapp.py scripts/plugin_loader.py→ 10.00