-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
core: add 'core' config section, add disabled_modules/enabled_modules, use in hpi modules and hpi doctor #85
Conversation
I think
I think enabled_modules and disabled_modules is good.
Would agree with this. For diff --git a/my/core/__main__.py b/my/core/__main__.py
index 6ba675b..4ce8fa6 100644
--- a/my/core/__main__.py
+++ b/my/core/__main__.py
@@ -171,10 +171,10 @@ def modules_check(args):
tb(e)
continue
- info(f"{color.GREEN}OK{color.RESET} : {m:<30}")
stats = getattr(mod, "stats", None)
if stats is None:
continue
+ info(f"{color.GREEN}OK{color.RESET} : {m:<30}")
from . import common
common.QUICK_STATS = False (which means if a module doesnt have stats and it loads properly, it prints nothing in hpi doctor) Not saying the For me currently:
Compare my hpi modules output to hpi doctor output (notice the I think the extension of that idea with the For Print whether or not modules are enabled/disabled, but show all of them. Currently seems like you ignore those, maybe, the
For
That way, if a module errors, it displays. But if a module loads properly and it has no stats, I think |
Thanks for the comments!
Yeah, I wasn't sure yet what to do with these -- basically the issue is that only a subset of Python files are HPI modules. Some I'll probably leave there (e.g.
Yep, I like it, good idea! I guess also allows to defer the decision how to detect HPI modules and non-modules. |
Yeah. By default it probably shouldn't show up? I think all files should be listed when you pass
Perhaps the concept of a 'marker' could also affect Currently, I see the markers as:
Yeah, automatically ignoring a base filepath in new modules a user might create feels wrong. Ignoring As long as the |
7eea6b7
to
4adc6e6
Compare
Yep, doesn't hurt. Implemented the way we discussed: if the module is suppressed, Also I actually went ahead and added |
… configs, use them for hpi modules and hpi doctor
(more of an intermediate solution perhaps)
4adc6e6
to
f53faa9
Compare
Example config:
hpi doctor
outputs:Happy for any comments. Mainly I'm not sure about:
core
config section -- hopefully makes sense?SKIP
by default (they are still sort of spammy, especially if you're only using just a few modules). Perhaps it's better to add a flag (e.g.--all
) and only output a summary by default (e.g. "20 modules skipped, use --all"