Ticket #8812 (inprogress)
remove reduction folder
Reported by: | Gesner Passos | Owned by: | Peter Parker |
---|---|---|---|
Priority: | major | Milestone: | Backlog |
Component: | SANS | Keywords: | |
Cc: | Blocked By: | #9014, #9091, #9093 | |
Blocking: | #4259 | Tester: |
Description
It is necessary to move what we use to SANS folder and then remove the reduction folder: scripts/reduction
Change History
comment:2 Changed 7 years ago by Gesner Passos
- Milestone changed from Backlog to Release 3.2
Anders asked me to work on this for the benefit of Peter.
Explaining here:
- folder scripts/reduction is not being maintained any more. We use some things that are there in script/SANS. The objective of this ticket is to move all the things we care about to SANS folder and than remove that folder. I will probably do it in 2 tickets: 1- Remove our dependency on scripts/reduction; 2 - remove the scripts/reduction folder.
comment:3 Changed 7 years ago by Nick Draper
- Owner changed from Gesner Passos to Nick Draper
- Status changed from new to infoneeded
testing the infoneeded state:
What colour is your coat?
comment:7 Changed 7 years ago by Nick Draper
- Status changed from new to assigned
- Owner changed from Nick Draper to Gesner Passos
comment:8 Changed 7 years ago by Gesner Passos
- Status changed from assigned to inprogress
I will split this ticket in 3:
- Remove the dependency, by moving the code that is inside reduction folder to SANS folder. This one will create files even bigger inside SANS right now. It is not ideal, but, changing here means that we could eventually break users scripts.
- Remove the script/reduction folder
- Reorganize the files under SANS - this might cause side-effects in systemtests (what to import) and eventually users scripts. Hence, will need further discussion about when to apply.
comment:10 Changed 7 years ago by Gesner Passos
I've checked that we are using code from reduction folder in the following files:
reduction_application.py utest_reduction.py base_ref_reduction.py refl_data_simple.py refl_sf_calculator.py refm_reduction.py
I asked Mathieu about what to do with these instances, and his answser was:
The code around reduction_application.py that uses reduction folder can be erased.
if IS_IN_MANTIDPLOT: try: import reduction if os.path.splitext(os.path.basename(reduction.__file__))[0] == "reduction": REDUCTION_WARNING = True home_dir = os.path.expanduser('~') if os.path.abspath(reduction.__file__).startswith(home_dir): WARNING_MESSAGE = "The following file is in your home area, please delete it and restart Mantid:\n\n" else: WARNING_MESSAGE = "If the following file is in your home area, please delete it and restart Mantid:\n\n" WARNING_MESSAGE += os.path.abspath(reduction.__file__) except: REDUCTION_WARNING = True WARNING_MESSAGE = "Please contact the Mantid team with the following message:\n\n\n" WARNING_MESSAGE += unicode(traceback.format_exc())
The utest_reduction.py file can be deleted. Everything in there is tested more thoroughly elsewhere.
Regarding the reflectometry files, please open a ticket and give it to Jean Bilheux.
comment:11 Changed 7 years ago by Gesner Passos
- Blocked By 9091 removed
The file test/ReducerTest.py also depends on the reducer and should be either removed or adapted to the reducer kept inside SANS.
comment:12 Changed 7 years ago by Gesner Passos
Inelastic is also using the reducer and the reduction steps. This means that we have to find an agreement about where to put the module that contains the Reducer and ReductionSteps. #9014 put it under SANS folder, but might not like Inelastic. At least, SANS should move the ReductionSteps to another file to allow Inelastic to use it without having to load the entire isis_reduction_steps.py.
comment:15 Changed 7 years ago by Gesner Passos
After having the tickets #9091, #9093 closed, it is just necessary to do what is there in comment:10, maybe changing from reduction to reducer_singleton or just erasing the entire code as suggested by Mathieu.
After this, just delete the entire reduction folder.
Testing should be checking that the techniques that used to run when the reduction was there, are still alive. Hence, going through the validation of the blocking ticket plus checking that the SNS reduction interface is working as well.
comment:16 Changed 7 years ago by Nick Draper
- Owner changed from Gesner Passos to Peter Parker
Ownership handed over to Peter
comment:18 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9656