UC-Davis-molecular-computing / scadnano-python-package

Python scripting library for generating designs readable by scadnano.
https://scadnano.org
MIT License
13 stars 7 forks source link

remove field `Modification.id` #281

Closed dave-doty closed 11 months ago

dave-doty commented 12 months ago

Scadnano uses Modification.id as a unique identifier for modifications.

The web interface, for simplicity, hides this field from the user, and if they create a new modification, the field Modification.vendor_code is used also as the id.

However, any reasonable vendor code will already be unique to a particular type of modification. Thus it seems we don't really need the field id, and we can just use the vendor code everywhere as the unique identifier for the modification.

Codify this by removing the field id and just use vendor_code where id is currently used.

dave-doty commented 12 months ago

Release notes

Field Modification.id removed

Previously, scadnano uses Modification.id as a unique identifier for modifications.

The web interface, for simplicity, hides this field from the user, and if they create a new modification, the field Modification.vendor_code (previously named idt_text) is used also as the id.

However, any reasonable vendor code will already be unique to a particular type of modification.

The field id has been removed. Now, the field vendor_code where id was previously used.

Previously, if no id was specified, but vendor_code/idt_text was, then id was set to the latter. Such code should continue to work unmodified. But code referencing id should now refer to vendor_code instead. Additionally, if a script used the same vendor_code for different Modifications, then this will break. Each Modification should now have a unique vendor_code field.