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

Y24-218 - Create a new tag set model to link tag groups #4236

Closed
10 tasks
yoldas opened this issue Jul 26, 2024 · 3 comments · Fixed by #4273
Closed
10 tasks

Y24-218 - Create a new tag set model to link tag groups #4236

yoldas opened this issue Jul 26, 2024 · 3 comments · Fixed by #4273
Assignees
Labels
Dual Index Tags Size: S Small - low effort & risk

Comments

@yoldas
Copy link
Member

yoldas commented Jul 26, 2024

User story
As PSD, we would like to create a new data model to link tag groups (indexes) of the same tag sets together in order to support selection of the pair of i7 and i5 tag groups for dual indexed tag sets together and unify access to single and dual indexed tag sets. This data model aims keeping the internal tag group model intact while providing support for a unified access to the tag groups at interfacing.

Who are the primary contacts for this story
Abdullah, Andrew, Katy, Neil

Who is the nominated tester for UAT
PSD

Acceptance criteria
To be considered successful the solution must allow:

  • Add a TagSet model to link TagGroups.
  • Add name field to TagSet. Ideally, the name will match the kit provider specified names. For example,
    • Single index tag sets should have a name like
      PN-1000212 Single Index Kit N, Set A . It can link TagGroup with the same name.
    • Dual index tag sets should have a name like PN-1000215/PN-3000431 Dual Index Kit TT, Set A . It can link TagGroups with names suffixed with (i7) and (i5).
  • Add a tag_group and tag2_group fields (associations). The following are the association names on TagSet to its TagGroups, following the same conventions in Sequencescape.
    • tag_group:
      • the only group for single indexed tag sets and
      • the first group for dual indexed tag sets (i7)
    • tag2_group:
      • null for single indexed tag sets
      • the second group for dual indexed tag sets (i5).
  • TagGroups can be soft-deleted by setting visibility flag on them. A TagSet should be visible if its tag groups are visible.
  • Model allows creating custom tag sets with mix of unrelated or custom tag groups.
  • Validate that adapter type of tag groups of a tag set are equal.
  • Assuming adapter type will be the same for both tag groups of a dual index tag set, provide a method to return the first adapter type of its tag groups.
  • Provide a method to return visibility for a tag set by checking the visibility of its tag groups.
  • Associations and integrity. Tag groups are soft-deleted only, which is covered above. The following criteria are to make sure tag sets and tag group records can exist independently. Ensure there is no cascading deletes such as dependent: :destroy
    • If the tag set is deleted, its tag group(s) should NOT be deleted
    • If a tag group is deleted, its tag set(s) should NOT be deleted .

Dependencies
This story is blocked by the following dependencies:

References
This story has a non-blocking relationship with:
See links in the parent research story.

Additional context
This simple model can co-exists and reuses the existing models, records, and operations in Sequencescape and Limber; hence allows changing for interfaces, queries, and UI elements without breaking existing models.

Linking existing TagGroup records in DB is covered in another story. See links in the parent research story.

Not adding a flag to explicitly specify if a tag set is single indexed or dual indexed; Rely on availability of tag_group and tag2_group associations on the tag set for now to keep it simple.

Adapter type can stay as tag group field. For dual indexed tag sets, both tag groups have the same adapter type, which is set when creating tag groups. [Tag set should return the first adapter type of its tag groups with the assumption that the adapters of its tag groups will be the same. Add a validation to enforce that]

Visible column: Tag set will find its visibility by checking the visibility of tag groups [Tag set will be visible if all of its tag groups are visible]

@psd-issuer psd-issuer bot changed the title placeholder - dual index - model story Y24-218 - placeholder - dual index - model story Jul 26, 2024
@yoldas yoldas changed the title Y24-218 - placeholder - dual index - model story Y24-218 - Create a new tag set model to link tag groups together Jul 26, 2024
@yoldas yoldas changed the title Y24-218 - Create a new tag set model to link tag groups together Y24-218 - Create a new tag set model to link tag groups Jul 26, 2024
@yoldas yoldas added Dual Index Tags Size: S Small - low effort & risk labels Jul 26, 2024
@KatyTaylor
Copy link
Contributor

Thinking about details like dependent: :destroy on the associations...

  • If the tag set is deleted, its tag group(s) should NOT be deleted
  • If a tag group is deleted, its tag set(s) should NOT be deleted (or, delete the tag set if it is left with no associated tag groups? But this becomes complicated if you're deleting both tag groups in one transaction?)

@neilsycamore
Copy link
Contributor

@KatyTaylor we have not in the past deleted tag groups preference has been to use the visibility flag

@yoldas
Copy link
Member Author

yoldas commented Jul 29, 2024

Thinking about details like dependent: :destroy on the associations...

  • If the tag set is deleted, its tag group(s) should NOT be deleted
  • If a tag group is deleted, its tag set(s) should NOT be deleted (or, delete the tag set if it is left with no associated tag groups? But this becomes complicated if you're deleting both tag groups in one transaction?)

I have assumed neither tag sets nor tag groups can be deleted. Tag groups can only be "soft-deleted" by setting visibility flag. I tied the visibility of tag set to visibility of its tag groups. I have added two criteria as associations and integrity now.

@yoldas yoldas added Size: M Medium - medium effort & risk and removed Size: S Small - low effort & risk labels Jul 30, 2024
@yoldas yoldas added Size: S Small - low effort & risk and removed Size: M Medium - medium effort & risk labels Aug 6, 2024
@BenTopping BenTopping self-assigned this Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dual Index Tags Size: S Small - low effort & risk
Projects
None yet
5 participants