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

WIP DO NOT MERGE - Y24-088 tuberacks epic into develop #4568

Open
wants to merge 50 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c89ec0b
feat(tube-rack-purposes): adds api support for tube rack purposes
BenTopping Sep 2, 2024
0ab4c64
Merge pull request #4314 from sanger/y24-098-tube-rack-banking-purpose
BenTopping Sep 17, 2024
bb8a687
added tables for specific tube rack creations classes
andrewsparkes Oct 10, 2024
a4bf1b3
modified asset links to allow for tube racks
andrewsparkes Oct 10, 2024
60c362e
set tube rack to unowned
andrewsparkes Oct 10, 2024
cfbe3fe
allowed for creation of tube racks from tube rack purpose
andrewsparkes Oct 10, 2024
163863e
WIP added specific tube rack model and v2 endpoint, still need to add…
andrewsparkes Oct 10, 2024
d3d6e53
added parents relationship to tube_rack_resource
andrewsparkes Oct 10, 2024
42c5def
linted
andrewsparkes Oct 10, 2024
88749c6
added tube creation and linking to specific tube rack creation v2 api…
andrewsparkes Oct 15, 2024
039188f
corrected relationships to resolve ambiguities between tube racks and…
andrewsparkes Oct 15, 2024
babd7ea
Merge branch 'develop' into y24-099-tube-rack-banking-sequencescape-api
andrewsparkes Oct 15, 2024
358ddc2
linted
andrewsparkes Oct 15, 2024
29b81d6
Merge branch 'develop' into y24-088-tuberacks-epic
andrewsparkes Oct 15, 2024
35d013c
Merge branch 'y24-088-tuberacks-epic' into y24-099-tube-rack-banking-…
andrewsparkes Oct 15, 2024
ae993f8
linted
andrewsparkes Oct 15, 2024
82e52b7
fixed factory
andrewsparkes Oct 15, 2024
ca6d654
fix code and test to use tuberack::purpose
andrewsparkes Oct 16, 2024
955df20
fixed prefix check in test
andrewsparkes Oct 16, 2024
def9d62
fix test ref to purpose model adding colons
andrewsparkes Oct 16, 2024
cdd3520
fix asset links for tube racks
andrewsparkes Oct 24, 2024
faab2b7
fix to select by barcode rather than uuid
andrewsparkes Oct 24, 2024
e5cf6d1
removed always include linkage due to json api client issue in Limber…
andrewsparkes Oct 25, 2024
4e1cb21
added additional associations, attributes and filters to match other …
andrewsparkes Oct 25, 2024
1b12a6e
added association for requests
andrewsparkes Oct 25, 2024
fff381a
added filter for name
andrewsparkes Oct 25, 2024
8ce7c6a
linted
andrewsparkes Oct 25, 2024
f078b47
rubocop
andrewsparkes Oct 25, 2024
81482b4
fixes after feedback
andrewsparkes Nov 13, 2024
3a32b7e
Merge branch 'develop' into y24-099-tube-rack-banking-sequencescape-api
andrewsparkes Nov 20, 2024
60ab5c2
moved tube rack barcode metadata key to config file in sequencescape …
andrewsparkes Nov 20, 2024
cfea5c1
linted
andrewsparkes Nov 20, 2024
72486b4
fixed factory
andrewsparkes Nov 21, 2024
5bfcdb1
added to test coverage and fixes to some code as a result
andrewsparkes Nov 22, 2024
50f3509
Merge branch 'develop' into y24-088-tuberacks-epic
andrewsparkes Nov 25, 2024
a1bf04a
Merge branch 'y24-088-tuberacks-epic' into y24-099-tube-rack-banking-…
andrewsparkes Nov 25, 2024
0fbb091
Merge pull request #4416 from sanger/y24-099-tube-rack-banking-sequen…
andrewsparkes Nov 27, 2024
af21d76
Merge branch 'develop' into y24-088-tuberacks-epic
andrewsparkes Nov 27, 2024
b512f2b
Merge branch 'y24-088-tuberacks-epic' of github.com:sanger/sequencesc…
andrewsparkes Nov 27, 2024
df91224
Merge branch 'develop' into y24-088-tuberacks-epic
andrewsparkes Dec 11, 2024
f3e46d2
ix failing tests
andrewsparkes Dec 17, 2024
f51502b
added tube locations method to tube rack model so accessible via api,…
andrewsparkes Jan 3, 2025
8f5e0ed
fixed tests for tube rack resource
andrewsparkes Jan 6, 2025
1e47105
added test for tube_locations method
andrewsparkes Jan 6, 2025
8da26e9
linted
andrewsparkes Jan 6, 2025
81fbf20
reverted attribute settings and removed unneeded getter for tube_loca…
andrewsparkes Jan 7, 2025
00ea2e7
removed unneeded test
andrewsparkes Jan 7, 2025
5d01699
removed duplicate relationship comments
andrewsparkes Jan 7, 2025
8eb2269
Merge pull request #4581 from sanger/y24-103-tuberack-presenter-tube-…
andrewsparkes Jan 8, 2025
e65234a
Merge branch 'develop' into y24-088-tuberacks-epic
andrewsparkes Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions app/controllers/api/v2/specific_tube_rack_creations_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

module Api
module V2
# Provides a JSON API controller for Specific Tube Rack Creations
# See: http://jsonapi-resources.com/ for JSONAPI::Resource documentation
class SpecificTubeRackCreationsController < JSONAPI::ResourceController
# By default JSONAPI::ResourceController provides most the standard
# behaviour, and in many cases this file may be left empty.
end
end
end
12 changes: 12 additions & 0 deletions app/controllers/api/v2/tube_rack_purposes_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

module Api
module V2
# Provides a JSON API controller for tube rack purposes.
# See: http://jsonapi-resources.com/ for JSONAPI::Resource documentation
class TubeRackPurposesController < JSONAPI::ResourceController
# By default JSONAPI::ResourceController provides most of the standard
# behaviour, and in many cases this file may be left empty.
end
end
end
7 changes: 6 additions & 1 deletion app/models/asset_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,24 @@ def destroy!
end

module Associations
# rubocop:disable Metrics/MethodLength
def self.included(base)
base.class_eval do
extend ClassMethods

has_dag_links link_class_name: 'AssetLink'
has_many :child_plates, through: :links_as_parent, source: :descendant, class_name: 'Plate'
has_many :child_tubes, through: :links_as_parent, source: :descendant, class_name: 'Tube'
has_many :child_plates, through: :links_as_parent, source: :descendant, class_name: 'Plate'
has_many :child_tube_racks, through: :links_as_parent, source: :descendant, class_name: 'TubeRack'
has_many :parent_tubes, through: :links_as_child, source: :ancestor, class_name: 'Tube'
has_many :parent_plates, through: :links_as_child, source: :ancestor, class_name: 'Plate'
has_many :parent_tube_racks, through: :links_as_child, source: :ancestor, class_name: 'TubeRack'
end
base.extend(ClassMethods)
end

# rubocop:enable Metrics/MethodLength

module ClassMethods
def has_one_as_child(name, scope) # rubocop:todo Metrics/MethodLength
plural_name = name.to_s.pluralize.to_sym
Expand Down
Loading
Loading