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

Moving warning filter to the whole file. #525

Merged
merged 1 commit into from Dec 14, 2020
Merged

Moving warning filter to the whole file. #525

merged 1 commit into from Dec 14, 2020

Conversation

iparask
Copy link
Contributor

@iparask iparask commented Dec 11, 2020

I moved the warning filter to the whole file. It will make sure that the deprecation message will be printed once, regardless how many times a task is created. I am not sure how to create a test other than running something like:

from radical.entk import Task
for _ in range(100):
    t = Task()
    t.cpu_reqs = {'processes': 16, 'process_type': 'MPI', 'threads_per_process': 1, 'thread_type': 'OpenMP'}
for _ in range(100):
    t = Task()
    t.gpu_reqs = {'processes': 16, 'process_type': 'MPI', 'threads_per_process': 1, 'thread_type': 'OpenMP'}

and observing the output.

This fixes #523.

@codecov
Copy link

codecov bot commented Dec 11, 2020

Codecov Report

Merging #525 (79d5d97) into devel (573cb41) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #525      +/-   ##
==========================================
- Coverage   62.84%   62.82%   -0.02%     
==========================================
  Files          20       20              
  Lines        2387     2386       -1     
==========================================
- Hits         1500     1499       -1     
  Misses        887      887              
Impacted Files Coverage Δ
src/radical/entk/task.py 80.44% <100.00%> (-0.06%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 573cb41...79d5d97. Read the comment docs.

Copy link
Contributor

@mturilli mturilli left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@iparask iparask merged commit 7fdd722 into devel Dec 14, 2020
@iparask iparask deleted the fix/issue_523 branch December 14, 2020 15:46
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.

EnTK deprecated warning is printed hundreds of times
2 participants