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

custom collectors with underscore in name are not supported #34

Closed
cmeissner opened this issue Apr 15, 2021 · 0 comments
Closed

custom collectors with underscore in name are not supported #34

cmeissner opened this issue Apr 15, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@cmeissner
Copy link
Member

Describe the bug
If I want to create a controller with a underscore in the file name this is not working fully properly. It is loaded by the configuration for that controller is not loaded.

To Reproduce
Steps to reproduce the behavior:

  1. create a customer collector p3exporter/collector/my_example.py
  2. create class MyExampleCollector in my_example
  3. activate collector in p3.yml
  4. put some configuration in collector_opts for your collector
  5. collector_opts will not be loaded correctly

Expected behavior
All configuration defined under collector_opts.my_example should be accessable in self.opts

Versions:

  • python
    3.9.4

Additional context

I think that collector_name_from_class within CollectorBase needs to be adapted to solve that issue.

@cmeissner cmeissner added the bug Something isn't working label Apr 15, 2021
cmeissner added a commit to cmeissner/p3exporter that referenced this issue Apr 15, 2021
With this fix camelized collector names like `FooBarBazCollector` will
lead to module name `foo_bar_baz`.
Adapt docstring to reflect the new behavior. This change is a
non-breaking one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant