radical-cybertools / radical.pilot

RADICAL-Pilot
http://radical-cybertools.github.io/radical-pilot/index.html
Other
54 stars 23 forks source link

Use a universal and unique identifier for registered callbacks. #2970

Closed eirrgang closed 1 year ago

eirrgang commented 1 year ago

Allow distinct instances of defined callables to be used as Pilot callbacks, whether or not the cb objects have __name__ attributes (such as for functools.partial instances). Normalize Pilot.{un,}register_callback()`` with the updates toPilotManager.{un,}register_callback()`` from c0085457.

codecov[bot] commented 1 year ago

Codecov Report

Merging #2970 (1cee851) into devel (bfecdfc) will decrease coverage by 0.02%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##            devel    #2970      +/-   ##
==========================================
- Coverage   41.63%   41.61%   -0.02%     
==========================================
  Files          95       95              
  Lines       10497    10500       +3     
==========================================
  Hits         4370     4370              
- Misses       6127     6130       +3     
Impacted Files Coverage Δ
src/radical/pilot/pilot.py 49.08% <0.00%> (-0.69%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

andre-merzky commented 1 year ago

That's a good use case motivation (using partial) - thanks.

eirrgang commented 1 year ago

That's a good use case motivation (using partial) - thanks.

functool.partial is a specific example of the more general case of local functions or callables, which, even if given a __name__, may not be named uniquely.