-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: element vessel api and UI #2235
base: main
Are you sure you want to change the base?
Conversation
@@ -221,6 +224,9 @@ class CollectionAPI < Grape::API | |||
cell_lines = CelllineSample.by_collection_id(@cid) | |||
.by_ui_state(params[:elements_filter][:cell_line]) | |||
.for_user_n_groups(user_ids) | |||
vessels = Vessel.by_collection_id(@cid) | |||
.by_ui_state(params[:elements_filter][:vessel]) |
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.
Layout/MultilineMethodCallIndentation: Align .by_ui_state
with .by_collection_id
on line 227.
@@ -221,6 +224,9 @@ class CollectionAPI < Grape::API | |||
cell_lines = CelllineSample.by_collection_id(@cid) | |||
.by_ui_state(params[:elements_filter][:cell_line]) | |||
.for_user_n_groups(user_ids) | |||
vessels = Vessel.by_collection_id(@cid) | |||
.by_ui_state(params[:elements_filter][:vessel]) | |||
.for_user_n_groups(user_ids) |
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.
Layout/MultilineMethodCallIndentation: Align .for_user_n_groups
with .by_collection_id
on line 227.
@@ -134,6 +134,7 @@ class ProfileAPI < Grape::API | |||
'screen' => 4, | |||
'research_plan' => 5, | |||
'cell_line' => -1000, | |||
'vessel' => -1100, |
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.
Metrics/ClassLength: Class has too many lines. [213/200]
# frozen_string_literal: true | ||
|
||
module Chemotion | ||
class VesselAPI < Grape::API |
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.
Metrics/ClassLength: Class has too many lines. [221/200]
Entities::VesselInstanceEntity.represent( | ||
vessel, | ||
displayed_in_list: true, | ||
# detail_levels: ElementDetailLevelCalculator.new(user: current_user, element: cell_line_sample).detail_levels, |
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.
Layout/LineLength: Line is too long. [124/120]
@@ -0,0 +1,12 @@ | |||
|
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.
Style/FrozenStringLiteralComment: Missing frozen string literal comment.
@@ -0,0 +1,12 @@ | |||
|
|||
module Entities |
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.
Layout/LeadingEmptyLines: Unnecessary blank line at the beginning of the source.
@@ -30,6 +30,12 @@ class ProfileAPI < Grape::API | |||
data[ll.to_s] = layout[ll] if layout[ll].present? && data[ll.to_s].nil? | |||
end | |||
|
|||
if (element_list = layout.dig(:layout)) |
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.
Metrics/ClassLength: Class has too many lines. [218/200]
@@ -30,6 +30,12 @@ class ProfileAPI < Grape::API | |||
data[ll.to_s] = layout[ll] if layout[ll].present? && data[ll.to_s].nil? | |||
end | |||
|
|||
if (element_list = layout.dig(:layout)) |
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.
Style/SingleArgumentDig: Use layout[:layout]
instead of layout.dig(:layout)
.
element_list.each do |element, sorting| | ||
data['layout'][element.to_s] = sorting if data['layout'][element.to_s].nil? | ||
end | ||
end |
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.
Layout/EndAlignment: end
at 37, 7 is not aligned with if
at 33, 8.
rather 1-story 1-commit than sub-atomic commits
commit title is meaningful => git history search
commit description is helpful => helps the reviewer to understand the changes
code is up-to-date with the latest developments of the target branch (rebased to it or whatever) => ⏩-merge for linear history is favoured
added code is linted
tests are passing (at least locally): we still have some random test failure on CI. thinking of asking spec/examples.txt to be commited
in case the changes are visible to the end-user, video or screenshots should be added to the PR => helps with user testing
testing coverage improvement is improved.
CHANGELOG : add a bullet point on top (optional: reference to github issue/PR )
parallele PR for documentation on docusaurus if the feature/fix is tagged for a release