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

✨ api-server: New study jobs metadata entrypoints #5690

Merged
merged 27 commits into from
Jun 3, 2024

Conversation

pcrespov
Copy link
Member

@pcrespov pcrespov commented Apr 17, 2024

What do these changes do?

  • ✨ Implements custom metadata entrypoint for study jobs
    • get_study_job_custom_metadata as GET/{study_id}/jobs/{job_id}/metadata
    • replace_study_job_custom_metadata as PUT /{study_id}/jobs/{job_id}/metadata
    • It essentially reuses the implementation of the solver jobs couterparts
  • 🔨 Enhances backend mock
    • New mock capture fully generated using new --spy-httpx-calls-enabled=true
    • mocked_backend fixture prototypes how to mock iterable responses. This is a prototype that will eventually move into the implementation of create_respx_mock_from_capture fixture
  • ♻️ Moves jobs business logic to services following controller/service/repository pattern

Related issue/s

How to test

cd services/api-server
make install-dev
pytest -vv tests/unt/api_studies/test_api_routers_studies_jobs_metadata.py`

Dev-ops checklist

@pcrespov pcrespov self-assigned this Apr 17, 2024
@pcrespov pcrespov added the a:apiserver api-server service label Apr 17, 2024
@pcrespov pcrespov changed the title Is1291/new study jobs meta WIP: Is1291/new study jobs meta Apr 17, 2024
Copy link

codecov bot commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.3%. Comparing base (cafbf96) to head (63945fe).
Report is 243 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5690      +/-   ##
=========================================
- Coverage    84.5%   84.3%    -0.3%     
=========================================
  Files          10     717     +707     
  Lines         214   34630   +34416     
  Branches       25     714     +689     
=========================================
+ Hits          181   29203   +29022     
- Misses         23    5264    +5241     
- Partials       10     163     +153     
Flag Coverage Δ
integrationtests 64.1% <ø> (?)
unittests 82.7% <ø> (-1.8%) ⬇️

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

see 714 files with indirect coverage changes

@pcrespov pcrespov force-pushed the is1291/new-study-jobs-meta branch from 44a19be to 91ca022 Compare April 17, 2024 20:35
@pcrespov pcrespov added this to the Enchanted Odyssey milestone Apr 26, 2024
@pcrespov pcrespov force-pushed the is1291/new-study-jobs-meta branch from 91ca022 to 59b9799 Compare April 29, 2024 14:34
@pcrespov pcrespov force-pushed the is1291/new-study-jobs-meta branch from 59b9799 to 8b8259f Compare May 22, 2024 16:36
@pcrespov pcrespov force-pushed the is1291/new-study-jobs-meta branch 4 times, most recently from 8d91753 to a9cfc33 Compare May 30, 2024 13:32
@pcrespov pcrespov changed the title WIP: Is1291/new study jobs meta ✨ api-server: New study jobs metadata entrypoints May 30, 2024
@pcrespov pcrespov marked this pull request as ready for review May 30, 2024 13:37
Copy link
Contributor

@bisgaard-itis bisgaard-itis left a comment

Choose a reason for hiding this comment

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

Very nice! Thanks a lot 🚀

Copy link
Contributor

@matusdrobuliak66 matusdrobuliak66 left a comment

Choose a reason for hiding this comment

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

👍

@pcrespov pcrespov force-pushed the is1291/new-study-jobs-meta branch from 4bc6be6 to 596b69f Compare May 30, 2024 15:44
@pcrespov pcrespov enabled auto-merge (squash) May 30, 2024 15:47
Copy link
Contributor

@GitHK GitHK left a comment

Choose a reason for hiding this comment

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

Nice, just a few comments you might want to consider

@pcrespov pcrespov force-pushed the is1291/new-study-jobs-meta branch from 596b69f to 63945fe Compare June 3, 2024 08:34
Copy link

sonarqubecloud bot commented Jun 3, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.2% Duplication on New Code

See analysis details on SonarCloud

@pcrespov pcrespov merged commit b169cc8 into ITISFoundation:master Jun 3, 2024
57 checks passed
@pcrespov pcrespov deleted the is1291/new-study-jobs-meta branch June 3, 2024 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:apiserver api-server service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants