MatterMiners/cobald

Add programmatic configuration schemas

Open

#84 opened on Feb 19, 2021

 (0 comments) (0 reactions) (1 assignee)Python (13 forks)auto 404
enhancementhelp wantedusability

Repository metrics

Stars
 (11 stars)
PR merge metrics
 (PR metrics pending)

Description

The configuration is currently treated as a blob of raw YAML/JSON equivalent data. This makes validation and error reporting difficult, as keys/values are checked on usage.

cobald should provide means to define expected schemas for configuration. This would allow to efficiently detect and report errors. Schemas would also allow to generated documentation; this is not required for the base functionality.
Schemas perhaps should (allow to) be automatically generated from the objects taking the configuration.

Related issues:

External packages:

  • The pydantic package for validating runtime types based on annotations.

Contributor guide