Ticket #7072 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Remove Deprecated Algorithms for Release 3.0

Reported by: Karl Palmen Owned by: Karl Palmen
Priority: major Milestone: Release 3.0
Component: Framework Keywords: maintenance
Cc: Blocked By: #7644
Blocking: Tester: Keith Brown

Description (last modified by Karl Palmen) (diff)

Firstly, compile a list of deprecated algorithms to remove. Unless there is a good reason to keep any for longer, the list should consist of all algorithms deprecated before 2013-05-10 and any others such as FlatBackgound, we want to remove for release 3.0 (which follows relase 2.6).

Usage of deprecated algorithms in Mantid code will need updating.

This ticket will be initially at milestone 2.6, when the contribution to the release notes for release 2.6 has been made and approved. The milestone can be changed to release 3.0.

Change History

comment:1 Changed 7 years ago by Karl Palmen

  • Status changed from new to assigned
  • Owner set to Karl Palmen
  • Keywords maintenance added

comment:2 Changed 7 years ago by Peter Peterson

This should use something along the lines of DeprecatedAlgorithm to do its job. One could easily just search the code for things that inherit from that to find all of the deprecated algorithms.

comment:3 Changed 7 years ago by Karl Palmen

Depreacted Algorithms found inheriting from the DeprecatedAlgorithm class:

From Algorithms: CaltoDspacemap, CreateCalFileByNames, CreateDummyCalFile, DiffractionFocussing, DspacemaptoCal, ExtractMasking, FilterEventsHighFrequency, GhostCorrection, Q1D, ReadGroupsFromFile, Unwrap

From CurveFitting: Gaussian1D, Linear

From DataHandling: GetMaskedDetectors, LoadDAE, LoadISISNexus, LoadLogsFromSNSNexus, LoadMaskingFile, LoadRaw, LoadRaw2, LoadSNSEventNexus, LoadSNSNexus, SaveDetectorMasks

From MD Algorithms: BinToMDHistoWorkspace, ConvertToMDEvents

From PythonAPI: FrameworkManagerProxy

These are the names of the classes of the algorithm that are deprecated. A later version might not be deprecated.

Last edited 7 years ago by Karl Palmen (previous) (diff)

comment:4 Changed 7 years ago by Karl Palmen

Some algorithms that are a subclass of DeprecatedAlgorithm do do make use of the useAlgorithm method:

From Algorithms: FilterEventsHighFrequency, Q1D

From PythonAPI: FrameworkManagerProxy

They need to be modified to do so.

comment:5 Changed 7 years ago by Karl Palmen

I've found that at least one non-deprecated algorithm calls a deprecated child algorithm. I've found out it is feasible for a warning to be issued then.

This could be done in algorithm::createChildAlgorithm . The deprecated status of both the algorithm and child algorithm can be checked with something like

getCatagories().find("Deprecated") != str.end()

If the algorithm is not deprecated yet the child algorithm is deprecated, log a warning.

comment:6 Changed 7 years ago by Peter Peterson

The other option is something like

deprAlgo = boost::dynamic_cast<DeprecatedAlgorithm>(childPtr)
if (deprAlgo)
{
  m_log.warning() << deprAlgo->deprecationMsg() << "\n";
}

comment:7 Changed 7 years ago by Karl Palmen

I've found that the Algorithm class is very clever and it will automatically return a category of "Deprecated", if the Algorithm can be cast to DeprecatedAlgorithm.

comment:8 Changed 7 years ago by Karl Palmen

I see this that Peter has given enables the deprecation message to be put into the warning message.

comment:9 Changed 7 years ago by Karl Palmen

I've seen that the deprecation message of linear appears in FlatBackground as well as in CalculateTransmission.

comment:10 Changed 7 years ago by Karl Palmen

  • Milestone changed from Release 2.6 to Release 2.7

comment:11 Changed 7 years ago by Karl Palmen

  • Milestone changed from Release 2.7 to Release 2.6

comment:12 Changed 7 years ago by Nick Draper

  • Status changed from assigned to new

comment:13 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:14 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.6 to Backlog

Moved to backlog at the code freeze for R2.6

comment:15 Changed 7 years ago by Karl Palmen

  • Description modified (diff)
  • Summary changed from Remove Deprecated Algorithms for Release 2.7 to Remove Deprecated Algorithms for Release 3.0

comment:16 Changed 7 years ago by Karl Palmen

  • Description modified (diff)

comment:17 Changed 7 years ago by Karl Palmen

  • Milestone changed from Backlog to Release 3.0

comment:18 Changed 7 years ago by Karl Palmen

  • Keywords poker added

comment:19 Changed 7 years ago by Nick Draper

  • Keywords poker removed

Poker Estimate: 4d

comment:20 Changed 7 years ago by Nick Draper

  • Blocked By 7644 added

comment:21 Changed 7 years ago by Karl Palmen

  • Status changed from new to inprogress

comment:22 Changed 7 years ago by Karl Palmen

I've found out that depecated algorithms DiffractionFocussing, LoadISISNexus and LoadRaw appear to be used in system tests.

Last edited 7 years ago by Karl Palmen (previous) (diff)

comment:23 Changed 7 years ago by Karl Palmen

CreateDummyCalFile no longer appears to be deprecated.

comment:24 Changed 7 years ago by Karl Palmen

CreateCalFileByNames also no longer appears to be deprecated.

comment:25 Changed 7 years ago by Karl Palmen

The following algorithms use the DeprecatedAlgorithm class and were deprecated on 2013-05-10:

Algorithms: CaltoDaspacemap, DiffractionFocussing, DspacetoCal, ExtractMasking, FilterEventsHighFrequency, GhostCorrection, Q1D, Unwrap

CurveFitting: Gaussian1D, Linear

DataHandling: GetMaskedDetectors, LoadISISNexus, LoadLogsFromSNSNexus, LoadMaskingFile, LoadRaw, LoadRaw2, LoadSNSEventNexus, LoadSNSNexus, SaveDetectorMasks,

LiveData: LoadDAE

MDAlgorithms: BinToMDHistoWorkspace

comment:26 Changed 7 years ago by Karl Palmen

I'll wait until #6977 has been tested and closed before starting a branch for this ticket. To avaod merger clash with removal of FlatBackground algorithm.

comment:27 Changed 7 years ago by Karl Palmen

Remove CaltoDspacemap, DscpacemaptoCal and ExtractMasking.cpp re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 09a270e096d8d4215d2aac0b507e0f87402b5449

comment:28 Changed 7 years ago by Karl Palmen

No FilterEventsHighFrequency, GhostCorrection, QID & Unwrap re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: afcb46a37cc4d2e415ab2c4f4e87a3c189140f5a

comment:29 Changed 7 years ago by Karl Palmen

Modify GeneratePythonScriptTest.h to not use file re #7072

and in so doing eliminate use of the removed unwrap algorithm.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 59f81431d8f7534d8f8c4cbdadec32e58e325e01

comment:30 Changed 7 years ago by Karl Palmen

Remove Gaussian1D, Gaussian1D2 & Linear re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 1bb282635acce353e65abcfae1f7cc949a5ccde8

comment:31 Changed 7 years ago by Karl Palmen

Remove LoadDAE algorithm re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 3408b38efe4a2447a97027a6307d0774a6385579

comment:32 Changed 7 years ago by Karl Palmen

Remove BinToMDHistoWorkspace algorithm re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: af3145ac7aacc97a6f0784085e8df525ec97c27a

comment:33 Changed 7 years ago by Karl Palmen

No GetMaskedDetectors, LoadMaskingFile & SaveDetectorMasks re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: b12a90394c07762b42846c4e7d47e661e4ebf5df

comment:34 Changed 7 years ago by Karl Palmen

merge conflict resolved re #7072

Changeset: 9b60b0ee49d6cd836bb801f9b2f542102f57ebf8

comment:35 Changed 7 years ago by Karl Palmen

Change DeprecatedAlgorithmCheckerTest.py example re #7072

I change it to use DiffractionFocussing which I do not intend to remove for release 3.0, because it is used by a system test.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: ca7d9ec03fe72c6cf0b6621d74d37201f824a080

comment:36 Changed 7 years ago by Karl Palmen

Test version 1 of DiffractionFocussing re #7072

in DeprecatedAlgorithmCheckerTest.py

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 053acd28bb98287c621891eea1d648ec38b555c1

comment:37 Changed 7 years ago by Karl Palmen

Remove LoadLogsFromSNSNexus and LoadSNSEventNexus re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: e29e7b3a59892caa01244c3b841828a0031b0df7

comment:38 Changed 7 years ago by Karl Palmen

merge conflict resolved re #7072

Changeset: 3b8f6ab4bbb96d882480a5a0a55d49ef27bb860c

comment:39 Changed 7 years ago by Karl Palmen

I note that only version 1 of LoadISINExus is deprecated. It now only throws a not implemented exception.

comment:40 Changed 7 years ago by Karl Palmen

The remaining algorithms to remove are LoadISISNexus, LoadRaw, LoadRaw2, LoadSNSNexus from DataHandling and DiffractionFocussing version 1 from Algorithms.

Diffraction Focussing version 1 is currently used as an example in DeprecatedAlgorithmCheckerTest.py and also may be used in system tests.

Of the others only LoadSNSNExus is completely deprecated, rather than just deprecated in old version(s). I did find it used in the system tests.

comment:41 Changed 7 years ago by Karl Palmen

Remove LoadSNSNexus algorithm re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 06ad693ad8837c508aafccc72fc8ab5d419f9584

comment:42 Changed 7 years ago by Karl Palmen

Make LoadNexus use LoadTOFRawNexus instead of LoadSNSNexus re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 81b59421723ff074edbb3e9f2f53ff1423062c83

comment:43 Changed 7 years ago by Karl Palmen

Resolve merge re #7072

Changeset: bf1e89bed54d5c07e278f8fb0f5eb92c040859e1

comment:44 Changed 7 years ago by Karl Palmen

To test verify that the following algorithms have been removed:

Algorithms: CaltoDaspacemap, DspacetoCal, ExtractMasking, FilterEventsHighFrequency, GhostCorrection, Q1D, Unwrap

CurveFitting: Gaussian1D, Linear

DataHandling: GetMaskedDetectors, LoadLogsFromSNSNexus, LoadMaskingFile, LoadSNSEventNexus, LoadSNSNexus, SaveDetectorMasks,

LiveData: LoadDAE

MDAlgorithms: BinToMDHistoWorkspace

If in the course of code review you find any unit test is no longer adequate, please issue a maintenance ticket for it rather than fail the test.

comment:45 Changed 7 years ago by Karl Palmen

Ticket #8175 created for LoadRaw and loadISISNexus.

comment:46 Changed 7 years ago by Karl Palmen

  • Status changed from inprogress to verify
  • Resolution set to fixed

comment:47 Changed 7 years ago by Karl Palmen

Removal indicated in wiki.

comment:48 Changed 7 years ago by Keith Brown

  • Status changed from verify to verifying
  • Tester set to Keith Brown

comment:49 Changed 7 years ago by Keith Brown

Q1D v2 is still about, but Nick has said to allow this to pass and put that version's removal in a new ticket #8237

comment:50 Changed 7 years ago by Karl Palmen

Remove CaltoDspacemap, DscpacemaptoCal and ExtractMasking.cpp re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: b404d0634c4029aae7b780cf86118d0609ce84b7

comment:51 Changed 7 years ago by Karl Palmen

No FilterEventsHighFrequency, GhostCorrection, QID & Unwrap re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 3c13ebd9a1fc98a93634f4215176d160803c4ccb

comment:52 Changed 7 years ago by Karl Palmen

Modify GeneratePythonScriptTest.h to not use file re #7072

and in so doing eliminate use of the removed unwrap algorithm.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 302d6bfc2580d509a361a99059d2bf80f690b508

comment:53 Changed 7 years ago by Karl Palmen

Remove Gaussian1D, Gaussian1D2 & Linear re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 7180ecf756baaa664eb4d69cf39ae31b4ffe224e

comment:54 Changed 7 years ago by Karl Palmen

Remove LoadDAE algorithm re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 7ca53a02b91e111f3d1928fa574ad58630c44ccb

comment:55 Changed 7 years ago by Karl Palmen

Remove BinToMDHistoWorkspace algorithm re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 1347bf025e837f266ec616a58cd22d6bbede7e32

comment:56 Changed 7 years ago by Karl Palmen

No GetMaskedDetectors, LoadMaskingFile & SaveDetectorMasks re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 2b3467c032d5eb94db4d653b73e5825520dcff9e

comment:57 Changed 7 years ago by Karl Palmen

Change DeprecatedAlgorithmCheckerTest.py example re #7072

I change it to use DiffractionFocussing which I do not intend to remove for release 3.0, because it is used by a system test.

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: fc36605f9a1f314f6c0512ed3ff418b9745aee46

comment:58 Changed 7 years ago by Karl Palmen

Test version 1 of DiffractionFocussing re #7072

in DeprecatedAlgorithmCheckerTest.py

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 0ba81fa20b7d09a834354ed6ce44e39d00322fcf

comment:59 Changed 7 years ago by Karl Palmen

Remove LoadLogsFromSNSNexus and LoadSNSEventNexus re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: e27ae06cc40d51728ef16d47463da13fb0c6423f

comment:60 Changed 7 years ago by Karl Palmen

Remove LoadSNSNexus algorithm re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: ea4744a333089a3460e5bbe1c587649e0c465e54

comment:61 Changed 7 years ago by Karl Palmen

Make LoadNexus use LoadTOFRawNexus instead of LoadSNSNexus re #7072

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: 85f8e8a4392d4e7cfd0174a317c9b76d72a27574

comment:62 Changed 7 years ago by Keith Brown

There was a problem merging to master, Martyn helped resolve it

comment:63 Changed 7 years ago by Keith Brown

  • Status changed from verifying to closed

This is merged, couldn't use the macro

comment:64 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7918

Note: See TracTickets for help on using tickets.