python-hunter
python-hunter copied to clipboard
Predefined trace configurations
Have a set of predefined configurations + actions for common situations like:
- Django (views, queries etc)
- Sockets
- File operations (is it even possible?)
- You tell me.
I think it would be great if we can have some configuration files (at both user and project level) to specify hunter configuration for the user/project, in addition to those specified in runtime (like flake8
's configuration structure).
For example, I have some common libs like numpy
, pandas
, matplotlib
pre-loaded in ipython's config. So almost always I would like to exclude those, plus the libs that ipython itself uses. This leads to something like:
h.trace(~Q(kind='line'),
~Q(module_in=['six', 'pkg_resources', 'autoreload']),
~Q(module_startswith=['IPython', 'prompt_toolkit', 'traitlets', 'wcwidth',
'matplotlib', 'pygments', 'numpy', 'fields',
'hunter', 'colorama', 'scipy']),
~Q(filename=''), stdlib=False)
to be typed for every session.
I need to ignore everything installed in my virtualenv except for my project files.