Skip to content

Y26 173 create sapio study#5897

Open
wendyyang wants to merge 22 commits into
Epic/Sapio_study_integrationfrom
y26-173-create_sapio_study
Open

Y26 173 create sapio study#5897
wendyyang wants to merge 22 commits into
Epic/Sapio_study_integrationfrom
y26-173-create_sapio_study

Conversation

@wendyyang

Copy link
Copy Markdown
Contributor

Closes #

Changes proposed in this pull request

add create API endpoint

Instructions for Reviewers

[All PRs] - Confirm PR template filled
[Feature Branches] - Review code
[Production Merges to main]
    - Check story numbers included
    - Check for debug code
    - Check version

@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.81%. Comparing base (e12d4b3) to head (1d22069).
⚠️ Report is 21 commits behind head on Epic/Sapio_study_integration.

Files with missing lines Patch % Lines
app/controllers/api/v2/sapio/studies_controller.rb 33.33% 12 Missing ⚠️
Additional details and impacted files
@@                       Coverage Diff                        @@
##           Epic/Sapio_study_integration    #5897      +/-   ##
================================================================
- Coverage                         84.82%   84.81%   -0.02%     
================================================================
  Files                              1491     1492       +1     
  Lines                             33976    34004      +28     
  Branches                           3627     3632       +5     
================================================================
+ Hits                              28821    28841      +20     
- Misses                             4303     4310       +7     
- Partials                            852      853       +1     
Flag Coverage Δ
javascript 76.31% <ø> (ø)
ruby 84.68% <42.85%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 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.

@wendyyang wendyyang requested review from StephenHulme and yoldas July 7, 2026 08:35
@wendyyang wendyyang marked this pull request as ready for review July 7, 2026 08:39

@yoldas yoldas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

issue: In order to create a Study using this API endpoint, there needs to be some agreement with the Integration Hub team. Ideally all metadata or any other associated information should be packed into the payload as *_attributes such as study_metadata_atrributes, so the associations can be established in one go by treating those extra nested structures. The study_params used here is not documented. It is not clear what it is doing. See the relationships

  • study
    • study_metadata
      • study_type
      • data_release_study_type
      • reference_genome
      • program
    • user

issue: no API documentation and example to show the agreed payload.
issue: no error listing related to study creation
issue: there are no request tests to cover the success and individual error cases

@wendyyang

Copy link
Copy Markdown
Contributor Author

issue: In order to create a Study using this API endpoint, there needs to be some agreement with the Integration Hub team. Ideally all metadata or any other associated information should be packed into the payload as *_attributes such as study_metadata_atrributes, so the associations can be established in one go by treating those extra nested structures. The study_params used here is not documented. It is not clear what it is doing. See the relationships

  • study

    • study_metadata

      • study_type
      • data_release_study_type
      • reference_genome
      • program
    • user

issue: no API documentation and example to show the agreed payload. issue: no error listing related to study creation issue: there are no request tests to cover the success and individual error cases

Yes, the payload is not decided yet. It will need to be updated later on when we know what attributes are passed in.
For now, I just focus on making sure the 'create' function can only be called by 'Integration Hub', not anywhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants