feat(DEV-19) setup comprehensive configuration system
Description
Add configuration system that allows the user to easily create and update configuration files and exposes a programmatically visible schema for configuration.
References
Changes:
- in sila-python convert typedDicts -> dataclasses (ServerConfig and CloudServerConfig)
- removed
.envsupport for connector configuration. - removed
connector startCLI arguments for overriding.envconfig values. - created new base class for configs --
ConnectorBaseConfigwhich allows for one extending subclass to be declared
Implementations:
https://gitlab.com/unitelabs/connectors/kern-ds/-/merge_requests/8 (up-to-date; contains examples of config.json and schema.json)
unitelabs/connectors/bluesens!18 (up to date)
https://gitlab.com/unitelabs/connectors/qinstruments-bioshake/-/merge_requests/5 (up-to-date)
https://gitlab.com/unitelabs/connectors/file-system/-/merge_requests/12 (up-to-date)
Documentation:
https://gitlab.com/unitelabs/web/docs/-/merge_requests/42
Connector-Factory:
updated documentation for connectors and base implementation of connector configuration.
Testing:
-
config create- CLI to create a new config file at the default location./config.json -
config schema- CLI to create a jsonschema of the configuration -
config show- CLI to visualize the config -
certificate generate- CLI adjusted to accept a config file, or run on a config file in the default location. Should prompt the user about updating the config file, while also allowing the generation of certificates without a config file.
Checklist
-
I have read and accept the Contributor Agreement
Edited by Desiree Davison