Removing display() from Task?

A bit more than a year ago, @rowen marked the display() method of the Task class in pipe_base as deprecated. Would it be possible to pull the trigger on removing it during this cycle?

It seems clearly the right thing to do in the long run. It’s not a blocker, but I am seeing it because I’m rooting around in pipe_base as part of the SuperTask work.


As the original author, I’m keen to see this go. It was an attempt to be a one-size-fits-all solution for displaying results, but I’ve since realised that there isn’t really any good way to do that, and what is really needed is more mid-level display functions (e.g., plot a catalog/matches on a display).

Limiting myself to a naive search of pipe_tasks (master) itself, this is what I find for apparent uses of the display() method in the Task base class:

$ grep -n 'display *(' *.py self.display('repair', exposure=exposure) self.display('background', exposure=exposure) self.display('PSF_repair', exposure=exposure) self.display('PSF_background', exposure=exposure) self.display('calibrate', exposure=exposure, sources=sources, matches=matches) self.display('repair.before', exposure=exposure) self.display('repair.after', exposure=exposure) self.display('repair0', exposure=snap0) self.display('repair1', exposure=snap1)

I.e., there are three tasks that currently use the interface.

I assume the migration would be to make them explicitly invoke afw.display?

I agree that we should be looking for more “generic display” capabilities to be added to afw.display so that we can deal with - as you suggested - tabular data and a variety of things besides images.



Do we have a policy for removing code which has been marked as deprecated? For example: “it should be included in one full release after the deprecation notice was added”. I looked on Confluence but failed to find anything relevant.

I’m not sure about the deprecation policy. This method was deprecated as part of the Summer2014 release (DM-927) but I suppose it only really counts if the release notes mention it (and confluence doesn’t make it obvious that Summer2014 had release notes).