Skip to content

Refactor config to use single-class tree model #5

@c1de0x

Description

@c1de0x

Refactor the config mechanism to use a single-class based tree model.

The class should allow

  • serialization/deserialization of the config tree to/from files
  • path based (dot and slash delimited) attribute lookup
  • 'duck typing' (non-schema values)
  • automagic python attribute lookup
  • a 'reconfigure' event, which allows subscribers to 'see' what changed, and perform actions based on the changes (e.g. modify backlog limits on the fly).
  • automatically fall back to attribute values in parent configs if a value is undefined at the current path level.
  • pretty print function

Perhaps the root of the tree should be global, although it'd probably be best if the root was injected into anything needing access to config data. One root per user, or one root with user children?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions