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.

Gregory

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 calibrate.py:458: self.display('repair', exposure=exposure) calibrate.py:464: self.display('background', exposure=exposure) calibrate.py:506: self.display('PSF_repair', exposure=exposure) calibrate.py:520: self.display('PSF_background', exposure=exposure) calibrate.py:581: self.display('calibrate', exposure=exposure, sources=sources, matches=matches) repair.py:199: self.display('repair.before', exposure=exposure) repair.py:206: self.display('repair.after', exposure=exposure) snapCombine.py:131: self.display('repair0', exposure=snap0) snapCombine.py:132: 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.

Gregory

DM-4428.

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).