Open mikkonie opened 1 month ago
As with many return values of implementable plugin methods, expecting these as dictionaries offers a lot of chance for user error and ambiguity.
We should set up a class for app settings and expect definitions to take form of a list of objects instead of a dict.
This also allows us to place critical validation in the class __init__() to detect badly defined settings as early as possible.
__init__()
Providing app settings as a dict should be deprecated with warning in v1.1 and removed in v1.2.
Existing setting dicts within SODAR Core should be replaced with the class objects, of course.
As with many return values of implementable plugin methods, expecting these as dictionaries offers a lot of chance for user error and ambiguity.
We should set up a class for app settings and expect definitions to take form of a list of objects instead of a dict.
This also allows us to place critical validation in the class
__init__()
to detect badly defined settings as early as possible.Providing app settings as a dict should be deprecated with warning in v1.1 and removed in v1.2.
Existing setting dicts within SODAR Core should be replaced with the class objects, of course.