update_saved_attributes: allow a different number of records per group
Each group can have a different number of records, and this is now handled by the function generate_config
.
For a new group, only the metadata is now added (no record). For a new motor or motor key of an existing group, None records will be added to match the existing number of records.
Unit tests were also added to check the insensitivity of the script to key ordering.