-
Notifications
You must be signed in to change notification settings - Fork 235
Make with_mpi a strict boolean with default False #7122
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
base: main
Are you sure you want to change the base?
Conversation
|
all the tests pass locally. Please let me know if any changes are needed from my side. Thanks! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7122 +/- ##
===========================================
- Coverage 79.58% 29.21% -50.37%
===========================================
Files 566 566
Lines 43520 43474 -46
===========================================
- Hits 34631 12695 -21936
- Misses 8889 30779 +21890 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aman-coder03. In principle, one would think this makes sense (as I did when I came across it). However, I avoided changing this part due to a suspicion that it was Optional for a reason (perhaps historical). As such, good to ask an OG. @giovannipizzi thoughts?
Update
@t-reents found a related PR explaining why this was made Optional. I'll let him describe and link the relevant PR.
|
The relevant PR is this one: #6020 As @sphuber explains there, you want to explicitly set a default value (corresponding to something that one could read as "undefined") that is different from an explicit choice of whether MPI is supported or not. If you don't do this, plugin developers would always have to explicitly overwrite it. I think the same applies to the code as well, since AiiDA checks that there are no conflicting values specified. This is also explained in the relevant part of the code that you can find below: aiida-core/src/aiida/engine/processes/calcjobs/calcjob.py Lines 1016 to 1038 in 4e54cd4
|
|
Thanks a lot for the detailed explanation and for linking the relevant PR. I hadn’t considered the need for an explicit “undefined” ( |
this PR makes
with_mpia strict boolean with a default value ofFalse, instead ofOptional[bool].updated:
boolwith defaultFalseboolboolfixes #7082