Skip to content

Make it easier to override config file basename #418

@bitprophet

Description

@bitprophet

This is technically a spinoff of #276; I don't see code about it in #278.

tl;dr right now the only way to change the <whatever>.yml (etc etc) sought by the config stuff is to manually subclass and modify Config, and then to modify a handful of spots annoyingly.

Config.__init__ allows overriding the various prefixes, but only individually, and it's moot because one cannot currently override those kwargs in Program - only the config_class!

This needs to be a lot easier:

  • Just change one spot and have that affect all the prefixes, so /etc/foobar.yml and ~/.foobar.yml and etc.
  • I don't see why we can't just use Program.name or whatever for this, either
  • May also want to add something like config_kwargs to Program in case users need to modify other kwargs and otherwise do not need to subclass; forced subclassing is inelegant and certainly was not my intention at the time.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions