Skip to content
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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

258 remove strand groups #259

wants to merge 16 commits into from

Conversation

lia-n2
Copy link

@lia-n2 lia-n2 commented Apr 24, 2024

No description provided.

@@ -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'
Copy link
Member

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)

@@ -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.
Copy link
Member

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'
Copy link
Member

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,
Copy link
Member

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}
Copy link
Member

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)
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants