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

Deprecate preserve_exception_message in dials.util.mp #1722

Merged
merged 2 commits into from
May 24, 2021

Conversation

Anthchirp
Copy link
Member

I believe there exists no sensible scenario in which this would be set to False.

Copy link
Contributor

@graeme-winter graeme-winter left a comment

Choose a reason for hiding this comment

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

Sane and sensible - I cannot imagine a use case where not preserving the exception makes things better.

@@ -53,7 +54,7 @@ def parallel_map(
asynchronous=True,
callback=None,
preserve_order=True,
preserve_exception_message=True,
preserve_exception_message=...,
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL

@@ -63,6 +64,13 @@ def parallel_map(
"""
from dials.util.cluster_map import cluster_map as drmaa_parallel_map

if preserve_exception_message is not Ellipsis:
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, this is a really nice use of a NIL value which is not truth-like.

@@ -83,7 +91,7 @@ def parallel_map(
qsub_command=qsub_command,
asynchronous=asynchronous,
preserve_order=preserve_order,
preserve_exception_message=preserve_exception_message,
preserve_exception_message=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it be removed from drmaa_parallel_map while we're there?

@codecov
Copy link

codecov bot commented May 24, 2021

Codecov Report

Merging #1722 (4b6cce5) into main (0008175) will decrease coverage by 0.00%.
The diff coverage is 28.57%.

❗ Current head 4b6cce5 differs from pull request most recent head f42505f. Consider uploading reports for the commit f42505f to get more accurate results

@@            Coverage Diff             @@
##             main    #1722      +/-   ##
==========================================
- Coverage   67.14%   67.13%   -0.01%     
==========================================
  Files         615      615              
  Lines       69053    69059       +6     
  Branches     9616     9619       +3     
==========================================
- Hits        46365    46364       -1     
- Misses      20756    20760       +4     
- Partials     1932     1935       +3     

@ndevenish ndevenish merged commit 2f31eed into main May 24, 2021
@ndevenish ndevenish deleted the cut-haunted-branches branch May 24, 2021 15:49
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.

None yet

4 participants