-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into y24-234-update-missing-event-history-records
- Loading branch information
Showing
73 changed files
with
1,152 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Deploy Yard to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
workflow_dispatch: | ||
|
||
permissions: | ||
pages: write # Allow writing to the GitHub Pages | ||
id-token: write # Allow OIDC token to be issued | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Generate Yard documentation | ||
run: | | ||
bundle exec yard doc | ||
- name: Upload artifact to GitHub Pages | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: doc # Path to the folder containing the Yard documentation (default is 'doc') | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build # The deploy job will only run if the build job is successful | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
14.40.0 | ||
14.41.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
app/controllers/api/v2/tag_group_adapter_types_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 TagGroup::AdapterType | ||
# See: http://jsonapi-resources.com/ for JSONAPI::Resource documentation | ||
class TagGroupAdapterTypesController < JSONAPI::ResourceController | ||
# By default JSONAPI::ResourceController provides most the standard | ||
# behaviour, and in many cases this file may be left empty. | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 TubeRackStatus | ||
# See: http://jsonapi-resources.com/ for JSONAPI::Resource documentation | ||
class TubeRackStatusesController < JSONAPI::ResourceController | ||
# By default JSONAPI::ResourceController provides most the standard | ||
# behaviour, and in many cases this file may be left empty. | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
# Links together two related tag groups - i7 and i5 - to represent a dual index tag set | ||
# It can also be used to represent single index tag sets | ||
# Background explained in Y24-170 (https://github.com/sanger/sequencescape/issues/4160) | ||
class TagSet < ApplicationRecord | ||
# For dual index tags, tag_group is i7 oligos and tag2_group is i5 oligos | ||
belongs_to :tag_group, class_name: 'TagGroup', optional: false | ||
belongs_to :tag2_group, class_name: 'TagGroup', optional: true | ||
|
||
# We can assume adapter_type is the same for both tag groups | ||
# But tag2_group may not be present so we delegate to tag_group | ||
delegate :adapter_type, to: :tag_group | ||
|
||
validates :name, presence: true, uniqueness: true | ||
validate :tag_group_adapter_types_must_match | ||
|
||
# Dynamic method to determine the visibility of a tag_set based on the visibility of its tag_groups | ||
def visible | ||
tag_group.visible && (tag2_group.nil? || tag2_group.visible) | ||
end | ||
|
||
# Method to determine that both tag groups have the same adapter type | ||
def tag_group_adapter_types_must_match | ||
return unless tag2_group && tag_group.adapter_type != tag2_group.adapter_type | ||
errors.add(:tag_group, 'Adapter types of tag groups must match') | ||
end | ||
|
||
def tag_group_name=(name) | ||
self.tag_group = TagGroup.find_by!(name: name) | ||
end | ||
|
||
def tag2_group_name=(name) | ||
self.tag2_group = TagGroup.find_by!(name: name) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.