strands-project/strands_qsr_lib

[QSRs] Drop `qsr_type` and refactor `qsr_keys` to `unique_id` (or smth in these lines)

Closed this issue · 3 comments

Refactor qsr_type to longname and qsr_keys to shortname.

Why do we need both? Don't they both have to be unique? If no, I suggest something like qsr_unique_identifier instead of longname just to make clear that it has to be.

TL;DR: We don't anymore; and don't mind if we keep one of the two (probably the shortname makes more sense nowadays).

It started with long name but then we have been using them with shornames and via dictionary remapping everytime. The shortname was introduced necessary for future as having the long name as key would be fairly masohistic.

Now, the benefit of long name is that it is easier to find a unique name and more descriptive. Shortnames are easier to type and they still have to be unique. In terms of memory adding an extra string per QSR is hardly an issue. Could be claimed that it is for information, but this is what the docstring about; then again I like seeing them printed out in the QSRlib startup.

qsr_unique_identifier instead of longname

Yes, good idea with including unique in the name, unique_name or unique_id is shorter and serves teh same purpose ;).