doit icon indicating copy to clipboard operation
doit copied to clipboard

create class variable to hold config file entries prefix

Open castalheiro opened this issue 2 years ago • 1 comments

I intend to customize the configuration file entries prefix (e.g.tool.myapp.tasks.make_cookies instead of tool.doit.tasks.make_cookies). However, there is no global setting to replace all "doit" references with my own application name. Therefore i ended up creating a class variable that i can later modify without having to subclass DoitMain and DoitConfig classes.

This documentation page (https://pydoit.org/configuration.html#tool-doit-tasks) provides an example of the default setting.

castalheiro avatar Mar 05 '22 17:03 castalheiro

Hey, this is a good use-case.

Right now the code assumes tool.doit prefix for pyproject.toml and no prefix for other names of TOML files... Since we are making the prefix configurable it would be better to make it configurable on every case (whatever TOML file name).

Are you sub-classing DoitMain? I would think it makes more sense to make the configuration by changes in DoitMain instead of DoitConfig.

schettino72 avatar Mar 06 '22 12:03 schettino72