sourcery icon indicating copy to clipboard operation
sourcery copied to clipboard

Allow for more than one sourcery settings file

Open scottmc42 opened this issue 2 years ago • 0 comments

Checklist

  • [X] This is a new feature, not a refactoring suggestion
  • [X] I have checked for this feature in the Sourcery documentation
  • [X] I have checked there are no open requests referencing the same feature

Description

It would be helpful if we could have settings across multiple locations. For instance, I would put global settings in the ~/.config/sourcery/sourcery.yaml file. Then within a project have different (as is more fine-tune, or overwrite existing) settings.

For instance, the rule_settings > python_version would be globally to the system version of python. But with virtual environments, that value may or may not be correct.

I would also turn the coding_assistant off by default (some projects forbid generative AI) and only enable it in projects that would allow such things.

Currently, once the ~/.config/sourcery/sourcery.yaml file is read, it does not read the .sourcery.yaml from the top-level of a project so there is no way to have multiple configurations.

scottmc42 avatar Nov 07 '23 00:11 scottmc42