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

Implement download callback through job state change #133

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

MrCreosote
Copy link
Member

Next is submitting to JAWS

Copy link

codecov bot commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 45.71429% with 19 lines in your changes missing coverage. Please review.

Project coverage is 56.20%. Comparing base (46fc710) to head (9b19ade).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
cdmtaskservice/job_state.py 0.00% 5 Missing ⚠️
cdmtaskservice/mongo.py 37.50% 5 Missing ⚠️
cdmtaskservice/routes.py 37.50% 5 Missing ⚠️
cdmtaskservice/jobflows/nersc_jaws.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #133   +/-   ##
=======================================
  Coverage   56.20%   56.20%           
=======================================
  Files          31       31           
  Lines        1854     1870   +16     
=======================================
+ Hits         1042     1051    +9     
- Misses        812      819    +7     

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

):
res = await self._col_jobs.update_one(
{
models.FLD_JOB_ID: _require_string(job_id, "job_id"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

works. But it might be clearer to validate these parameters first and store them in local variables instead of calling validators inline.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, I used to do it that way, but you wind up with a potentially long list of validators at the start of each method. Inlining them makes the method easier to read imo since the validator calls are so simple

@MrCreosote MrCreosote merged commit 30978ff into main Dec 17, 2024
10 of 11 checks passed
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