Ticket #7690 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Remove our dependency on OLD API

Reported by: Gesner Passos Owned by: Gesner Passos
Priority: critical Milestone: Release 3.0
Component: Python Keywords:
Cc: nick.draper@…, martyn.gigg@… Blocked By: #6968, #7053, #7404, #7633, #7691, #7693, #7694, #7695, #7696, #7697, #7698, #7702, #7703, #7760, #7763, #7813, #7844, #7855, #7861, #7863, #7901
Blocking: #7607 Tester: Martyn Gigg

Description

Before switching off the old api, we must be sure that we do not use it in any part of our code.

Here is a list of files that are currently using the old API

=============
Reduction GUI
=============

Code/Mantid/scripts/Interface/reduction_gui/reduction/reflectometer/refl_reduction.py
Code/Mantid/scripts/Interface/reduction_gui/reduction/reflectometer/refl_sf_calculator.py
Code/Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/refl_reduction.py
Code/Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/base_ref_reduction.py
Code/Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/stitcher.py
Code/Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/launch_peak_back_selection_1d.py

======
Pychop
======

Code/Mantid/scripts/PyChop/PyChopGUI.py
Code/Mantid/scripts/PyChop/PyChop.py

=============
Reflectometry
=============

Code/Mantid/scripts/Reflectometry/isis_reflgui/reflgui.py
Code/Mantid/scripts/Reflectometry/isis_reflgui/quick.py
Code/Mantid/scripts/Reflectometry/isis_reflgui/combineMulti.py

======
Others
======

Code/Mantid/scripts/Vates/Inelastic_Workflow.py
Code/Mantid/scripts/Inelastic/CommonFunctions.py
Code/Mantid/scripts/reduction/instruments/reflectometer/data_manipulation.py
Code/Mantid/scripts/reduction/instruments/reflectometer/wks_utility.py
Code/Mantid/MantidQt/SliceViewer/test/SliceViewerPythonInterfaceTest.py


================
Examples scripts
================

Code/Mantid/scripts/Examples/StripPeaks.py
Code/Mantid/scripts/Examples/SimpleMtdCommands_Example.py
Code/Mantid/scripts/Examples/TableWorkspace_Example.py
Code/Mantid/scripts/Examples/SampleLogs_Demo.py


=========================
Old Python API Algorithms
=========================

Code/Mantid/Framework/PythonAPI/PythonAlgorithms/SNSSingleCrystalReduction.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/ConvertInstrumentFile.py 
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/ConjoinGSASFiles.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/ConvertVULCANCalFile.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/LoadMultipleGSS.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/RefLReduction.py


==================
WorkflowAlgorithms
==================

Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/Quest.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/JumpFit.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/iFudge.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/MuscatFunc.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/ResNorm.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/ForCE.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/Moments.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/ILLines.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/IDAtransmission.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/Symmetrise.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/QLines.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/WorkflowAlgorithms/MuscatData.py
Code/Mantid/Framework/PythonAPI/PythonAlgorithms/RetrieveRunInfo.py

========
MDEvents
========
Code/Mantid/Framework/MDEvents/scripts/mdevents_optimize.py
Code/Mantid/Framework/MDEvents/scripts/speed_vs_numevents.py

===============
Algorithms test
===============
Code/Mantid/Framework/Algorithms/test/NormaliseToUnityTest.py


========================
Remember to remove these
========================
Code/Mantid/Framework/PythonAPI
Code/Mantid/MantidPlot/mantidplotrc.py
Code/Mantid/scripts/lib1to2/test/PythonAlgorithmReplaceMigrationTest.py
Code/Mantid/scripts/lib1to2/test/SimpleStringReplaceMigrationTest.py

Change History

comment:1 Changed 7 years ago by Gesner Passos

  • Blocked By 7691 added

comment:2 Changed 7 years ago by Gesner Passos

I will pass to the owners of the algorithms the responsibility to migrate the code.

comment:3 Changed 7 years ago by Gesner Passos

  • Blocked By 7693 added

comment:4 Changed 7 years ago by Gesner Passos

  • Blocked By 7694 added

comment:5 Changed 7 years ago by Gesner Passos

  • Blocked By 7695 added

comment:6 Changed 7 years ago by Gesner Passos

  • Blocked By 7696 added

comment:7 Changed 7 years ago by Gesner Passos

  • Blocked By 7697 added

comment:8 Changed 7 years ago by Gesner Passos

  • Blocked By 7404 added

comment:9 Changed 7 years ago by Gesner Passos

  • Status changed from new to inprogress

Migrate WorkflowAlgorithms to new API

re #7690

Changeset: 5ed22b20d81eac803bba9bc1dc6df8a0bb2afa89

moved to ticket #7760

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:10 Changed 7 years ago by Gesner Passos

Wait till tomorrow to see if systemtests or unit test will fail.

comment:11 Changed 7 years ago by Gesner Passos

  • Blocked By 7698 added

comment:12 Changed 7 years ago by Gesner Passos

Migrate RetrieveRunInfo to new api

re #7690

Changeset: 224bbad4908c7a6ebe7e57b373ec21d14a65c617 moved to #7844

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:13 Changed 7 years ago by Gesner Passos

Solves the system tests that are failing

the problem was with importing the modules in the very beggining. It was necessary to let the modules to be imported in run time.

re #7690

Changeset: e067bd2939dd7f2b288eb524e275bfcd8b7a2a41 moved to ticket #7760

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:14 Changed 7 years ago by Gesner Passos

  • Blocked By 7702 added

comment:15 Changed 7 years ago by Gesner Passos

  • Blocked By 7703 added

comment:16 Changed 7 years ago by Gesner Passos

  • Blocked By 6968 added

The ticket #7696 was considered invalid because ConvertInstrumentFile.py is to be moved to C++ in ticket #6968. So, it must wait #6968 to see ConvertInstrumentFile.py removed from Mantid.

comment:17 Changed 7 years ago by Gesner Passos

Correct WorkflowAlgorithms for IndirectAnalysis

It is necessary to import the modules later un RunTime, otherwise, it fails if it tries in the very beggining.

re #7690

Changeset: 81336438d4fda7618f8f96d0cb91285565755c97

moved to ticket #7760

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:18 Changed 7 years ago by Wenduo Zhou

  • Blocked By 7697 removed

comment:19 Changed 7 years ago by Wenduo Zhou

  • Blocked By 7697 added

comment:20 Changed 7 years ago by Gesner Passos

  • Blocked By 7760 added

comment:21 Changed 7 years ago by Gesner Passos

Migrate WorkflowAlgorithms to new API

re #7690

Changeset: b04a293a66a50e99af2aa0cc93dbf7a30f0745dc

moved to ticket #7760

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:22 Changed 7 years ago by Gesner Passos

Solves the system tests that are failing

the problem was with importing the modules in the very beggining. It was necessary to let the modules to be imported in run time.

re #7690

Changeset: 1899a1c157f0566a71a43fd70b1b824ad348da3a

moved to ticket #7760

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:23 Changed 7 years ago by Gesner Passos

Correct WorkflowAlgorithms for IndirectAnalysis

It is necessary to import the modules later un RunTime, otherwise, it fails if it tries in the very beggining.

re #7690

Changeset: a31d12e9b16a734391be0d34fe5db5ce8d71eff5

moved to ticket #7760

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:24 Changed 7 years ago by Gesner Passos

  • Blocked By 7763 added

comment:25 Changed 7 years ago by Russell Taylor

  • Blocked By 7813 added

comment:26 Changed 7 years ago by Gesner Passos

  • Blocked By 7844 added

comment:27 Changed 7 years ago by Gesner Passos

Migrate RetrieveRunInfo to new api

re #7690

Changeset: fbe09cf363b166b2ed3a19a73a4eee85966cecdc moved to #7844

Last edited 7 years ago by Gesner Passos (previous) (diff)

comment:28 Changed 7 years ago by Gesner Passos

  • Blocking 7607 added

comment:29 Changed 7 years ago by Gesner Passos

Tester:

You have only to test that all the tickets blocking the current one, deal with all the files in the list in the beginning. Do not use the git macros here. All the commits were moved to other tickets. So, it is just a matter of checking that the scripts were covered in the blocking list and closing this ticket.

comment:30 Changed 7 years ago by Gesner Passos

Warnings to the following files:

They may generate old api scripts

Mantid/scripts/Interface/reduction_gui/reduction/eqsans_reduction.py
Mantid/scripts/Interface/reduction_gui/reduction/hfir_reduction.py
Mantid/scripts/Interface/reduction_gui/reduction/reflectometer/refl_sf_calculator.py
Mantid/scripts/Interface/reduction_gui/reduction/reflectometer/refl_reduction.py
Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/base_ref_reduction.py
Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/refl_sf_calculator.py

Using old api:

Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/refl_reduction.py
Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/stitcher.py
Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/launch_peak_back_selection_1d.py
Mantid/scripts/Interface/reduction_gui/widgets/reflectometer/refl_data_simple.py
Mantid/scripts/Reflectometry/isis_reflgui/reflgui.py
Mantid/scripts/Reflectometry/isis_reflgui/quick.py
Mantid/scripts/Reflectometry/isis_reflgui/combineMulti.py
Mantid/scripts/reduction/instruments/reflectometer/data_manipulation.py

comment:31 Changed 7 years ago by Mathieu Doucet

  • Blocked By 7053, 7633 added

Creating a ticket for the REFL work: #7855 The SANS work was done in #7633 and #7053 but needs to be tested.

comment:32 Changed 7 years ago by Gesner Passos

  • Blocked By 7861 added

comment:32 Changed 7 years ago by Gesner Passos

  • Blocked By 7855 added; 7861 removed

comment:33 Changed 7 years ago by Gesner Passos

  • Blocked By 7861 added

comment:34 Changed 7 years ago by Gesner Passos

These files

Mantid/scripts/Inelastic/IndirectEnergyConversion.py
Mantid/scripts/Inelastic/IndirectCommon.py

uses:

mtd[ws] == None

comment:35 Changed 7 years ago by Gesner Passos

  • Blocked By 7863 added

comment:36 Changed 7 years ago by Martyn Gigg

  • Blocked By 7901 added

comment:37 Changed 7 years ago by Gesner Passos

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

All the dependable tickets have been closed. So, this ticket can be closed.

Do not use macro with this ticket. All the commits presented here are already in the master because they were moved to other tickets.

comment:38 Changed 7 years ago by Martyn Gigg

  • Status changed from verify to verifying
  • Tester set to Martyn Gigg

comment:39 Changed 7 years ago by Martyn Gigg

  • Status changed from verifying to closed

Confirmed that all blockers have been resolved.

comment:40 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 8535

Note: See TracTickets for help on using tickets.