Feature to pass mutmut_config from custom path
Most often we run the mutmut on a custom path in the project. As far as I can see, at the moment the mutmut_config.py must be places inside the root of the path beeing analysed. On the other hand we want to use the same config file for all the paths we analyse. Currently, we have to copy the config file to all of the destinations.
It would be nice to have a flag to get the config file from a custom location.
If mutmut_config.py is available on the python path it will find it no matter where it is. Maybe this could be practical for you?
If
mutmut_config.pyis available on the python path it will find it no matter where it is. Maybe this could be practical for you?
Yup, that might work in my case. Is it anywhere in the docs? If not lets at least add it there
Strictly speaking I guess the docs should just be changed to say mutmut will try to load a module mutmut_config, instead of talking about a file. But maybe that's not explicit enough?
That's a nice way to put it. The extended instructions (I mean about .py file) can follow along.
It would still be nice to make the location of the mutmut_config module configurable.
On a recent PR, my partner asked that mutmut_config.py be moved out of our already crowded project root. while making it a folder is better mutmut_config/__init__.py I would prefer to be able to set the location in pyproject.toml, like mutmut_config: "scripts/dev/mutmut_config.py
@lundybernard as I said above: it doesn't need to be there, it just needs to be importable. So you can add any path to your pythonpath where that file is.