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

Updated args['trsh'] if condition #721

Merged
merged 1 commit into from
Dec 13, 2023
Merged

Updated args['trsh'] if condition #721

merged 1 commit into from
Dec 13, 2023

Conversation

calvinp0
Copy link
Member

When a scan job was being troubleshooted, it was not removing the scan resolution troubleshoot correctly prior to writing the input gaussian file. This change in the code ensures that it will be removed correctly later in the code.

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (2b5e18d) 73.72% compared to head (dccf3ca) 73.71%.

Files Patch % Lines
arc/scheduler.py 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #721      +/-   ##
==========================================
- Coverage   73.72%   73.71%   -0.02%     
==========================================
  Files          99       99              
  Lines       26985    26992       +7     
  Branches     5616     5620       +4     
==========================================
+ Hits        19896    19898       +2     
- Misses       5691     5697       +6     
+ Partials     1398     1397       -1     
Flag Coverage Δ
unittests 73.71% <0.00%> (-0.02%) ⬇️

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

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

Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

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

Thanks for the quick response for this issue.
LGTM. I added some comments, mostly on style.

arc/scheduler.py Outdated Show resolved Hide resolved
arc/scheduler.py Outdated
args['trsh'][key].extend(value)
else:
args['trsh'][key] = value
else:
Copy link
Member

Choose a reason for hiding this comment

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

Both else lead to the same action, please consider combining the if statements and keep just one else

Copy link
Member Author

Choose a reason for hiding this comment

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

As far as I can tell, they wouldn't. Because if ['trsh] in key does exist, but it is not a list, (and assuming we have removed the else statement) then nothing will happen, which is not what we want.

arc/scheduler.py Outdated
else:
args['trsh'][key] = value
else:
args['trsh'] = trsh
Copy link
Member

Choose a reason for hiding this comment

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

Do we think this is OK, since trsh is a dict?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, it becomes a dict within a dict
For example
args['trsh]['trsh']
or
args['trsh]['scan_res']

@calvinp0 calvinp0 requested a review from alongd December 13, 2023 07:38
@calvinp0 calvinp0 force-pushed the scan_res branch 2 times, most recently from 44f498f to dccf3ca Compare December 13, 2023 11:39
Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

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

Thanks for addressing this quickly!

@calvinp0 calvinp0 merged commit 5b52159 into main Dec 13, 2023
5 of 7 checks passed
@calvinp0 calvinp0 deleted the scan_res branch December 13, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants