Skip to content

Adding morphology and electrophysiology facets (SCP-5980) #2251

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

Merged
merged 9 commits into from
May 19, 2025

Conversation

bistline
Copy link
Contributor

@bistline bistline commented May 7, 2025

BACKGROUND & CHANGES

This adds two new search facets to the "more facets" menu on the homepage: has_morphology and has_electrophysiology. Both of these search facets are MongoDB-based, meaning they do not source data from BigQuery for either filter values or search results. Additionally, these facets have a new property called is_presence_facet which means that no exact filter matches are made, but rather only the presence of a given metadatum name within a study. This update also lays the groundwork for retiring BigQuery entirely for study-based search. More work is needed, but the main foundation of being able to source filter labels and perform searches directly in MongoDB is now in place.

MANUAL TESTING

  1. Run the migration to create the new facets with rails db:migrate
  2. Boot all services and sign in
  3. Download the metadata file from SCP2674 and upload it to a new study
  4. Once the metadata ingest completes, go back to the home page and click "more facets"
  5. Confirm both new facets are present, and that they both return the new study you created when used

@bistline bistline requested a review from eweitz May 7, 2025 17:32
Copy link

codecov bot commented May 7, 2025

Codecov Report

Attention: Patch coverage is 81.42857% with 13 lines in your changes missing coverage. Please review.

Project coverage is 71.15%. Comparing base (8c3913c) to head (6f97952).
Report is 29 commits behind head on development.

Files with missing lines Patch % Lines
app/models/search_facet.rb 79.54% 9 Missing ⚠️
app/controllers/api/v1/search_controller.rb 66.66% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #2251      +/-   ##
===============================================
- Coverage        71.16%   71.15%   -0.01%     
===============================================
  Files              335      335              
  Lines            28672    28805     +133     
  Branches          2520     2523       +3     
===============================================
+ Hits             20404    20496      +92     
- Misses            8126     8167      +41     
  Partials           142      142              
Files with missing lines Coverage Δ
...ascript/components/search/controls/FacetsPanel.jsx 11.76% <ø> (ø)
app/lib/study_search_service.rb 82.69% <100.00%> (+2.69%) ⬆️
app/controllers/api/v1/search_controller.rb 95.76% <66.66%> (-0.80%) ⬇️
app/models/search_facet.rb 95.96% <79.54%> (-2.40%) ⬇️

... and 13 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@eweitz eweitz left a comment

Choose a reason for hiding this comment

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

Code looks good, and my local manual test passed!

Screenshot 2025-05-08 at 12 01 41 PM

@bistline bistline merged commit ca36b6c into development May 19, 2025
6 checks passed
@github-actions github-actions bot deleted the jb-new-search-facets branch May 19, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants