bkuczenski/synonym_dict

RESOLVED: "Unspecified" should be synonymous with the case in which "unspecified" was not specified

Closed this issue · 1 comments

In the current code compartment_manager.py, when creating a new compartment with a NONSPECIFIC_LOWER name like "Unspecified", the default behavior is to pre-pend the name of the parent compartment in the new compartment. E.g. add_compartments(('Furniture', 'unspecified')) will return a compartment named 'Furniture' and a subcompartment named 'Furniture, unspecified'.

Semantically, it is an error for "water, unspecified" to be distinct from "water" with nothing else specified.

Proposed solution is: when the incoming name is in NONSPECIFIC_LOWER, the synonymous name should be constructed as above but added as a synonym to the parent compartment, and no new compartment should be created.

This will require altering some tested behavior.