-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
258 remove strand groups #259
base: main
Are you sure you want to change the base?
Conversation
…lib-histogram-of-nearest-neighbor-energies closes #255 matplotlib histogram of nearest neighbor energies
nuad/constraints.py
Outdated
@@ -72,7 +72,7 @@ | |||
domain_pools_num_sampled_key = 'domain_pools_num_sampled' | |||
domain_names_key = 'domain_names' | |||
starred_domain_indices_key = 'starred_domain_indices' | |||
group_key = 'group' | |||
group_key = 'label' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should just remove the field group
(and the constant group_key
)
nuad/constraints.py
Outdated
@@ -2169,7 +2169,8 @@ def evaluate(seqs: Tuple[str, ...], | |||
@dataclass | |||
class VendorFields(JSONSerializable): | |||
"""Data required when ordering DNA strands from a synthesis company such as | |||
`IDT (Integrated DNA Technologies) <https://www.idtdna.com/>`_. | |||
`IDT (Integrated DNA Technologies) <https://www. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this URL got messed up.
@@ -2247,7 +2248,7 @@ def _check_vendor_string_not_none_or_empty(value: str, field_name: str) -> None: | |||
raise ValueError(f'field {field_name} in VendorFields cannot be empty') | |||
|
|||
|
|||
default_strand_group = 'default_strand_group' | |||
default_strand_label = 'default_strand_label' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have a default label since it is an optional field
name: str | None = None, | ||
label: str | None = None, | ||
label: str = default_strand_label, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label should be optional
@@ -2526,7 +2520,7 @@ def to_json_serializable(self, suppress_indent: bool = True) -> NoIndent | Dict[ | |||
Dictionary ``d`` representing this :any:`Strand` that is "naturally" JSON serializable, | |||
by calling ``json.dumps(d)``. | |||
""" | |||
dct: Dict[str, Any] = {name_key: self.name, group_key: self.group} | |||
dct: Dict[str, Any] = {name_key: self.name, label_key: self.label} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only include label_key
if the label is not None
@@ -3078,7 +3069,7 @@ class Design(JSONSerializable): | |||
Computed from :data:`Design.strands`, so not specified in constructor. | |||
""" | |||
|
|||
strands_by_group_name: Dict[str, List[Strand]] = field(init=False) | |||
strands_by_label_name: Dict[str, List[Strand]] = field(init=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want this field.
No description provided.