python-configuration icon indicating copy to clipboard operation
python-configuration copied to clipboard

[Investigation] Limitations of python-configuration that prevent others from adopting it.

Open movermeyer opened this issue 4 years ago • 6 comments

I've recently been writing a configuration-loading system for a new library. I was copying the system used by coverage-py. Now that I've stumbled upon python-configuration and I wonder if it might be a better solution.

I'm writing this issue to document what I've discovered, which might give ideas for the future direction of python-configuration.


coverage-py loads its configuration from a hierarchy of locations, including locations in some shared config files (eg. setup.cfg, tox.ini, pyproject.toml).

A few things make their config loading needs different from what ConfigurationSet currently offers:

  • The keys in INI/toml files must have a specific prefix/namespace (coverage:), in order to avoid colliding with the keys of other libraries in the shared config file
  • Once a file is found that contains relevant keys, no other files are considered.
  • Missing files are ignored
  • Configuration options are defined in a schema:
    • Values can have types
    • Unknown keys are raised as exceptions
    • They also have custom type definitions and handlers to parse/convert/deserialize them.

See their documentation or the source for details.

movermeyer avatar Feb 15 '21 16:02 movermeyer

@tr11 , what are you plans on maintaining this library going forward?

@movermeyer , are you interested in forking and co-maintaining with myself if we don't hear back?

chinghwayu avatar May 28 '21 17:05 chinghwayu

@chinghwayu Have you managed to hear back from @tr11 ? Let's not fork unless absolutely necessary.

Unfortunately, I don't have much time to help (I'm already committed to too many other projects right now). I could do some initial help to get things set up initially, but someone else would have to be the primary maintainer / coder.

movermeyer avatar Aug 06 '21 15:08 movermeyer

@movermeyer haven't heard back

chinghwayu avatar Aug 17 '21 23:08 chinghwayu

Hey guys, my apologies for the delay getting back to you. Things were a bit crazy at work, but I'm back at actively using and maintaining it.

tr11 avatar Sep 02 '21 17:09 tr11

Great to have you back. Can you push out a release with the recent merges?

chinghwayu avatar Sep 03 '21 00:09 chinghwayu

Will do! Just need to figure out what's missing on the tests side now to get full coverage

tr11 avatar Sep 05 '21 17:09 tr11