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

Samples Table: Determine query type #873

Merged
merged 15 commits into from
Dec 20, 2024
Merged

Conversation

ChrisHuynh333
Copy link
Collaborator

@ChrisHuynh333 ChrisHuynh333 commented Dec 17, 2024

What does this PR do and why?

This PR adds the framework to determine whether the samples table loads samples via ransack (simple default page load, simple sorting/filtering, etc.) or searchkick (advanced queries).
In addition, samples select will also use query.advanced_query to determine if ransack or searchkick should be used. With large sample sets, ransack is much quicker (see screencasts below).

Note: logic determining what is an advanced_query, in order to use ransack or searchkick, has not been determined, and will be implemented when more advanced querying within IRIDA Next is ready to be added.

Screenshots or screen recordings

Select all differences:
Ransack:
Screencast from 2024-12-18 10:26:39 AM.webm

Searchkick:
Screencast from 2024-12-18 10:27:14 AM.webm

How to set up and validate locally

Test the functionality of both project and group's samples table and verify they function as expected.

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@ChrisHuynh333 ChrisHuynh333 marked this pull request as ready for review December 18, 2024 17:39
@ChrisHuynh333 ChrisHuynh333 self-assigned this Dec 18, 2024
@ChrisHuynh333 ChrisHuynh333 added the ready for review Pull request is ready for review label Dec 18, 2024
@ChrisHuynh333 ChrisHuynh333 changed the title Samples Index: Determine query type Samples Table: Determine query type Dec 18, 2024

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

Code Metrics Report

Coverage Test Execution Time
92.6% 10m41s

Code coverage of files in pull request scope (95.2%)

Files Coverage
app/controllers/groups/samples_controller.rb 100.0%
app/controllers/projects/samples_controller.rb 100.0%
app/models/sample/query.rb 83.6%

Reported by octocov

Copy link
Member

@ericenns ericenns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@ericenns ericenns merged commit 5ff9e2d into main Dec 20, 2024
4 checks passed
@ericenns ericenns deleted the parse-samples-query-method branch December 20, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Pull request is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants