datajoint-python
datajoint-python copied to clipboard
prohibit custom fields in `dj.config`
Currently, dj.config allows users to add new fields in dj.config. This works fine but sometimes leads to errors when a standard field is misspelled. I propose to designate a single field, dj.config['user'] or dj.config['custom'] to keep all custom user fields and prohibit the user from adding any non-sanctioned keys to dj.config.
To clarify, you mean a single field that can contain multiple other fields, right, like dj.config['user']['parameter_1'] and dj.config['user']['parameter_2']?
yes
How much of a pain point will introducing such a constraint be to users with existing custom fields in dj.config?
some. The error message will state the following
Since version 0.12.1 datajoint.config requires that any custom
configuration parameters must be placed under datajoint.config['user'].