contour icon indicating copy to clipboard operation
contour copied to clipboard

Refactor configuration file loading

Open christianparpart opened this issue 2 years ago • 0 comments
trafficstars

The current way of loading the config file has been incrementally growing, and thus, also its technical debt. It's time to clean the last(?) dark corner of the source code up.

Main design goals

  • [x] enable the user to have a minimal configuration file (all values should be defaulting)
  • [ ] easily maintainable config file syntax (stick with yaml for now?, later toml/...?)
  • [ ] allow generating website-documentation out of the config file's key definitions
  • [ ] allow easy upgrading, possible auto-updating config entries, if necessary/possible
  • [x] allow auto-constructing a full non-defaulting config file template
  • [ ] integrate auto-generated website into ghpages CI hook

Config file syntax

At first I think it should remain YAML, but i'm not hard-lining here. Later on the following come into my mind, iff it turns out to be an all-inclusive upgrade:

  • YAML: stick with it, known already, but some might not like forced indentation
  • TOML: looks like a mix of yaml and ini, so not too alienating, but easy to understand
  • LUA: do we really want to go for a more dynamic config language to be more powerful?

christianparpart avatar Oct 16 '23 12:10 christianparpart