diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py index 6ef3c03c7bfd..f53f0ef8394d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinder.py @@ -14,16 +14,16 @@ from mantid.api import DataProcessorAlgorithm, MatrixWorkspaceProperty, AlgorithmFactory, PropertyMode, Progress from mantid.kernel import Direction, StringListValidator, Logger from mantid.simpleapi import CloneWorkspace, GroupWorkspaces -from sans.algorithm_detail.beamcentrefinder_plotting import can_plot_beamcentrefinder, plot_workspace_quartiles -from sans.algorithm_detail.crop_helper import get_component_name -from sans.algorithm_detail.single_execution import perform_can_subtraction -from sans.algorithm_detail.strip_end_nans_and_infs import strip_end_nans -from sans.common.constants import EMPTY_NAME -from sans.common.enums import DetectorType, MaskingQuadrant, FindDirectionEnum -from sans.common.file_information import get_instrument_paths_for_sans_file -from sans.common.general_functions import create_child_algorithm -from sans.common.xml_parsing import get_named_elements_from_ipf_file -from sans.state.Serializer import Serializer +from sans_core.algorithm_detail.beamcentrefinder_plotting import can_plot_beamcentrefinder, plot_workspace_quartiles +from sans_core.algorithm_detail.crop_helper import get_component_name +from sans_core.algorithm_detail.single_execution import perform_can_subtraction +from sans_core.algorithm_detail.strip_end_nans_and_infs import strip_end_nans +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import DetectorType, MaskingQuadrant, FindDirectionEnum +from sans_core.common.file_information import get_instrument_paths_for_sans_file +from sans_core.common.general_functions import create_child_algorithm +from sans_core.common.xml_parsing import get_named_elements_from_ipf_file +from sans_core.state.Serializer import Serializer class SANSBeamCentreFinder(DataProcessorAlgorithm): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderCore.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderCore.py index c397baa71c78..5f08ece4dd66 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderCore.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderCore.py @@ -12,19 +12,19 @@ from mantid.api import DataProcessorAlgorithm, MatrixWorkspaceProperty, AlgorithmFactory, PropertyMode, Progress, IEventWorkspace from mantid.kernel import Direction, StringListValidator -from sans.algorithm_detail.CreateSANSAdjustmentWorkspaces import CreateSANSAdjustmentWorkspaces -from sans.algorithm_detail.convert_to_q import convert_workspace -from sans.algorithm_detail.crop_helper import get_component_name -from sans.algorithm_detail.mask_sans_workspace import mask_workspace -from sans.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes -from sans.algorithm_detail.scale_sans_workspace import scale_workspace -from sans.algorithm_detail.slice_sans_event import slice_sans_event -from sans.algorithm_detail.xml_shapes import quadrant_xml -from sans.common.constants import EMPTY_NAME -from sans.common.enums import DetectorType, DataType, MaskingQuadrant, RebinType -from sans.common.general_functions import create_child_algorithm, append_to_sans_file_tag -from sans.state.AllStates import AllStates -from sans.state.Serializer import Serializer +from sans_core.algorithm_detail.CreateSANSAdjustmentWorkspaces import CreateSANSAdjustmentWorkspaces +from sans_core.algorithm_detail.convert_to_q import convert_workspace +from sans_core.algorithm_detail.crop_helper import get_component_name +from sans_core.algorithm_detail.mask_sans_workspace import mask_workspace +from sans_core.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes +from sans_core.algorithm_detail.scale_sans_workspace import scale_workspace +from sans_core.algorithm_detail.slice_sans_event import slice_sans_event +from sans_core.algorithm_detail.xml_shapes import quadrant_xml +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import DetectorType, DataType, MaskingQuadrant, RebinType +from sans_core.common.general_functions import create_child_algorithm, append_to_sans_file_tag +from sans_core.state.AllStates import AllStates +from sans_core.state.Serializer import Serializer class SANSBeamCentreFinderCore(DataProcessorAlgorithm): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderMassMethod.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderMassMethod.py index f84ea3443f5b..643dee7acbb7 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderMassMethod.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSBeamCentreFinderMassMethod.py @@ -12,15 +12,15 @@ from mantid.api import DataProcessorAlgorithm, MatrixWorkspaceProperty, AlgorithmFactory, PropertyMode, Progress, IEventWorkspace from mantid.kernel import Direction, StringListValidator -from sans.algorithm_detail.crop_helper import get_component_name -from sans.algorithm_detail.mask_sans_workspace import mask_workspace -from sans.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes -from sans.algorithm_detail.scale_sans_workspace import scale_workspace -from sans.algorithm_detail.slice_sans_event import slice_sans_event -from sans.common.constants import EMPTY_NAME -from sans.common.enums import DetectorType -from sans.common.general_functions import create_child_algorithm, append_to_sans_file_tag -from sans.state.Serializer import Serializer +from sans_core.algorithm_detail.crop_helper import get_component_name +from sans_core.algorithm_detail.mask_sans_workspace import mask_workspace +from sans_core.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes +from sans_core.algorithm_detail.scale_sans_workspace import scale_workspace +from sans_core.algorithm_detail.slice_sans_event import slice_sans_event +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import DetectorType +from sans_core.common.general_functions import create_child_algorithm, append_to_sans_file_tag +from sans_core.state.Serializer import Serializer class SANSBeamCentreFinderMassMethod(DataProcessorAlgorithm): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSConvertToWavelengthAndRebin.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSConvertToWavelengthAndRebin.py index 9506bb77e3ab..838ce57943d7 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSConvertToWavelengthAndRebin.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSConvertToWavelengthAndRebin.py @@ -23,9 +23,9 @@ ) from mantid.dataobjects import EventWorkspace from mantid.kernel import Direction, StringListValidator, Property -from sans.common.constants import EMPTY_NAME -from sans.common.enums import RebinType, RangeStepType -from sans.common.general_functions import ( +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import RebinType, RangeStepType +from sans_core.common.general_functions import ( create_unmanaged_algorithm, append_to_sans_file_tag, get_input_workspace_as_copy_if_not_same_as_output_workspace, diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSLoad.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSLoad.py index 58afc826f41a..9b41c351ffa9 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSLoad.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSLoad.py @@ -10,11 +10,11 @@ from mantid.api import DataProcessorAlgorithm, MatrixWorkspaceProperty, AlgorithmFactory, PropertyMode, Progress, WorkspaceProperty from mantid.kernel import Direction, FloatArrayProperty -from sans.algorithm_detail.load_data import SANSLoadDataFactory -from sans.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes -from sans.common.enums import SANSDataType +from sans_core.algorithm_detail.load_data import SANSLoadDataFactory +from sans_core.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes +from sans_core.common.enums import SANSDataType -from sans.state.Serializer import Serializer +from sans_core.state.Serializer import Serializer class SANSLoad(DataProcessorAlgorithm): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCore.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCore.py index ad5375c6ed07..14a58dd43c66 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCore.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCore.py @@ -11,8 +11,8 @@ from SANSReductionCoreBase import SANSReductionCoreBase from mantid.api import AlgorithmFactory, Progress -from sans.algorithm_detail.mask_workspace import mask_bins -from sans.common.enums import DetectorType +from sans_core.algorithm_detail.mask_workspace import mask_bins +from sans_core.common.enums import DetectorType class SANSReductionCore(SANSReductionCoreBase): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreBase.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreBase.py index 4f02172d0b16..1bd369ec2d60 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreBase.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreBase.py @@ -23,18 +23,18 @@ ) from mantid.kernel import Direction, StringListValidator from mantid.py36compat import dataclass -from sans.algorithm_detail.CreateSANSAdjustmentWorkspaces import CreateSANSAdjustmentWorkspaces -from sans.algorithm_detail.convert_to_q import convert_workspace -from sans.algorithm_detail.crop_helper import get_component_name -from sans.algorithm_detail.mask_sans_workspace import mask_workspace -from sans.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes -from sans.algorithm_detail.scale_sans_workspace import scale_workspace -from sans.algorithm_detail.slice_sans_event import slice_sans_event -from sans.common.constants import EMPTY_NAME -from sans.common.enums import DetectorType, DataType, RebinType -from sans.common.general_functions import create_child_algorithm, append_to_sans_file_tag -from sans.state.Serializer import Serializer -from sans.state.StateObjects.wavelength_interval import WavRange +from sans_core.algorithm_detail.CreateSANSAdjustmentWorkspaces import CreateSANSAdjustmentWorkspaces +from sans_core.algorithm_detail.convert_to_q import convert_workspace +from sans_core.algorithm_detail.crop_helper import get_component_name +from sans_core.algorithm_detail.mask_sans_workspace import mask_workspace +from sans_core.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes +from sans_core.algorithm_detail.scale_sans_workspace import scale_workspace +from sans_core.algorithm_detail.slice_sans_event import slice_sans_event +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import DetectorType, DataType, RebinType +from sans_core.common.general_functions import create_child_algorithm, append_to_sans_file_tag +from sans_core.state.Serializer import Serializer +from sans_core.state.StateObjects.wavelength_interval import WavRange WsList = Dict[Tuple[float, float], MatrixWorkspace] diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreEventSlice.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreEventSlice.py index f4b7a77c40ec..8a94b9106214 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreEventSlice.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCoreEventSlice.py @@ -13,7 +13,7 @@ from mantid.api import MatrixWorkspaceProperty, AlgorithmFactory, PropertyMode, Progress from mantid.kernel import Direction, StringListValidator -from sans.common.enums import DetectorType, DataType +from sans_core.common.enums import DetectorType, DataType class SANSReductionCoreEventSlice(SANSReductionCoreBase): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCorePreprocess.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCorePreprocess.py index 0aa915b017be..f2415b0e800c 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCorePreprocess.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSReductionCorePreprocess.py @@ -13,8 +13,8 @@ from mantid.api import MatrixWorkspaceProperty, AlgorithmFactory, Progress from mantid.kernel import Direction -from sans.algorithm_detail.mask_workspace import mask_bins -from sans.common.enums import DetectorType +from sans_core.algorithm_detail.mask_workspace import mask_bins +from sans_core.common.enums import DetectorType class SANSReductionCorePreprocess(SANSReductionCoreBase): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSave.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSave.py index 7c3c6804ad3e..ccf566cbe8a8 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSave.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSave.py @@ -10,11 +10,11 @@ from mantid.api import DataProcessorAlgorithm, MatrixWorkspaceProperty, AlgorithmFactory, PropertyMode, FileProperty, FileAction, Progress from mantid.kernel import Direction, logger -from sans.algorithm_detail.save_workspace import save_to_file, get_zero_error_free_workspace, file_format_with_append -from sans.common.file_information import convert_to_shape -from sans.common.general_functions import get_detector_names_from_instrument -from sans.common.constant_containers import SANSInstrument_string_as_key_NoInstrument -from sans.common.enums import SaveType +from sans_core.algorithm_detail.save_workspace import save_to_file, get_zero_error_free_workspace, file_format_with_append +from sans_core.common.file_information import convert_to_shape +from sans_core.common.general_functions import get_detector_names_from_instrument +from sans_core.common.constant_containers import SANSInstrument_string_as_key_NoInstrument +from sans_core.common.enums import SaveType class SANSSave(DataProcessorAlgorithm): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction.py index e755b14217c9..dbb927db67dd 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction.py @@ -13,10 +13,10 @@ from mantid.api import AlgorithmFactory, PropertyMode, WorkspaceGroup, WorkspaceGroupProperty from mantid.kernel import Direction, Property from mantid.simpleapi import CloneWorkspace -from sans.algorithm_detail.single_execution import run_core_reduction, run_optimized_for_can -from sans.common.enums import DataType, ReductionMode -from sans.common.general_functions import does_can_workspace_exist_on_ads -from sans.data_objects.sans_workflow_algorithm_outputs import SANSWorkflowAlgorithmOutputs +from sans_core.algorithm_detail.single_execution import run_core_reduction, run_optimized_for_can +from sans_core.common.enums import DataType, ReductionMode +from sans_core.common.general_functions import does_can_workspace_exist_on_ads +from sans_core.data_objects.sans_workflow_algorithm_outputs import SANSWorkflowAlgorithmOutputs class SANSSingleReduction(SANSSingleReductionBase): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction2.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction2.py index 6061fc2730da..853d16dbd57d 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction2.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReduction2.py @@ -15,15 +15,15 @@ from mantid.api import AlgorithmFactory, AnalysisDataService, MatrixWorkspaceProperty, PropertyMode, WorkspaceGroup, WorkspaceGroupProperty from mantid.kernel import Direction from mantid.simpleapi import CloneWorkspace -from sans.algorithm_detail.bundles import EventSliceSettingBundle -from sans.algorithm_detail.single_execution import ( +from sans_core.algorithm_detail.bundles import EventSliceSettingBundle +from sans_core.algorithm_detail.single_execution import ( run_initial_event_slice_reduction, run_core_event_slice_reduction, get_reduction_mode_vs_output_bundles, run_optimized_for_can, ) -from sans.common.enums import DataType, ReductionMode, FitType -from sans.common.general_functions import ( +from sans_core.common.enums import DataType, ReductionMode, FitType +from sans_core.common.general_functions import ( create_child_algorithm, does_can_workspace_exist_on_ads, get_transmission_output_name, diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReductionBase.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReductionBase.py index 2e107b996051..cd32a71a82eb 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReductionBase.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANS/SANSSingleReductionBase.py @@ -10,13 +10,13 @@ from mantid.api import DataProcessorAlgorithm, MatrixWorkspaceProperty, Progress, PropertyMode from mantid.kernel import Direction -from sans.algorithm_detail.bundles import ReductionSettingBundle, CompletedSlices -from sans.algorithm_detail.single_execution import get_final_output_workspaces, get_merge_bundle_for_merge_request -from sans.algorithm_detail.strip_end_nans_and_infs import strip_end_nans -from sans.common.enums import DataType, ReductionMode -from sans.common.general_functions import create_child_algorithm -from sans.data_objects.sans_workflow_algorithm_outputs import SANSWorkflowAlgorithmOutputs -from sans.state.Serializer import Serializer +from sans_core.algorithm_detail.bundles import ReductionSettingBundle, CompletedSlices +from sans_core.algorithm_detail.single_execution import get_final_output_workspaces, get_merge_bundle_for_merge_request +from sans_core.algorithm_detail.strip_end_nans_and_infs import strip_end_nans +from sans_core.common.enums import DataType, ReductionMode +from sans_core.common.general_functions import create_child_algorithm +from sans_core.data_objects.sans_workflow_algorithm_outputs import SANSWorkflowAlgorithmOutputs +from sans_core.state.Serializer import Serializer class SANSSingleReductionBase(DataProcessorAlgorithm): diff --git a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSStitch.py b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSStitch.py index 73a0fdb9a4d8..3b8f050b3253 100644 --- a/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSStitch.py +++ b/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/SANSStitch.py @@ -10,8 +10,8 @@ from mantid.api import DataProcessorAlgorithm, MatrixWorkspaceProperty, PropertyMode from mantid.kernel import Direction, Property, StringListValidator, UnitFactory, EnabledWhenProperty, PropertyCriterion, Logger import numpy as np -from sans.common.general_functions import create_unmanaged_algorithm -from sans.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.common.constants import EMPTY_NAME class Mode(object): diff --git a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSConvertToWavelengthAndRebinTest.py b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSConvertToWavelengthAndRebinTest.py index 8f3f5e544ce6..2ab47ba92dfc 100644 --- a/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSConvertToWavelengthAndRebinTest.py +++ b/Framework/PythonInterface/test/python/plugins/algorithms/WorkflowAlgorithms/sans/SANSConvertToWavelengthAndRebinTest.py @@ -11,9 +11,9 @@ from mantid.api import FrameworkManager, WorkspaceGroup from mantid.dataobjects import EventWorkspace -from sans.common.general_functions import create_unmanaged_algorithm -from sans.common.constants import EMPTY_NAME -from sans.common.enums import RangeStepType +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import RangeStepType def provide_workspace(is_event=True): diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod.py index 250ed8300eec..3933c393e720 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod.py @@ -12,7 +12,7 @@ from mantid.api import AnalysisDataService from ISISCommandInterface import * from SANSBatchMode import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LARMOR) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFiles.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFiles.py index 9cfe0131b27c..3f9824927d8c 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFiles.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFiles.py @@ -10,7 +10,7 @@ from mantid.simpleapi import DeleteWorkspace from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LARMOR) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFilesTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFilesTest_V2.py index dee9e34ba3b6..82ae9e4a04a3 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFilesTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriodAddFilesTest_V2.py @@ -12,7 +12,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.api import AnalysisDataService -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( Set1D, Detector, MaskFile, @@ -24,7 +24,7 @@ AddRuns, LARMOR, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LARMOR) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod_V2.py index 35fcaf9fd3a5..1c8e36238f5e 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMORMultiPeriod_V2.py @@ -10,10 +10,10 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.api import AnalysisDataService -from sans.command_interface.ISISCommandInterface import Set1D, Detector, MaskFile, AssignSample, WavRangeReduction, LARMOR +from sans_core.command_interface.ISISCommandInterface import Set1D, Detector, MaskFile, AssignSample, WavRangeReduction, LARMOR # test batch mode with sans2d and selecting a period in batch mode -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LARMOR) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMOR_multiperiod_event_files_TOML.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMOR_multiperiod_event_files_TOML.py index dadfe7f527c1..7883caf9a617 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMOR_multiperiod_event_files_TOML.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LARMOR/SANSLARMOR_multiperiod_event_files_TOML.py @@ -11,7 +11,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.api import AnalysisDataService -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( Set1D, Detector, MaskFile, @@ -23,7 +23,7 @@ AddRuns, LARMOR, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LARMOR) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/LOQReloadWorkspaces.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/LOQReloadWorkspaces.py index 75cb6870edb1..d4ad890c9998 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/LOQReloadWorkspaces.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/LOQReloadWorkspaces.py @@ -11,7 +11,7 @@ from mantid.simpleapi import LoadRaw, MoveInstrumentComponent import unittest -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument """ Allowing the reduction to use already loaded workspace will make it easier to diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQAddBatch.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQAddBatch.py index d7095eb490f4..5707f0419542 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQAddBatch.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQAddBatch.py @@ -16,7 +16,7 @@ import os -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch.py index dee256d8cfab..9d101ccfd05d 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch.py @@ -14,7 +14,7 @@ from SANSBatchMode import * import os.path -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch_V2.py index b5e29f3e6395..17d35ecb2d9a 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQBatch_V2.py @@ -13,8 +13,8 @@ from mantid.kernel import config from mantid.api import FileFinder from mantid.simpleapi import LoadNexus, Plus -from sans.command_interface.ISISCommandInterface import LOQ, Detector, Set1D, MaskFile, Gravity, BatchReduce, UseCompatibilityMode -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import LOQ, Detector, Set1D, MaskFile, Gravity, BatchReduce, UseCompatibilityMode +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D.py index 0be230047268..4fb0b2673bcf 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D.py @@ -12,7 +12,7 @@ from ISISCommandInterface import * # Test is giving odd results on Linux, but only this 2D one. -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_TOML.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_TOML.py index 32924f6a88a3..3645103f754f 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_TOML.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_TOML.py @@ -7,7 +7,7 @@ import systemtesting import mantid # noqa from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( LOQ, Set2D, Detector, @@ -19,7 +19,7 @@ WavRangeReduction, UseCompatibilityMode, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_V2.py index 635804dba9e8..de6772799705 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCan2D_V2.py @@ -9,7 +9,7 @@ import systemtesting import mantid # noqa from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( LOQ, Set2D, Detector, @@ -23,7 +23,7 @@ ) # Test is giving odd results on Linux, but only this 2D one. -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCentreNoGrav.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCentreNoGrav.py index 6c4c80fca6fb..3c381f332409 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCentreNoGrav.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQCentreNoGrav.py @@ -9,7 +9,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import * from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQLegacyUserFile.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQLegacyUserFile.py index 4217cd75ab75..8666f451b3b0 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQLegacyUserFile.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQLegacyUserFile.py @@ -6,10 +6,10 @@ # SPDX - License - Identifier: GPL - 3.0 + import systemtesting from mantid import FileFinder -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import LOQ, UseCompatibilityMode, BatchReduce +from sans_core.command_interface.ISISCommandInterface import LOQ, UseCompatibilityMode, BatchReduce from mantid.simpleapi import GroupWorkspaces diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUI.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUI.py index 93fa4572c5c4..174552eeb841 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUI.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUI.py @@ -10,7 +10,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import * import ISISCommandInterface as i -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUITest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUITest_V2.py index e0921df906a5..6e65237a97aa 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUITest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQReductionGUITest_V2.py @@ -8,8 +8,8 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config -from sans.command_interface.ISISCommandInterface import UseCompatibilityMode, LOQ, MaskFile, BatchReduce -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import UseCompatibilityMode, LOQ, MaskFile, BatchReduce +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQTransFitWorkspace2D.py b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQTransFitWorkspace2D.py index 1dcccf4285c4..29ab38d3f45b 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQTransFitWorkspace2D.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/LOQ/SANSLOQTransFitWorkspace2D.py @@ -10,7 +10,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import * from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatch.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatch.py index 6b6aff0d9918..ae40a3a95f5f 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatch.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatch.py @@ -15,7 +15,7 @@ import os.path # test batch mode with sans2d and selecting a period in batch mode -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatchTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatchTest_V2.py index 04fa5dff9c34..844270d70fda 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatchTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DBatchTest_V2.py @@ -12,7 +12,7 @@ from mantid import config from mantid.api import FileFinder from mantid.simpleapi import Load, DeleteWorkspace, mtd -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2DTUBES, SANS2D, Set1D, @@ -24,7 +24,7 @@ ) import os.path -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav.py index a556a5fabfee..45007eb0903b 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav.py @@ -9,7 +9,7 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav_V2.py index d8ad135be181..2a960556427a 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DFrontNoGrav_V2.py @@ -8,7 +8,7 @@ import systemtesting import mantid # noqa from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2D, MaskFile, SetDetectorOffsets, @@ -18,7 +18,7 @@ AssignSample, WavRangeReduction, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime.py index ee47700fa651..ce64ad3da940 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime.py @@ -10,7 +10,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import * from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime_V2.py index 7bb2d8489db2..c77c337c122e 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DLimitEventsTime_V2.py @@ -9,8 +9,8 @@ import systemtesting import mantid # noqa from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import SANS2D, MaskFile, AssignSample, WavRangeReduction, UseCompatibilityMode -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import SANS2D, MaskFile, AssignSample, WavRangeReduction, UseCompatibilityMode +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod.py index 5102e543e1e0..e4e21d73605b 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod.py @@ -11,7 +11,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from ISISCommandInterface import * from SANSBatchMode import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFiles.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFiles.py index 451da59c7a6e..891db3c3a4d5 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFiles.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFiles.py @@ -10,7 +10,7 @@ from mantid import config from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFilesTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFilesTest_V2.py index f497a82ef5c7..7182cb430788 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFilesTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriodAddFilesTest_V2.py @@ -11,7 +11,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2D, Set1D, Detector, @@ -23,7 +23,7 @@ UseCompatibilityMode, AddRuns, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod_V2.py index 6aca5e1b915b..bbdc3bc298ec 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DMultiPeriod_V2.py @@ -10,7 +10,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.api import AnalysisDataService, FileFinder -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2D, Set1D, Detector, @@ -23,7 +23,7 @@ ) # test batch mode with sans2d and selecting a period in batch mode -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI.py index 3f95447a0b55..1da29782a8ed 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI.py @@ -28,7 +28,7 @@ import isis_reduction_steps import copy -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument def s(obj): diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAdded.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAdded.py index 895a7b78a2c3..80e457709139 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAdded.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAdded.py @@ -11,7 +11,7 @@ import copy import SANS2DReductionGUI as sansgui -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAddedTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAddedTest_V2.py index c02955bc7d5e..5271aeacbef6 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAddedTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUIAddedTest_V2.py @@ -19,7 +19,7 @@ from mantid.kernel import config from mantid.simpleapi import DeleteWorkspace import SANSadd2 -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2DTUBES, MaskFile, SetDetectorOffsets, @@ -33,7 +33,7 @@ WavRangeReduction, UseCompatibilityMode, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUITest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUITest_V2.py index 8955625d1d44..983e7967e0e2 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUITest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUITest_V2.py @@ -14,7 +14,7 @@ from isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.simpleapi import RenameWorkspace -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( BatchReduce, SANS2D, MaskFile, @@ -26,7 +26,7 @@ UseCompatibilityMode, FindBeamCentre, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI_V2.py index 12ae40233a48..be5460ad8e40 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReductionGUI_V2.py @@ -14,7 +14,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.kernel import config from mantid.simpleapi import RenameWorkspace -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( BatchReduce, SANS2D, MaskFile, @@ -26,7 +26,7 @@ UseCompatibilityMode, FindBeamCentre, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReloadWorkspaces.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReloadWorkspaces.py index 988612101448..bbfeadcc5762 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReloadWorkspaces.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DReloadWorkspaces.py @@ -11,7 +11,7 @@ from ISISCommandInterface import * import unittest -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument """ Allowing the reduction to use already loaded workspace will make it easier to diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSearchCentreGUI.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSearchCentreGUI.py index be5cf9d789a2..3ffb021b3ebe 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSearchCentreGUI.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSearchCentreGUI.py @@ -14,7 +14,7 @@ import SANS2DReductionGUI as sansgui from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicing.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicing.py index b261da95ad1a..786a871f4a05 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicing.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicing.py @@ -10,7 +10,7 @@ from mantid.simpleapi import mtd, RenameWorkspace, FileFinder import ISISCommandInterface as i -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicingTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicingTest_V2.py index 1b8890e80186..4598ad7e0bf7 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicingTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DSlicingTest_V2.py @@ -9,7 +9,7 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.api import AnalysisDataService, FileFinder -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2D, MaskFile, BatchReduce, @@ -22,7 +22,7 @@ WavRangeReduction, ) from mantid.simpleapi import RenameWorkspace -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeCalibrationTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeCalibrationTest.py index 3278a2b6180f..629f65f6edc1 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeCalibrationTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeCalibrationTest.py @@ -7,7 +7,7 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument from mantid.api import AnalysisDataService from mantid.simpleapi import SANSTubeCalibration diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeMergeTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeMergeTest.py index c5069361086d..1064427b24bd 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeMergeTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DTubeMergeTest.py @@ -7,7 +7,7 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument from mantid.simpleapi import SANSTubeMerge diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloops.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloops.py index 9bc004c87628..2295cb218c54 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloops.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloops.py @@ -10,7 +10,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import * from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloopsTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloopsTest_V2.py index 213c32c94367..15e69c998071 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloopsTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2DWaveloopsTest_V2.py @@ -7,7 +7,7 @@ # pylint: disable=no-init import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2D, MaskFile, Gravity, @@ -19,7 +19,7 @@ CompWavRanges, UseCompatibilityMode, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_12m_cycle_22_02.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_12m_cycle_22_02.py index 4fda09b3a586..689cbdd05dfb 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_12m_cycle_22_02.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_12m_cycle_22_02.py @@ -8,7 +8,7 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2D, Set1D, MaskFile, @@ -18,7 +18,7 @@ WavRangeReduction, Set2D, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_4m_cycle_22_02.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_4m_cycle_22_02.py index 1ef52197caa6..b589990ff421 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_4m_cycle_22_02.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_GDW20_4m_cycle_22_02.py @@ -8,7 +8,7 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2D, MaskFile, UseCompatibilityMode, @@ -17,7 +17,7 @@ WavRangeReduction, Set2D, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_empty_cycle_22_02.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_empty_cycle_22_02.py index 943fd9222db1..9b7fddb43824 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_empty_cycle_22_02.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_empty_cycle_22_02.py @@ -8,7 +8,7 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2D, Set1D, MaskFile, @@ -17,7 +17,7 @@ TransmissionSample, WavRangeReduction, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_glassy_carbon_cycle_22_02.py b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_glassy_carbon_cycle_22_02.py index d86d971eaf7e..6acdd4243833 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_glassy_carbon_cycle_22_02.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/SANS2D/SANS2D_glassy_carbon_cycle_22_02.py @@ -8,7 +8,7 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2D, Set1D, MaskFile, @@ -18,7 +18,7 @@ WavRangeReduction, Set2D, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBatchReductionTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBatchReductionTest.py index 4d001a22b27a..ef02a557e3fd 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBatchReductionTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBatchReductionTest.py @@ -14,18 +14,18 @@ from mantid import config from mantid.api import AnalysisDataService -from sans.common.constants import EMPTY_NAME -from sans.common.enums import SANSFacility, ReductionMode, OutputMode, SANSInstrument -from sans.common.file_information import SANSFileInformationFactory -from sans.common.general_functions import create_unmanaged_algorithm -from sans.sans_batch import SANSBatchReduction -from sans.state.StateObjects.StateData import get_data_builder +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import SANSFacility, ReductionMode, OutputMode, SANSInstrument +from sans_core.common.file_information import SANSFileInformationFactory +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.sans_batch import SANSBatchReduction +from sans_core.state.StateObjects.StateData import get_data_builder # ----------------------------------------------- # Tests for the SANSBatchReduction algorithm # ----------------------------------------------- -from sans.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter +from sans_core.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBeamCentreFinderCoreTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBeamCentreFinderCoreTest.py index 4063ef2957cf..532857684cf3 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBeamCentreFinderCoreTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSBeamCentreFinderCoreTest.py @@ -13,20 +13,20 @@ import mantid from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.api import AlgorithmManager -from sans.state.Serializer import Serializer +from sans_core.state.Serializer import Serializer -from sans.state.StateObjects.StateData import get_data_builder -from sans.common.enums import DetectorType, DataType, SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.common.enums import DetectorType, DataType, SANSFacility, SANSInstrument -from sans.common.constants import EMPTY_NAME -from sans.common.general_functions import create_unmanaged_algorithm -from sans.common.file_information import SANSFileInformationFactory +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.common.file_information import SANSFileInformationFactory # ----------------------------------------------- # Tests for the SANSReductionCore algorithm # ----------------------------------------------- -from sans.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter +from sans_core.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSCentreSample.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSCentreSample.py index d82138c9babc..ef9c2408a382 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSCentreSample.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSCentreSample.py @@ -10,7 +10,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import * from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDarkRunSubtractionTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDarkRunSubtractionTest.py index d5d54ca5a14e..280b935a49fe 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDarkRunSubtractionTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDarkRunSubtractionTest.py @@ -17,7 +17,7 @@ from SANSUtility import getFileAndName import numpy as np -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDiagnosticPageTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDiagnosticPageTest.py index 5c7b5f098dec..1da68d29245b 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDiagnosticPageTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSDiagnosticPageTest.py @@ -16,19 +16,19 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantidqtinterfaces.sans_isis.gui_logic.presenter.diagnostic_presenter import DiagnosticsPagePresenter -from sans.state.StateObjects.StateData import get_data_builder -from sans.common.enums import DetectorType, SANSFacility, IntegralEnum, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.common.enums import DetectorType, SANSFacility, IntegralEnum, SANSInstrument -from sans.common.constants import EMPTY_NAME -from sans.common.general_functions import create_unmanaged_algorithm +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_unmanaged_algorithm from mantidqtinterfaces.sans_isis.gui_logic.models.async_workers.diagnostic_async import DiagnosticsAsync -from sans.common.file_information import SANSFileInformationFactory +from sans_core.common.file_information import SANSFileInformationFactory # ----------------------------------------------- # Tests for the SANSDiagnosticPage # ----------------------------------------------- -from sans.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter +from sans_core.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter class SANSDiagnosticPageTest(unittest.TestCase): diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSFileChecking.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSFileChecking.py index 5a37314dfd89..7f85fc23a875 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSFileChecking.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSFileChecking.py @@ -17,7 +17,7 @@ import SANSUtility as su import os from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument def get_full_path_SANS_system_test(filename): diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLOWCentreNoGrav_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLOWCentreNoGrav_V2.py index b50f86b155f0..dc0f387e8288 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLOWCentreNoGrav_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLOWCentreNoGrav_V2.py @@ -8,7 +8,7 @@ import systemtesting import mantid # noqa from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( LOQ, Set1D, Detector, @@ -24,7 +24,7 @@ UseCompatibilityMode, FindBeamCentre, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.LOQ) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadTest.py index 0191dd6345e0..3dcd80186da0 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadTest.py @@ -13,18 +13,18 @@ from mantid.dataobjects import Workspace2D, EventWorkspace from mantid.api import AnalysisDataService, AlgorithmManager -from sans.algorithm_detail.load_data import SANSLoadDataFactory -from sans.common.log_tagger import has_tag -from sans.common.constants import CALIBRATION_WORKSPACE_TAG, SANS_FILE_TAG +from sans_core.algorithm_detail.load_data import SANSLoadDataFactory +from sans_core.common.log_tagger import has_tag +from sans_core.common.constants import CALIBRATION_WORKSPACE_TAG, SANS_FILE_TAG # Not clear why the names in the module are not found by Pylint, but it seems to get confused. Hence this check # needs to be disabled here. # pylint: disable=no-name-in-module -from sans.state.Serializer import Serializer -from sans.test_helper.test_director import TestDirector -from sans.common.enums import SANSFacility, SANSInstrument -from sans.state.StateObjects.StateData import get_data_builder -from sans.common.file_information import SANSFileInformationFactory +from sans_core.state.Serializer import Serializer +from sans_core.test_helper.test_director import TestDirector +from sans_core.common.enums import SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.common.file_information import SANSFileInformationFactory def remove_all_workspaces_from_ads(): diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadersTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadersTest.py index 1eed0f3e1ff2..e1b104147a50 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadersTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSLoadersTest.py @@ -17,7 +17,7 @@ from mantid.simpleapi import * import isis_reduction_steps as steps import ISISCommandInterface as ici -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument class LoadRunTest(unittest.TestCase): diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest.py index 5ce770c522a9..a6b4b7eeb885 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest.py @@ -9,7 +9,7 @@ from mantid.simpleapi import DeleteWorkspace, mtd import ISISCommandInterface as i import systemtesting -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest_V2.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest_V2.py index 4e3f4b373984..91fa465ebb35 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest_V2.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSMergedDetectorsTest_V2.py @@ -9,7 +9,7 @@ import systemtesting from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import DeleteWorkspace, mtd -from sans.command_interface.ISISCommandInterface import ( +from sans_core.command_interface.ISISCommandInterface import ( SANS2DTUBES, MaskFile, SetDetectorOffsets, @@ -23,7 +23,7 @@ TransmissionCan, UseCompatibilityMode, ) -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSQResolutionTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSQResolutionTest.py index 92b64c096e94..0d5f6bb84ed4 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSQResolutionTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSQResolutionTest.py @@ -10,7 +10,7 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import * from ISISCommandInterface import * -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSReductionCoreTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSReductionCoreTest.py index 05889bdcc786..5a78f314b1aa 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSReductionCoreTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSReductionCoreTest.py @@ -13,20 +13,20 @@ import mantid from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid.api import AlgorithmManager -from sans.state.Serializer import Serializer +from sans_core.state.Serializer import Serializer -from sans.state.StateObjects.StateData import get_data_builder -from sans.common.enums import DetectorType, DataType, SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.common.enums import DetectorType, DataType, SANSFacility, SANSInstrument -from sans.common.constants import EMPTY_NAME -from sans.common.general_functions import create_unmanaged_algorithm -from sans.common.file_information import SANSFileInformationFactory +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.common.file_information import SANSFileInformationFactory # ----------------------------------------------- # Tests for the SANSReductionCore algorithm # ----------------------------------------------- -from sans.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter +from sans_core.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSaveTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSaveTest.py index c6a202235b51..0dd6c5ea185b 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSaveTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSaveTest.py @@ -11,8 +11,8 @@ import unittest import systemtesting -from sans.common.general_functions import create_unmanaged_algorithm -from sans.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.common.constants import EMPTY_NAME # ----------------------------------------------- diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSingleReductionTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSingleReductionTest.py index 177642f6714a..77cd21768fab 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSingleReductionTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSSingleReductionTest.py @@ -14,17 +14,17 @@ from ISIS.SANS.isis_sans_system_test import ISISSansSystemTest from mantid import config from mantid.api import AlgorithmManager, WorkspaceGroup -from sans.common.constants import EMPTY_NAME -from sans.common.enums import SANSFacility, ReductionMode, ReductionDimensionality, FitModeForMerge, SANSInstrument -from sans.common.file_information import SANSFileInformationFactory -from sans.common.general_functions import create_unmanaged_algorithm -from sans.state.Serializer import Serializer -from sans.state.StateObjects.StateData import get_data_builder +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import SANSFacility, ReductionMode, ReductionDimensionality, FitModeForMerge, SANSInstrument +from sans_core.common.file_information import SANSFileInformationFactory +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.state.Serializer import Serializer +from sans_core.state.StateObjects.StateData import get_data_builder # ---------------------------------------------------------------------------------------------------------------------- # Base class containing useful functions for the tests # ---------------------------------------------------------------------------------------------------------------------- -from sans.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter +from sans_core.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter @ISISSansSystemTest(SANSInstrument.SANS2D) diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSUtilityTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSUtilityTest.py index 3a0d159973d9..06ccd8855e20 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSUtilityTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/WORKFLOWS/SANSUtilityTest.py @@ -14,7 +14,7 @@ import os -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument def unixLikePathFromWorkspace(ws): diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMLegacyUserFileTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMLegacyUserFileTest.py index 2e7473e29ba1..e42be047c011 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMLegacyUserFileTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMLegacyUserFileTest.py @@ -5,8 +5,8 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import UseCompatibilityMode, ZOOM, MaskFile, Set1D, AssignSample, WavRangeReduction -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import UseCompatibilityMode, ZOOM, MaskFile, Set1D, AssignSample, WavRangeReduction +from sans_core.common.enums import SANSInstrument from systemtesting import MantidSystemTest diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMTomlFileConversion.py b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMTomlFileConversion.py index 13729fb52530..95eb7e774e8e 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMTomlFileConversion.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMTomlFileConversion.py @@ -7,8 +7,8 @@ from isis_sans_system_test import ISISSansSystemTest from mantid.simpleapi import GroupWorkspaces -from sans.command_interface.ISISCommandInterface import UseCompatibilityMode, ZOOM, MaskFile, BatchReduce -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import UseCompatibilityMode, ZOOM, MaskFile, BatchReduce +from sans_core.common.enums import SANSInstrument from systemtesting import MantidSystemTest diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMTomlFileTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMTomlFileTest.py index d5bcddfc542e..2bbd03ce7c60 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMTomlFileTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMTomlFileTest.py @@ -5,8 +5,8 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ZOOM, MaskFile, Set1D, AssignSample, UseCompatibilityMode, WavRangeReduction -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import ZOOM, MaskFile, Set1D, AssignSample, UseCompatibilityMode, WavRangeReduction +from sans_core.common.enums import SANSInstrument from systemtesting import MantidSystemTest diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMWavLoopsTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMWavLoopsTest.py index 838fcf160049..529b3e4d4804 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMWavLoopsTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/SANSZOOMWavLoopsTest.py @@ -5,8 +5,8 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ZOOM, MaskFile, Set1D, AssignSample, UseCompatibilityMode, WavRangeReduction -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import ZOOM, MaskFile, Set1D, AssignSample, UseCompatibilityMode, WavRangeReduction +from sans_core.common.enums import SANSInstrument from systemtesting import MantidSystemTest diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMLegacyUserFileTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMLegacyUserFileTest.py index 2e7473e29ba1..e42be047c011 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMLegacyUserFileTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMLegacyUserFileTest.py @@ -5,8 +5,8 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import UseCompatibilityMode, ZOOM, MaskFile, Set1D, AssignSample, WavRangeReduction -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import UseCompatibilityMode, ZOOM, MaskFile, Set1D, AssignSample, WavRangeReduction +from sans_core.common.enums import SANSInstrument from systemtesting import MantidSystemTest diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMTomlFileTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMTomlFileTest.py index d5bcddfc542e..2bbd03ce7c60 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMTomlFileTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMTomlFileTest.py @@ -5,8 +5,8 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ZOOM, MaskFile, Set1D, AssignSample, UseCompatibilityMode, WavRangeReduction -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import ZOOM, MaskFile, Set1D, AssignSample, UseCompatibilityMode, WavRangeReduction +from sans_core.common.enums import SANSInstrument from systemtesting import MantidSystemTest diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMTransEventData.py b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMTransEventData.py index 75fdfdba9fac..21967bd87aa3 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMTransEventData.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMTransEventData.py @@ -5,8 +5,8 @@ # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ZOOM, MaskFile, TransmissionSample, AssignSample, WavRangeReduction -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import ZOOM, MaskFile, TransmissionSample, AssignSample, WavRangeReduction +from sans_core.common.enums import SANSInstrument from systemtesting import MantidSystemTest diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMWavLoopsTest.py b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMWavLoopsTest.py index c09b95a92029..c3e2ab79a066 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMWavLoopsTest.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/ZOOM/ZOOMWavLoopsTest.py @@ -5,8 +5,8 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from isis_sans_system_test import ISISSansSystemTest -from sans.command_interface.ISISCommandInterface import ZOOM, MaskFile, Set1D, AssignSample, UseCompatibilityMode, WavRangeReduction -from sans.common.enums import SANSInstrument +from sans_core.command_interface.ISISCommandInterface import ZOOM, MaskFile, Set1D, AssignSample, UseCompatibilityMode, WavRangeReduction +from sans_core.common.enums import SANSInstrument from systemtesting import MantidSystemTest import unittest diff --git a/Testing/SystemTests/tests/framework/ISIS/SANS/isis_sans_system_test.py b/Testing/SystemTests/tests/framework/ISIS/SANS/isis_sans_system_test.py index 8d86a709ce0a..08b9ddd958dc 100644 --- a/Testing/SystemTests/tests/framework/ISIS/SANS/isis_sans_system_test.py +++ b/Testing/SystemTests/tests/framework/ISIS/SANS/isis_sans_system_test.py @@ -7,7 +7,7 @@ import pathlib from mantid import config -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument # Decorator to fix-up path to files diff --git a/Testing/SystemTests/tests/framework/LoadTest.py b/Testing/SystemTests/tests/framework/LoadTest.py index 7386a0f9aa21..dfbd1ef1c889 100644 --- a/Testing/SystemTests/tests/framework/LoadTest.py +++ b/Testing/SystemTests/tests/framework/LoadTest.py @@ -19,7 +19,7 @@ import unittest -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument DIFF_PLACES = 8 diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/ISIS_SANS.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/ISIS_SANS.py index 6d40ed343288..148d8f8a01f9 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/ISIS_SANS.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/ISIS_SANS.py @@ -11,7 +11,7 @@ import sys from qtpy import QtCore -from sans.common.enums import SANSFacility +from sans_core.common.enums import SANSFacility from mantidqtinterfaces.sans_isis.gui_logic.models.run_tab_model import RunTabModel from mantidqtinterfaces.sans_isis.gui_logic.presenter.run_tab_presenter import RunTabPresenter from mantidqtinterfaces.sans_isis.views import sans_data_processor_gui diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/gui_common.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/gui_common.py index 5de46130193b..670c7f1bc4df 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/gui_common.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/gui_common.py @@ -8,12 +8,12 @@ from qtpy.QtCore import QSettings from qtpy.QtWidgets import QFileDialog -from sans.common.constant_containers import ( +from sans_core.common.constant_containers import ( SANSInstrument_enum_as_key, SANSInstrument_string_as_key_NoInstrument, SANSInstrument_string_list, ) -from sans.common.enums import ReductionMode, DetectorType, SANSInstrument +from sans_core.common.enums import ReductionMode, DetectorType, SANSInstrument # ---------------------------------------------------------------------------------------------------------------------- diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/POD/save_options.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/POD/save_options.py index c044c2fe956f..585177c28e5f 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/POD/save_options.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/POD/save_options.py @@ -5,7 +5,7 @@ # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from mantid.py36compat import dataclass -from sans.common.enums import SaveType +from sans_core.common.enums import SaveType @dataclass diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/SummationSettingsModel.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/SummationSettingsModel.py index 336372b8dac2..e3c4b999abfa 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/SummationSettingsModel.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/SummationSettingsModel.py @@ -5,7 +5,7 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.kernel import ConfigService -from sans.common.enums import BinningType +from sans_core.common.enums import BinningType class OverlayEventWorkspaces(object): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/beam_centre_async.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/beam_centre_async.py index c32de828077b..a372ba286d01 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/beam_centre_async.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/beam_centre_async.py @@ -10,9 +10,9 @@ from mantidqt.utils.async_qt_adaptor import qt_async_task, IQtAsync from mantid.kernel import Logger from mantidqt.utils.asynchronous import AsyncTaskFailure, AsyncTaskSuccess -from sans.common.enums import DetectorType, FindDirectionEnum -from sans.sans_batch import SANSCentreFinder -from sans.state.AllStates import AllStates +from sans_core.common.enums import DetectorType, FindDirectionEnum +from sans_core.sans_batch import SANSCentreFinder +from sans_core.state.AllStates import AllStates if TYPE_CHECKING: # Avoid circular dependencies at runtime diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/diagnostic_async.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/diagnostic_async.py index c4a0098a645f..6301f97e9979 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/diagnostic_async.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/diagnostic_async.py @@ -9,15 +9,15 @@ from mantid.simpleapi import SumSpectra, ConvertAxesToRealSpace from mantidqt.utils.async_qt_adaptor import IQtAsync, qt_async_task from mantidqt.utils.asynchronous import AsyncTaskSuccess -from sans.algorithm_detail.batch_execution import provide_loaded_data, create_unmanaged_algorithm, add_to_group -from sans.algorithm_detail.crop_helper import get_component_name -from sans.algorithm_detail.mask_sans_workspace import mask_workspace -from sans.common.constants import EMPTY_NAME -from sans.common.enums import IntegralEnum, DetectorType, SANSDataType -from sans.common.file_information import get_instrument_paths_for_sans_file -from sans.common.general_functions import parse_diagnostic_settings -from sans.common.xml_parsing import get_named_elements_from_ipf_file -from sans.common.plotting import get_plotting_module +from sans_core.algorithm_detail.batch_execution import provide_loaded_data, create_unmanaged_algorithm, add_to_group +from sans_core.algorithm_detail.crop_helper import get_component_name +from sans_core.algorithm_detail.mask_sans_workspace import mask_workspace +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import IntegralEnum, DetectorType, SANSDataType +from sans_core.common.file_information import get_instrument_paths_for_sans_file +from sans_core.common.general_functions import parse_diagnostic_settings +from sans_core.common.xml_parsing import get_named_elements_from_ipf_file +from sans_core.common.plotting import get_plotting_module from typing import TYPE_CHECKING diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/masking_table_async.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/masking_table_async.py index 8111028abd82..a54dae33060a 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/masking_table_async.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/masking_table_async.py @@ -10,12 +10,12 @@ from mantid.api import AnalysisDataService from mantidqt.utils.async_qt_adaptor import IQtAsync, qt_async_task from mantidqt.utils.asynchronous import AsyncTaskSuccess, AsyncTaskFailure -from sans.algorithm_detail.mask_sans_workspace import mask_workspace -from sans.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes -from sans.state.Serializer import Serializer -from sans.common.enums import DetectorType -from sans.common.constants import EMPTY_NAME -from sans.common.general_functions import create_unmanaged_algorithm +from sans_core.algorithm_detail.mask_sans_workspace import mask_workspace +from sans_core.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes +from sans_core.state.Serializer import Serializer +from sans_core.common.enums import DetectorType +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_unmanaged_algorithm if TYPE_CHECKING: from mantidqtinterfaces.sans_isis.gui_logic.presenter.masking_table_presenter import MaskingTablePresenter diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/sans_run_tab_async.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/sans_run_tab_async.py index 8da8a85c24ac..9bea53914a9a 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/sans_run_tab_async.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/async_workers/sans_run_tab_async.py @@ -12,10 +12,10 @@ from mantid.kernel import Logger from mantidqt.utils.async_qt_adaptor import qt_async_task, IQtAsync from mantidqt.utils.asynchronous import AsyncTaskSuccess, AsyncTaskFailure -from sans.algorithm_detail.batch_execution import load_workspaces_from_states -from sans.common.enums import ReductionMode, RowState -from sans.common.RowEntries import RowEntries -from sans.sans_batch import SANSBatchReduction +from sans_core.algorithm_detail.batch_execution import load_workspaces_from_states +from sans_core.common.enums import ReductionMode, RowState +from sans_core.common.RowEntries import RowEntries +from sans_core.sans_batch import SANSBatchReduction class SignalNotifyProgress(QObject): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/beam_centre_model.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/beam_centre_model.py index 972d0f33f534..3f5da64c9950 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/beam_centre_model.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/beam_centre_model.py @@ -5,7 +5,7 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.kernel import Logger -from sans.common.enums import FindDirectionEnum, DetectorType, SANSInstrument +from sans_core.common.enums import FindDirectionEnum, DetectorType, SANSInstrument from mantidqtinterfaces.sans_isis.gui_logic.gui_common import ( meter_2_millimeter, millimeter_2_meter, diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/diagnostics_model.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/diagnostics_model.py index 8d1a4ee4c263..0a5f7cffa072 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/diagnostics_model.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/diagnostics_model.py @@ -4,7 +4,7 @@ # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + -from sans.common.RowEntries import RowEntries +from sans_core.common.RowEntries import RowEntries from mantidqtinterfaces.sans_isis.gui_logic.presenter.gui_state_director import GuiStateDirector diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/file_loading.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/file_loading.py index d3f39d2acaf3..d57c4423a7de 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/file_loading.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/file_loading.py @@ -4,8 +4,8 @@ # NScD Oak Ridge National Laboratory, European Spallation Source # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + -from sans.user_file.toml_parsers.toml_parser import TomlParser -from sans.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter +from sans_core.user_file.toml_parsers.toml_parser import TomlParser +from sans_core.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter class UserFileLoadException(Exception): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/model_common.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/model_common.py index 5ab06d58cf73..fc3a4ce3905f 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/model_common.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/model_common.py @@ -7,8 +7,8 @@ """The settings diagnostic tab which visualizes the SANS state object.""" from abc import ABCMeta -from sans.common.enums import SANSInstrument -from sans.state.AllStates import AllStates +from sans_core.common.enums import SANSInstrument +from sans_core.state.AllStates import AllStates class ModelCommon(metaclass=ABCMeta): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/run_tab_model.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/run_tab_model.py index d63012340684..2f2ea12722a2 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/run_tab_model.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/run_tab_model.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + from mantidqtinterfaces.sans_isis.gui_logic.models.POD.save_options import SaveOptions -from sans.common.enums import ReductionDimensionality +from sans_core.common.enums import ReductionDimensionality class RunTabModel: diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/settings_adjustment_model.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/settings_adjustment_model.py index d36dd9990357..6e837a6b60f4 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/settings_adjustment_model.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/settings_adjustment_model.py @@ -10,9 +10,9 @@ are not available in the model associated with the data table. """ -from sans.common.enums import SANSInstrument, DataType, DetectorType, RebinType +from sans_core.common.enums import SANSInstrument, DataType, DetectorType, RebinType from mantidqtinterfaces.sans_isis.gui_logic.models.model_common import ModelCommon -from sans.state.StateObjects.StateCalculateTransmission import StateTransmissionFit +from sans_core.state.StateObjects.StateCalculateTransmission import StateTransmissionFit from mantidqtinterfaces.sans_isis.gui_logic.gui_common import meter_2_millimeter, millimeter_2_meter diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/state_gui_model.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/state_gui_model.py index 54afd93b17ae..e78a248b6e8e 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/state_gui_model.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/state_gui_model.py @@ -12,17 +12,17 @@ from typing import Union -from sans.common.enums import ReductionDimensionality, ReductionMode, RangeStepType, SaveType, DetectorType, FitModeForMerge -from sans.common.general_functions import get_ranges_from_event_slice_setting, wav_ranges_to_str +from sans_core.common.enums import ReductionDimensionality, ReductionMode, RangeStepType, SaveType, DetectorType, FitModeForMerge +from sans_core.common.general_functions import get_ranges_from_event_slice_setting, wav_ranges_to_str from mantidqtinterfaces.sans_isis.gui_logic.models.model_common import ModelCommon -from sans.state.AllStates import AllStates +from sans_core.state.AllStates import AllStates from mantidqtinterfaces.sans_isis.gui_logic.gui_common import ( meter_2_millimeter, millimeter_2_meter, apply_selective_view_scaling, undo_selective_view_scaling, ) -from sans.user_file.parser_helpers.wavelength_parser import parse_range_wavelength +from sans_core.user_file.parser_helpers.wavelength_parser import parse_range_wavelength class StateGuiModel(ModelCommon): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/table_model.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/table_model.py index 90b4feede951..7d42abc70f09 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/table_model.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/models/table_model.py @@ -14,8 +14,8 @@ from typing import List from mantid.kernel import Logger -from sans.common.enums import RowState -from sans.common.RowEntries import RowEntries +from sans_core.common.enums import RowState +from sans_core.common.RowEntries import RowEntries from mantidqtinterfaces.sans_isis.gui_logic.models.basic_hint_strategy import BasicHintStrategy diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/add_runs_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/add_runs_presenter.py index 5f4952adbbec..4fcd0597a98c 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/add_runs_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/add_runs_presenter.py @@ -8,8 +8,8 @@ from mantid.kernel import ConfigService from enum import Enum -from sans.common.enums import BinningType -from sans.common.file_information import SANSFileInformationFactory +from sans_core.common.enums import BinningType +from sans_core.common.file_information import SANSFileInformationFactory from mantidqtinterfaces.sans_isis.gui_logic.gui_common import SANSGuiPropertiesHandler from mantidqtinterfaces.sans_isis.gui_logic.models.RunSelectionModel import RunSelectionModel from mantidqtinterfaces.sans_isis.gui_logic.models.SummationSettingsModel import SummationSettingsModel diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/beam_centre_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/beam_centre_presenter.py index 0911c812d2be..6c80af954715 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/beam_centre_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/beam_centre_presenter.py @@ -7,7 +7,7 @@ import copy from typing import Dict -from sans.common.enums import DetectorType +from sans_core.common.enums import DetectorType from mantid import UsageService from mantid.kernel import FeatureType from mantid.kernel import Logger diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/diagnostic_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/diagnostic_presenter.py index d9319075a9da..abc9f15e2e9a 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/diagnostic_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/diagnostic_presenter.py @@ -8,7 +8,7 @@ from mantid import UsageService from mantid.kernel import FeatureType from mantidqtinterfaces.sans_isis.views.diagnostics_page import DiagnosticsPage -from sans.common.enums import IntegralEnum +from sans_core.common.enums import IntegralEnum from mantidqtinterfaces.sans_isis.gui_logic.gui_common import get_detector_strings_for_diagnostic_page, get_detector_from_gui_selection from mantidqtinterfaces.sans_isis.gui_logic.models.async_workers.diagnostic_async import DiagnosticsAsync from mantidqtinterfaces.sans_isis.gui_logic.models.diagnostics_model import DiagnosticsModel diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/gui_state_director.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/gui_state_director.py index d9ea4b3b1ca1..8bdd38d19a54 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/gui_state_director.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/gui_state_director.py @@ -14,11 +14,11 @@ import os from mantid import FileFinder -from sans.common.file_information import SANSFileInformationBlank -from sans.common.RowEntries import RowEntries +from sans_core.common.file_information import SANSFileInformationBlank +from sans_core.common.RowEntries import RowEntries from mantidqtinterfaces.sans_isis.gui_logic.models.file_loading import FileLoading from mantidqtinterfaces.sans_isis.gui_logic.models.state_gui_model import StateGuiModel -from sans.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateData import get_data_builder class GuiStateDirector(object): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/masking_table_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/masking_table_presenter.py index 703facede528..6de7684b468f 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/masking_table_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/masking_table_presenter.py @@ -13,7 +13,7 @@ from mantid.api import AnalysisDataService from mantid.kernel import Logger -from sans.common.enums import DetectorType +from sans_core.common.enums import DetectorType from mantidqtinterfaces.sans_isis.gui_logic.models.async_workers.masking_table_async import MaskingTableAsync from mantidqt.widgets.instrumentview.presenter import InstrumentViewPresenter diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/run_tab_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/run_tab_presenter.py index 4ae3b3656975..cca1f3d964ab 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/run_tab_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/run_tab_presenter.py @@ -18,15 +18,15 @@ from typing import Optional from mantidqt.utils.observer_pattern import GenericObserver -from sans.user_file.toml_parsers.toml_v1_schema import TomlValidationError +from sans_core.user_file.toml_parsers.toml_v1_schema import TomlValidationError from mantidqtinterfaces.sans_isis.views import SANSSaveOtherWindow from mantidqtinterfaces.sans_isis.views.sans_data_processor_gui import SANSDataProcessorGui from mantidqtinterfaces.sans_isis.views.sans_gui_observable import SansGuiObservable from mantid.api import FileFinder from mantid.kernel import Logger, ConfigService, ConfigPropertyObserver -from sans.command_interface.batch_csv_parser import BatchCsvParser -from sans.common.enums import ( +from sans_core.command_interface.batch_csv_parser import BatchCsvParser +from sans_core.common.enums import ( ReductionMode, RangeStepType, RowState, @@ -43,7 +43,7 @@ get_string_for_gui_from_instrument, SANSGuiPropertiesHandler, ) -from sans.common.RowEntries import RowEntries +from sans_core.common.RowEntries import RowEntries from mantidqtinterfaces.sans_isis.gui_logic.models.async_workers.sans_run_tab_async import SansRunTabAsync from mantidqtinterfaces.sans_isis.gui_logic.models.create_state import create_states from mantidqtinterfaces.sans_isis.gui_logic.models.file_loading import FileLoading, UserFileLoadException @@ -59,7 +59,7 @@ from mantidqtinterfaces.sans_isis.gui_logic.presenter.save_other_presenter import SaveOtherPresenter from mantidqtinterfaces.sans_isis.gui_logic.presenter.settings_adjustment_presenter import SettingsAdjustmentPresenter from mantidqtinterfaces.sans_isis.gui_logic.presenter.settings_diagnostic_presenter import SettingsDiagnosticPresenter -from sans.state.AllStates import AllStates +from sans_core.state.AllStates import AllStates from mantid.plots.plotfunctions import get_plot_fig row_state_to_colour_mapping = {RowState.UNPROCESSED: "#FFFFFF", RowState.PROCESSED: "#d0f4d0", RowState.ERROR: "#accbff"} diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/save_other_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/save_other_presenter.py index 03fa9c2174a1..b549ba5fab41 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/save_other_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/save_other_presenter.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + from mantid import ConfigService from mantid import AnalysisDataService -from sans.algorithm_detail.batch_execution import save_workspace_to_file +from sans_core.algorithm_detail.batch_execution import save_workspace_to_file import os from mantid.api import WorkspaceGroup from mantid.kernel import logger diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/settings_adjustment_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/settings_adjustment_presenter.py index 365972e9234b..503aa90e16db 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/settings_adjustment_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/settings_adjustment_presenter.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + """The settings diagnostic tab which visualizes the SANS state object.""" -from sans.common.enums import FitType +from sans_core.common.enums import FitType from mantidqtinterfaces.sans_isis.gui_logic.presenter.presenter_common import PresenterCommon diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/settings_diagnostic_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/settings_diagnostic_presenter.py index 0c64a15dd8a5..f846405de82f 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/settings_diagnostic_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/settings_diagnostic_presenter.py @@ -15,8 +15,8 @@ from mantid import UsageService from mantid.kernel import FeatureType from mantidqtinterfaces.sans_isis.gui_logic.gui_common import JSON_SUFFIX -from sans.state.AllStates import AllStates -from sans.state.Serializer import Serializer +from sans_core.state.AllStates import AllStates +from sans_core.state.Serializer import Serializer class SettingsDiagnosticPresenter(object): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/summation_settings_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/summation_settings_presenter.py index 586b528ff32f..00aea461d455 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/summation_settings_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/presenter/summation_settings_presenter.py @@ -4,7 +4,7 @@ # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + -from sans.common.enums import BinningType +from sans_core.common.enums import BinningType class SummationSettingsPresenter(object): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/create_state_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/create_state_test.py index 962f26d7182c..a78bdc644b3c 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/create_state_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/create_state_test.py @@ -7,11 +7,11 @@ import unittest from unittest import mock -from sans.common.enums import SANSFacility -from sans.common.RowEntries import RowEntries +from sans_core.common.enums import SANSFacility +from sans_core.common.RowEntries import RowEntries from mantidqtinterfaces.sans_isis.gui_logic.models.create_state import create_states from mantidqtinterfaces.sans_isis.gui_logic.models.state_gui_model import StateGuiModel -from sans.state.AllStates import AllStates +from sans_core.state.AllStates import AllStates class GuiCommonTest(unittest.TestCase): @@ -22,7 +22,7 @@ def setUp(self): self.gui_state_director_instance = mock.MagicMock() self.gui_state_director_instance.create_state.return_value = self.state_gui_model - self.patcher = mock.patch("sans.test.model_tests.create_state.GuiStateDirector") + self.patcher = mock.patch("mantidqtinterfaces.sans_isis.gui_logic.test.model_tests.create_state.GuiStateDirector") self.addCleanup(self.patcher.stop) self.gui_state_director = self.patcher.start() self.gui_state_director.return_value = self.gui_state_director_instance diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/gui_common_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/gui_common_test.py index 208b95da69bc..ec28c6e2cdf1 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/gui_common_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/gui_common_test.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from sans.common.enums import SANSInstrument, ReductionMode +from sans_core.common.enums import SANSInstrument, ReductionMode from mantidqtinterfaces.sans_isis.gui_logic.gui_common import ( get_reduction_mode_strings_for_gui, get_reduction_selection, diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/gui_state_director_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/gui_state_director_test.py index 37342762b3db..93ac55c1d13e 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/gui_state_director_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/gui_state_director_test.py @@ -8,13 +8,13 @@ import unittest from unittest import mock -from sans.common.enums import SANSFacility -from sans.common.RowEntries import RowEntries +from sans_core.common.enums import SANSFacility +from sans_core.common.RowEntries import RowEntries from mantidqtinterfaces.sans_isis.gui_logic.models.state_gui_model import StateGuiModel -from sans.state.StateObjects.StateSave import StateSave +from sans_core.state.StateObjects.StateSave import StateSave from mantidqtinterfaces.sans_isis.gui_logic.presenter.gui_state_director import GuiStateDirector -from sans.test_helper.user_file_test_helper import create_user_file, sample_user_file -from sans.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter +from sans_core.test_helper.user_file_test_helper import create_user_file, sample_user_file +from sans_core.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter class GuiStateDirectorTest(unittest.TestCase): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/mock_objects.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/mock_objects.py index 1bc7498787a3..40b62eec1ba9 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/mock_objects.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/mock_objects.py @@ -7,9 +7,9 @@ from functools import partial from unittest import mock -from sans.common.enums import RangeStepType, OutputMode, SANSFacility, SANSInstrument -from sans.state.JsonSerializable import JsonSerializable -from sans.test_helper.test_director import TestDirector +from sans_core.common.enums import RangeStepType, OutputMode, SANSFacility, SANSInstrument +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.test_helper.test_director import TestDirector from mantidqtinterfaces.sans_isis.gui_logic.presenter.run_tab_presenter import RunTabPresenter from mantidqtinterfaces.sans_isis.views.sans_data_processor_gui import SANSDataProcessorGui from mantidqtinterfaces.sans_isis.views.settings_diagnostic_tab import SettingsDiagnosticTab diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/async_workers/test_beam_centre_async.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/async_workers/test_beam_centre_async.py index 94ca7b11dc6a..f557f953da49 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/async_workers/test_beam_centre_async.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/async_workers/test_beam_centre_async.py @@ -9,7 +9,7 @@ from unittest.mock import call -from sans.common.enums import DetectorType +from sans_core.common.enums import DetectorType from mantidqtinterfaces.sans_isis.gui_logic.models.async_workers.beam_centre_async import BeamCentreAsync from mantidqtinterfaces.sans_isis.gui_logic.presenter.beam_centre_presenter import BeamCentrePresenter diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/async_workers/test_sans_run_tab_async.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/async_workers/test_sans_run_tab_async.py index 1227d4c01288..6b982266472a 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/async_workers/test_sans_run_tab_async.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/async_workers/test_sans_run_tab_async.py @@ -9,7 +9,7 @@ from unittest.mock import call from unittest import mock -from sans.common.enums import OutputMode, RowState +from sans_core.common.enums import OutputMode, RowState from mantidqtinterfaces.sans_isis.gui_logic.models.async_workers.sans_run_tab_async import SansRunTabAsync diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/beam_centre_model_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/beam_centre_model_test.py index c95e7fb595b8..b74d6cfb7706 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/beam_centre_model_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/beam_centre_model_test.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from sans.common.enums import SANSInstrument, DetectorType +from sans_core.common.enums import SANSInstrument, DetectorType from mantidqtinterfaces.sans_isis.gui_logic.models.beam_centre_model import BeamCentreModel diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/diagnostics_page_model_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/diagnostics_page_model_test.py index a48e7463adea..abaaca708db8 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/diagnostics_page_model_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/diagnostics_page_model_test.py @@ -6,11 +6,11 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSFacility +from sans_core.common.enums import SANSFacility from mantidqtinterfaces.sans_isis.gui_logic.models.diagnostics_model import DiagnosticsModel from mantidqtinterfaces.sans_isis.gui_logic.models.state_gui_model import StateGuiModel -from sans.test_helper.user_file_test_helper import sample_user_file, create_user_file -from sans.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter +from sans_core.test_helper.user_file_test_helper import sample_user_file, create_user_file +from sans_core.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter class DiagnosticsPageModelTest(unittest.TestCase): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/state_gui_model_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/state_gui_model_test.py index fd28cd88a382..7da8e0ab7423 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/state_gui_model_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/state_gui_model_test.py @@ -7,7 +7,7 @@ import itertools import unittest -from sans.common.enums import ( +from sans_core.common.enums import ( ReductionDimensionality, ReductionMode, RangeStepType, @@ -18,8 +18,8 @@ DetectorType, ) from mantidqtinterfaces.sans_isis.gui_logic.models.state_gui_model import StateGuiModel -from sans.state.AllStates import AllStates -from sans.state.StateObjects.StateMoveDetectors import StateMoveDetectors +from sans_core.state.AllStates import AllStates +from sans_core.state.StateObjects.StateMoveDetectors import StateMoveDetectors class StateGuiModelTest(unittest.TestCase): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/summation_settings_model_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/summation_settings_model_test.py index 6fba682e4cb0..3fd77437b39f 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/summation_settings_model_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/summation_settings_model_test.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import BinningType +from sans_core.common.enums import BinningType from mantidqtinterfaces.sans_isis.gui_logic.models.SummationSettingsModel import SummationSettingsModel diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/table_model_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/table_model_test.py index 2790af003f99..e35511d624c2 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/table_model_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/table_model_test.py @@ -6,8 +6,8 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import RowState -from sans.common.RowEntries import RowEntries +from sans_core.common.enums import RowState +from sans_core.common.RowEntries import RowEntries from mantidqtinterfaces.sans_isis.gui_logic.models.basic_hint_strategy import BasicHintStrategy from mantidqtinterfaces.sans_isis.gui_logic.models.table_model import TableModel diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_row_entries.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_row_entries.py index 2c375c8653ac..2f8a7a05961b 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_row_entries.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_row_entries.py @@ -7,8 +7,8 @@ import copy import unittest -from sans.common.enums import RowState -from sans.common.RowEntries import RowEntries, _UserEntries +from sans_core.common.enums import RowState +from sans_core.common.RowEntries import RowEntries, _UserEntries class RowEntriesTest(unittest.TestCase): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_run_tab_model.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_run_tab_model.py index 4ded103462f3..ade1caf741bb 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_run_tab_model.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_run_tab_model.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import ReductionDimensionality +from sans_core.common.enums import ReductionDimensionality from mantidqtinterfaces.sans_isis.gui_logic.models.POD.save_options import SaveOptions from mantidqtinterfaces.sans_isis.gui_logic.models.run_tab_model import RunTabModel diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_save_options.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_save_options.py index 09c3888aa6d6..ba1ed8002f0f 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_save_options.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_save_options.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SaveType +from sans_core.common.enums import SaveType from mantidqtinterfaces.sans_isis.gui_logic.models.POD.save_options import SaveOptions diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_settings_adjustment_model.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_settings_adjustment_model.py index ae0e1fa99dc5..d1637ca58434 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_settings_adjustment_model.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/model_tests/test_settings_adjustment_model.py @@ -7,10 +7,10 @@ import unittest from unittest import mock -from sans.common.enums import SANSInstrument, FitType +from sans_core.common.enums import SANSInstrument, FitType from mantidqtinterfaces.sans_isis.gui_logic.models.settings_adjustment_model import SettingsAdjustmentModel -from sans.user_file.settings_tags import DetectorId -from sans.user_file.txt_parsers.CommandInterfaceAdapter import CommandInterfaceAdapter +from sans_core.user_file.settings_tags import DetectorId +from sans_core.user_file.txt_parsers.CommandInterfaceAdapter import CommandInterfaceAdapter class SettingsTransmissionModelTest(unittest.TestCase): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/add_runs_presenter_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/add_runs_presenter_test.py index 21fccb0654f5..c08388119550 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/add_runs_presenter_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/add_runs_presenter_test.py @@ -9,7 +9,7 @@ from mantid.kernel import ConfigService from unittest import mock -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument from mantidqtinterfaces.sans_isis.gui_logic.models.sum_runs_model import SumRunsModel from mantidqtinterfaces.sans_isis.gui_logic.models.SummationSettingsModel import SummationSettingsModel from mantidqtinterfaces.sans_isis.gui_logic.models.run_file import SummableRunFile diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/beam_centre_presenter_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/beam_centre_presenter_test.py index c91250783f44..8c6007559244 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/beam_centre_presenter_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/beam_centre_presenter_test.py @@ -8,7 +8,7 @@ import random from unittest import mock -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument from mantidqtinterfaces.sans_isis.gui_logic.presenter.beam_centre_presenter import BeamCentrePresenter from mantidqtinterfaces.sans_isis.gui_logic.test.mock_objects import create_mock_beam_centre_tab from mantidqtinterfaces.sans_isis.gui_logic.test.mock_objects import create_run_tab_presenter_mock diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/diagnostics_page_presenter_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/diagnostics_page_presenter_test.py index 20a8a928d72d..ffc27b5580c3 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/diagnostics_page_presenter_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/diagnostics_page_presenter_test.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from sans.common.enums import SANSInstrument, DetectorType, IntegralEnum, SANSFacility +from sans_core.common.enums import SANSInstrument, DetectorType, IntegralEnum, SANSFacility from mantidqtinterfaces.sans_isis.gui_logic.presenter.diagnostic_presenter import DiagnosticsPagePresenter from mantidqtinterfaces.sans_isis.gui_logic.test.mock_objects import create_mock_diagnostics_tab from mantidqtinterfaces.sans_isis.gui_logic.test.mock_objects import create_run_tab_presenter_mock diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/settings_adjustment_presenter_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/settings_adjustment_presenter_test.py index 0140e7cfe697..1577f925c58b 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/settings_adjustment_presenter_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/settings_adjustment_presenter_test.py @@ -7,7 +7,7 @@ import unittest from unittest.mock import Mock -from sans.common.enums import SANSInstrument +from sans_core.common.enums import SANSInstrument from mantidqtinterfaces.sans_isis.gui_logic.presenter.settings_adjustment_presenter import SettingsAdjustmentPresenter diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/settings_diagnostic_presenter_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/settings_diagnostic_presenter_test.py index e8f14ed09de8..74b194d0c257 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/settings_diagnostic_presenter_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/settings_diagnostic_presenter_test.py @@ -10,7 +10,7 @@ from unittest import mock from mantidqtinterfaces.sans_isis.gui_logic.presenter.settings_diagnostic_presenter import SettingsDiagnosticPresenter -from sans.state.Serializer import Serializer +from sans_core.state.Serializer import Serializer from mantidqtinterfaces.sans_isis.gui_logic.test.mock_objects import ( create_run_tab_presenter_mock, FakeState, diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/summation_settings_presenter_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/summation_settings_presenter_test.py index 2ef1a77c68e1..fea9ce30b610 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/summation_settings_presenter_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/summation_settings_presenter_test.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from sans.common.enums import BinningType +from sans_core.common.enums import BinningType from mantidqtinterfaces.sans_isis.gui_logic.models.SummationSettingsModel import SummationSettingsModel from mantidqtinterfaces.sans_isis.gui_logic.presenter.summation_settings_presenter import SummationSettingsPresenter from mantidqtinterfaces.sans_isis.summation_settings_widget import SummationSettingsWidget diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/test_run_tab_presenter.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/test_run_tab_presenter.py index d92056d0c2be..49c785ae7af5 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/test_run_tab_presenter.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/presenter_tests/test_run_tab_presenter.py @@ -9,21 +9,21 @@ from mantid.kernel import PropertyManagerDataService from mantid.kernel import config -from sans.command_interface.batch_csv_parser import BatchCsvParser -from sans.common.enums import SANSFacility, ReductionDimensionality, SaveType, RowState, OutputMode -from sans.common.enums import SANSInstrument -from sans.common.RowEntries import RowEntries +from sans_core.command_interface.batch_csv_parser import BatchCsvParser +from sans_core.common.enums import SANSFacility, ReductionDimensionality, SaveType, RowState, OutputMode +from sans_core.common.enums import SANSInstrument +from sans_core.common.RowEntries import RowEntries from mantidqtinterfaces.sans_isis.gui_logic.models.file_loading import UserFileLoadException from mantidqtinterfaces.sans_isis.gui_logic.models.run_tab_model import RunTabModel from mantidqtinterfaces.sans_isis.gui_logic.models.state_gui_model import StateGuiModel from mantidqtinterfaces.sans_isis.gui_logic.models.table_model import TableModel from mantidqtinterfaces.sans_isis.gui_logic.presenter.run_tab_presenter import RunTabPresenter -from sans.state.AllStates import AllStates -from sans.test_helper.common import remove_file +from sans_core.state.AllStates import AllStates +from sans_core.test_helper.common import remove_file from mantidqtinterfaces.sans_isis.gui_logic.test.mock_objects import create_mock_view -from sans.test_helper.user_file_test_helper import create_user_file, sample_user_file +from sans_core.test_helper.user_file_test_helper import create_user_file, sample_user_file from mantidqtinterfaces.sans_isis.views.sans_gui_observable import SansGuiObservable -from sans.user_file.toml_parsers.toml_v1_schema import TomlValidationError +from sans_core.user_file.toml_parsers.toml_v1_schema import TomlValidationError BATCH_FILE_TEST_CONTENT_1 = [ RowEntries(sample_scatter=1, sample_transmission=2, sample_direct=3, output_name="test_file", user_file="user_test_file"), diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/wavelength_interval_test.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/wavelength_interval_test.py index 13ec5233bb4d..a20526a4388b 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/wavelength_interval_test.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/gui_logic/test/wavelength_interval_test.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.state.StateObjects.wavelength_interval import WavelengthInterval +from sans_core.state.StateObjects.wavelength_interval import WavelengthInterval class WavelengthIntervalTest(unittest.TestCase): diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/SANSSaveOtherWindow.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/SANSSaveOtherWindow.py index 4e123601b7cc..9a5fddc5c517 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/SANSSaveOtherWindow.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/SANSSaveOtherWindow.py @@ -11,7 +11,7 @@ from mantid import UsageService from mantid.kernel import FeatureType -from sans.common.enums import SaveType +from sans_core.common.enums import SaveType Ui_SaveOtherDialog, _ = load_ui(__file__, "save_other_dialog.ui") diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/sans_data_processor_gui.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/sans_data_processor_gui.py index 4e2e05e7125d..1d1fadff414a 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/sans_data_processor_gui.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/sans_data_processor_gui.py @@ -20,7 +20,7 @@ from mantidqt.utils.qt import load_ui from mantidqt.widgets import jobtreeview, manageuserdirectories from reduction_gui.reduction.scripter import execute_script -from sans.common.enums import ReductionDimensionality, OutputMode, SANSInstrument, RangeStepType, ReductionMode, FitType +from sans_core.common.enums import ReductionDimensionality, OutputMode, SANSInstrument, RangeStepType, ReductionMode, FitType from mantidqtinterfaces.sans_isis.gui_logic.gui_common import ( get_reduction_mode_from_gui_selection, get_reduction_mode_strings_for_gui, @@ -32,7 +32,7 @@ get_instrument_from_gui_selection, ) from mantidqtinterfaces.sans_isis.gui_logic.models.POD.save_options import SaveOptions -from sans.common.RowEntries import RowEntries +from sans_core.common.RowEntries import RowEntries from mantidqtinterfaces.sans_isis.gui_logic.models.sum_runs_model import SumRunsModel from mantidqtinterfaces.sans_isis.gui_logic.presenter.add_runs_presenter import AddRunsPagePresenter from mantidqtinterfaces.sans_isis.views.SANSSaveOtherWindow import SANSSaveOtherDialog diff --git a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/summation_settings_widget.py b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/summation_settings_widget.py index 81137f29f494..8abe94b169cc 100644 --- a/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/summation_settings_widget.py +++ b/qt/python/mantidqtinterfaces/mantidqtinterfaces/sans_isis/views/summation_settings_widget.py @@ -8,7 +8,7 @@ from qtpy.QtCore import Signal from mantidqt.utils.qt import load_ui -from sans.common.enums import BinningType +from sans_core.common.enums import BinningType Ui_SummationSettingsWidget, _ = load_ui(__file__, "summation_settings_widget.ui") diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 92f77e9f7e09..6cf1ead02188 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -15,7 +15,7 @@ set(_pth_dirs Inelastic Interface Reflectometry - sans + sans_core SCD_Reduction TemporaryREF_MScripts ) diff --git a/scripts/sans/DarkRunCorrection.py b/scripts/sans_core/DarkRunCorrection.py similarity index 100% rename from scripts/sans/DarkRunCorrection.py rename to scripts/sans_core/DarkRunCorrection.py diff --git a/scripts/sans/ISISCommandInterface.py b/scripts/sans_core/ISISCommandInterface.py similarity index 99% rename from scripts/sans/ISISCommandInterface.py rename to scripts/sans_core/ISISCommandInterface.py index b8ff0b88f365..7fae7ae6c305 100644 --- a/scripts/sans/ISISCommandInterface.py +++ b/scripts/sans_core/ISISCommandInterface.py @@ -30,7 +30,7 @@ warnings.warn( "This ISIS Command Interface is deprecated.\n" "Please change 'import ISISCommandInterface' or 'from ISISCommandInterface'" - "to use 'sans.command_interface.ISISCommandInterface' instead.", + "to use 'sans_core.command_interface.ISISCommandInterface' instead.", DeprecationWarning, stacklevel=2, ) @@ -822,7 +822,7 @@ def CompWavRanges(wavelens, plot=True, combineDet=None, resetSetup=True): if plot: raise NotImplementedError( "Plotting on the deprecated ISISCommandInterface required MantidPlot and is no" - " longer implemented. Please switch to sans.command_interface.ISISCommandInterface" + " longer implemented. Please switch to sans_core.command_interface.ISISCommandInterface" ) # return just the workspace name of the full range @@ -859,7 +859,7 @@ def PhiRanges(phis, plot=True): if plot: raise NotImplementedError( "Plotting on the deprecated ISISCommandInterface required MantidPlot and is no" - " longer implemented. Please switch to sans.command_interface.ISISCommandInterface" + " longer implemented. Please switch to sans_core.command_interface.ISISCommandInterface" ) # return just the workspace name of the full range @@ -1040,7 +1040,7 @@ def PlotResult(workspace, canvas=None): """ raise NotImplementedError( "Plotting on the deprecated ISISCommandInterface required MantidPlot and is no" - " longer implemented. Please switch to sans.command_interface.ISISCommandInterface" + " longer implemented. Please switch to sans_core.command_interface.ISISCommandInterface" ) @@ -2087,7 +2087,8 @@ def ViewCurrentMask(): detectors in the bank in a different colour """ raise NotImplementedError( - "This is no longer implemented as it required MantidPlot, please switch" "to sans.command_interface.ISISCommandInterface instead" + "This is no longer implemented as it required MantidPlot, please switch" + "to sans_core.command_interface.ISISCommandInterface instead" ) diff --git a/scripts/sans/README.md b/scripts/sans_core/README.md similarity index 100% rename from scripts/sans/README.md rename to scripts/sans_core/README.md diff --git a/scripts/sans/SANSBatchMode.py b/scripts/sans_core/SANSBatchMode.py similarity index 100% rename from scripts/sans/SANSBatchMode.py rename to scripts/sans_core/SANSBatchMode.py diff --git a/scripts/sans/SANSUserFileParser.py b/scripts/sans_core/SANSUserFileParser.py similarity index 100% rename from scripts/sans/SANSUserFileParser.py rename to scripts/sans_core/SANSUserFileParser.py diff --git a/scripts/sans/SANSUtility.py b/scripts/sans_core/SANSUtility.py similarity index 100% rename from scripts/sans/SANSUtility.py rename to scripts/sans_core/SANSUtility.py diff --git a/scripts/sans/SANSadd2.py b/scripts/sans_core/SANSadd2.py similarity index 100% rename from scripts/sans/SANSadd2.py rename to scripts/sans_core/SANSadd2.py diff --git a/scripts/sans/__init__.py b/scripts/sans_core/__init__.py similarity index 100% rename from scripts/sans/__init__.py rename to scripts/sans_core/__init__.py diff --git a/scripts/sans/algorithm_detail/CreateSANSAdjustmentWorkspaces.py b/scripts/sans_core/algorithm_detail/CreateSANSAdjustmentWorkspaces.py similarity index 93% rename from scripts/sans/algorithm_detail/CreateSANSAdjustmentWorkspaces.py rename to scripts/sans_core/algorithm_detail/CreateSANSAdjustmentWorkspaces.py index fc30e0f61cc2..75eaea6abcef 100644 --- a/scripts/sans/algorithm_detail/CreateSANSAdjustmentWorkspaces.py +++ b/scripts/sans_core/algorithm_detail/CreateSANSAdjustmentWorkspaces.py @@ -8,13 +8,13 @@ wavelength adjustment and pixel-and-wavelength adjustment workspaces. """ -from sans.algorithm_detail.calculate_sans_transmission import calculate_transmission -from sans.algorithm_detail.CreateSANSWavelengthPixelAdjustment import CreateSANSWavelengthPixelAdjustment -from sans.algorithm_detail.normalize_to_sans_monitor import normalize_to_monitor -from sans.common.constants import EMPTY_NAME -from sans.common.general_functions import create_unmanaged_algorithm -from sans.state.AllStates import AllStates -from sans.state.StateObjects.wavelength_interval import WavRange +from sans_core.algorithm_detail.calculate_sans_transmission import calculate_transmission +from sans_core.algorithm_detail.CreateSANSWavelengthPixelAdjustment import CreateSANSWavelengthPixelAdjustment +from sans_core.algorithm_detail.normalize_to_sans_monitor import normalize_to_monitor +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.state.AllStates import AllStates +from sans_core.state.StateObjects.wavelength_interval import WavRange class CreateSANSAdjustmentWorkspaces(object): diff --git a/scripts/sans/algorithm_detail/CreateSANSWavelengthPixelAdjustment.py b/scripts/sans_core/algorithm_detail/CreateSANSWavelengthPixelAdjustment.py similarity index 96% rename from scripts/sans/algorithm_detail/CreateSANSWavelengthPixelAdjustment.py rename to scripts/sans_core/algorithm_detail/CreateSANSWavelengthPixelAdjustment.py index 08ffc95e2ec1..8298fbd52127 100644 --- a/scripts/sans/algorithm_detail/CreateSANSWavelengthPixelAdjustment.py +++ b/scripts/sans_core/algorithm_detail/CreateSANSWavelengthPixelAdjustment.py @@ -8,12 +8,12 @@ and wavelength adjustment. """ -from sans.algorithm_detail.crop_helper import get_component_name -from sans.common.constants import EMPTY_NAME -from sans.common.enums import DetectorType -from sans.common.enums import RangeStepType -from sans.common.general_functions import create_unmanaged_algorithm -from sans.state.StateObjects.wavelength_interval import WavRange +from sans_core.algorithm_detail.crop_helper import get_component_name +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import DetectorType +from sans_core.common.enums import RangeStepType +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.state.StateObjects.wavelength_interval import WavRange class CreateSANSWavelengthPixelAdjustment(object): diff --git a/scripts/sans/algorithm_detail/__init__.py b/scripts/sans_core/algorithm_detail/__init__.py similarity index 100% rename from scripts/sans/algorithm_detail/__init__.py rename to scripts/sans_core/algorithm_detail/__init__.py diff --git a/scripts/sans/algorithm_detail/batch_execution.py b/scripts/sans_core/algorithm_detail/batch_execution.py similarity index 99% rename from scripts/sans/algorithm_detail/batch_execution.py rename to scripts/sans_core/algorithm_detail/batch_execution.py index 6b1913af4076..99975f321284 100644 --- a/scripts/sans/algorithm_detail/batch_execution.py +++ b/scripts/sans_core/algorithm_detail/batch_execution.py @@ -9,7 +9,7 @@ from mantid.api import AnalysisDataService, WorkspaceGroup from mantid.dataobjects import Workspace2D -from sans.common.general_functions import ( +from sans_core.common.general_functions import ( create_managed_non_child_algorithm, create_unmanaged_algorithm, get_output_name, @@ -17,8 +17,8 @@ get_transmission_output_name, get_wav_range_from_ws, ) -from sans.common.enums import SANSDataType, SaveType, OutputMode, ReductionMode, DataType -from sans.common.constants import ( +from sans_core.common.enums import SANSDataType, SaveType, OutputMode, ReductionMode, DataType +from sans_core.common.constants import ( TRANS_SUFFIX, SANS_SUFFIX, ALL_PERIODS, @@ -35,10 +35,10 @@ CAN_AND_SAMPLE_WORKSPACE, SCALED_BGSUB_SUFFIX, ) -from sans.common.file_information import get_extension_for_file_type, SANSFileInformationFactory -from sans.common.plotting import get_plotting_module -from sans.state.Serializer import Serializer -from sans.state.StateObjects.StateData import StateData +from sans_core.common.file_information import get_extension_for_file_type, SANSFileInformationFactory +from sans_core.common.plotting import get_plotting_module +from sans_core.state.Serializer import Serializer +from sans_core.state.StateObjects.StateData import StateData # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/algorithm_detail/beamcentrefinder_plotting.py b/scripts/sans_core/algorithm_detail/beamcentrefinder_plotting.py similarity index 100% rename from scripts/sans/algorithm_detail/beamcentrefinder_plotting.py rename to scripts/sans_core/algorithm_detail/beamcentrefinder_plotting.py diff --git a/scripts/sans/algorithm_detail/bundles.py b/scripts/sans_core/algorithm_detail/bundles.py similarity index 97% rename from scripts/sans/algorithm_detail/bundles.py rename to scripts/sans_core/algorithm_detail/bundles.py index 3d12fc0f2edf..71caf0c32444 100644 --- a/scripts/sans/algorithm_detail/bundles.py +++ b/scripts/sans_core/algorithm_detail/bundles.py @@ -21,7 +21,7 @@ from typing import List from mantid.py36compat import dataclass -from sans.state.StateObjects.wavelength_interval import WavRange +from sans_core.state.StateObjects.wavelength_interval import WavRange ReductionSettingBundle = namedtuple( "ReductionSettingBundle", diff --git a/scripts/sans/algorithm_detail/calculate_sans_transmission.py b/scripts/sans_core/algorithm_detail/calculate_sans_transmission.py similarity index 97% rename from scripts/sans/algorithm_detail/calculate_sans_transmission.py rename to scripts/sans_core/algorithm_detail/calculate_sans_transmission.py index c47facac486b..1ce6d728f234 100644 --- a/scripts/sans/algorithm_detail/calculate_sans_transmission.py +++ b/scripts/sans_core/algorithm_detail/calculate_sans_transmission.py @@ -6,17 +6,17 @@ # SPDX - License - Identifier: GPL - 3.0 + import json -from sans.algorithm_detail.calculate_transmission_helper import ( +from sans_core.algorithm_detail.calculate_transmission_helper import ( get_detector_id_for_spectrum_number, get_workspace_indices_for_monitors, apply_flat_background_correction_to_monitors, apply_flat_background_correction_to_detectors, get_region_of_interest, ) -from sans.common.constants import EMPTY_NAME -from sans.common.enums import RangeStepType, FitType, DataType -from sans.common.general_functions import create_unmanaged_algorithm -from sans.state.StateObjects.wavelength_interval import WavRange +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import RangeStepType, FitType, DataType +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.state.StateObjects.wavelength_interval import WavRange def calculate_transmission(transmission_ws, direct_ws, state_adjustment_calculate_transmission, data_type_str, wav_range): diff --git a/scripts/sans/algorithm_detail/calculate_transmission_helper.py b/scripts/sans_core/algorithm_detail/calculate_transmission_helper.py similarity index 98% rename from scripts/sans/algorithm_detail/calculate_transmission_helper.py rename to scripts/sans_core/algorithm_detail/calculate_transmission_helper.py index c425601031da..b217b04405dd 100644 --- a/scripts/sans/algorithm_detail/calculate_transmission_helper.py +++ b/scripts/sans_core/algorithm_detail/calculate_transmission_helper.py @@ -5,8 +5,8 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.api import ExperimentInfo -from sans.common.general_functions import create_unmanaged_algorithm, sanitise_instrument_name -from sans.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_unmanaged_algorithm, sanitise_instrument_name +from sans_core.common.constants import EMPTY_NAME def apply_flat_background_correction_to_detectors(workspace, flat_background_correction_start, flat_background_correction_stop): diff --git a/scripts/sans/algorithm_detail/calibration.py b/scripts/sans_core/algorithm_detail/calibration.py similarity index 97% rename from scripts/sans/algorithm_detail/calibration.py rename to scripts/sans_core/algorithm_detail/calibration.py index 5e32f041e1e6..8b5a04e3818d 100644 --- a/scripts/sans/algorithm_detail/calibration.py +++ b/scripts/sans_core/algorithm_detail/calibration.py @@ -11,11 +11,11 @@ from os.path import basename, splitext, isfile from mantid.api import AnalysisDataService -from sans.common.file_information import find_full_file_path -from sans.common.constants import EMPTY_NAME, CALIBRATION_WORKSPACE_TAG -from sans.common.log_tagger import has_tag, get_tag, set_tag -from sans.common.general_functions import create_child_algorithm, sanitise_instrument_name -from sans.common.enums import SANSDataType +from sans_core.common.file_information import find_full_file_path +from sans_core.common.constants import EMPTY_NAME, CALIBRATION_WORKSPACE_TAG +from sans_core.common.log_tagger import has_tag, get_tag, set_tag +from sans_core.common.general_functions import create_child_algorithm, sanitise_instrument_name +from sans_core.common.enums import SANSDataType # --------------------------------- diff --git a/scripts/sans/algorithm_detail/centre_finder_new.py b/scripts/sans_core/algorithm_detail/centre_finder_new.py similarity index 97% rename from scripts/sans/algorithm_detail/centre_finder_new.py rename to scripts/sans_core/algorithm_detail/centre_finder_new.py index b2dbe6cb2ab7..90f2638b916b 100644 --- a/scripts/sans/algorithm_detail/centre_finder_new.py +++ b/scripts/sans_core/algorithm_detail/centre_finder_new.py @@ -5,14 +5,14 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.simpleapi import CreateEmptyTableWorkspace -from sans.algorithm_detail.batch_execution import provide_loaded_data, get_reduction_packages -from sans.common.enums import SANSDataType, DetectorType -from sans.common.general_functions import create_managed_non_child_algorithm +from sans_core.algorithm_detail.batch_execution import provide_loaded_data, get_reduction_packages +from sans_core.common.enums import SANSDataType, DetectorType +from sans_core.common.general_functions import create_managed_non_child_algorithm # ---------------------------------------------------------------------------------------------------------------------- # Functions for the execution of a single batch iteration # ---------------------------------------------------------------------------------------------------------------------- -from sans.state.Serializer import Serializer +from sans_core.state.Serializer import Serializer def centre_finder_new(state, r_min, r_max, iterations, position_1_start, position_2_start, tolerance, find_direction, verbose, component): diff --git a/scripts/sans/algorithm_detail/convert_to_q.py b/scripts/sans_core/algorithm_detail/convert_to_q.py similarity index 98% rename from scripts/sans/algorithm_detail/convert_to_q.py rename to scripts/sans_core/algorithm_detail/convert_to_q.py index 3c59a69f770f..088499b53e02 100644 --- a/scripts/sans/algorithm_detail/convert_to_q.py +++ b/scripts/sans_core/algorithm_detail/convert_to_q.py @@ -8,9 +8,9 @@ from math import sqrt -from sans.common.constants import EMPTY_NAME -from sans.common.enums import ReductionDimensionality -from sans.common.general_functions import create_unmanaged_algorithm, append_to_sans_file_tag +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import ReductionDimensionality +from sans_core.common.general_functions import create_unmanaged_algorithm, append_to_sans_file_tag def convert_workspace( diff --git a/scripts/sans/algorithm_detail/crop_helper.py b/scripts/sans_core/algorithm_detail/crop_helper.py similarity index 84% rename from scripts/sans/algorithm_detail/crop_helper.py rename to scripts/sans_core/algorithm_detail/crop_helper.py index 8c5af535c229..a7a5eed21ddb 100644 --- a/scripts/sans/algorithm_detail/crop_helper.py +++ b/scripts/sans_core/algorithm_detail/crop_helper.py @@ -8,8 +8,8 @@ """Helpers for CropToComponent for SANS.""" -from sans.common.general_functions import convert_instrument_and_detector_type_to_bank_name -from sans.common.enums import SANSInstrument +from sans_core.common.general_functions import convert_instrument_and_detector_type_to_bank_name +from sans_core.common.enums import SANSInstrument # TODO move this into common and move to instrument 2.0 diff --git a/scripts/sans/algorithm_detail/load_data.py b/scripts/sans_core/algorithm_detail/load_data.py similarity index 98% rename from scripts/sans/algorithm_detail/load_data.py rename to scripts/sans_core/algorithm_detail/load_data.py index 5f47c905d85b..0f967e9281f3 100644 --- a/scripts/sans/algorithm_detail/load_data.py +++ b/scripts/sans_core/algorithm_detail/load_data.py @@ -53,8 +53,8 @@ import os from mantid.kernel import config from mantid.api import AnalysisDataService -from sans.common.file_information import SANSFileInformationFactory, FileType, get_extension_for_file_type, find_full_file_path -from sans.common.constants import ( +from sans_core.common.file_information import SANSFileInformationFactory, FileType, get_extension_for_file_type, find_full_file_path +from sans_core.common.constants import ( EMPTY_NAME, SANS_SUFFIX, TRANS_SUFFIX, @@ -65,11 +65,11 @@ OUTPUT_MONITOR_WORKSPACE, OUTPUT_MONITOR_WORKSPACE_GROUP, ) -from sans.common.enums import SANSFacility, SANSDataType, SANSInstrument -from sans.common.general_functions import create_child_algorithm -from sans.common.log_tagger import set_tag, has_tag, get_tag -from sans.state.StateObjects.StateData import StateData -from sans.algorithm_detail.calibration import apply_calibration +from sans_core.common.enums import SANSFacility, SANSDataType, SANSInstrument +from sans_core.common.general_functions import create_child_algorithm +from sans_core.common.log_tagger import set_tag, has_tag, get_tag +from sans_core.state.StateObjects.StateData import StateData +from sans_core.algorithm_detail.calibration import apply_calibration # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/algorithm_detail/mask_functions.py b/scripts/sans_core/algorithm_detail/mask_functions.py similarity index 98% rename from scripts/sans/algorithm_detail/mask_functions.py rename to scripts/sans_core/algorithm_detail/mask_functions.py index b0e9ce0a140c..895ed70cb3a6 100644 --- a/scripts/sans/algorithm_detail/mask_functions.py +++ b/scripts/sans_core/algorithm_detail/mask_functions.py @@ -8,8 +8,8 @@ from collections.abc import Sequence from enum import Enum -from sans.common.enums import DetectorType, SANSInstrument -from sans.common.xml_parsing import get_named_elements_from_ipf_file +from sans_core.common.enums import DetectorType, SANSInstrument +from sans_core.common.xml_parsing import get_named_elements_from_ipf_file detector_shape_bundle = namedtuple("detector_shape_bundle", "rectangular_shape, width, height, " "number_of_pixels_override") diff --git a/scripts/sans/algorithm_detail/mask_sans_workspace.py b/scripts/sans_core/algorithm_detail/mask_sans_workspace.py similarity index 77% rename from scripts/sans/algorithm_detail/mask_sans_workspace.py rename to scripts/sans_core/algorithm_detail/mask_sans_workspace.py index 262bd29e8e6b..393f80f2c5f6 100644 --- a/scripts/sans/algorithm_detail/mask_sans_workspace.py +++ b/scripts/sans_core/algorithm_detail/mask_sans_workspace.py @@ -4,10 +4,10 @@ # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + -from sans.algorithm_detail.mask_workspace import create_masker -from sans.common.enums import DetectorType -from sans.common.general_functions import append_to_sans_file_tag -from sans.state.AllStates import AllStates +from sans_core.algorithm_detail.mask_workspace import create_masker +from sans_core.common.enums import DetectorType +from sans_core.common.general_functions import append_to_sans_file_tag +from sans_core.state.AllStates import AllStates def mask_workspace(state: AllStates, component_as_string, workspace): diff --git a/scripts/sans/algorithm_detail/mask_workspace.py b/scripts/sans_core/algorithm_detail/mask_workspace.py similarity index 97% rename from scripts/sans/algorithm_detail/mask_workspace.py rename to scripts/sans_core/algorithm_detail/mask_workspace.py index 2ecd6ff6be3f..8642847c3760 100644 --- a/scripts/sans/algorithm_detail/mask_workspace.py +++ b/scripts/sans_core/algorithm_detail/mask_workspace.py @@ -8,12 +8,12 @@ from mantid.kernel import Logger -from sans.algorithm_detail.mask_functions import SpectraBlock -from sans.algorithm_detail.xml_shapes import add_cylinder, add_outside_cylinder, create_phi_mask, create_line_mask -from sans.common.constants import EMPTY_NAME -from sans.common.enums import SANSInstrument -from sans.common.file_information import find_full_file_path, get_instrument_paths_for_sans_file -from sans.common.general_functions import create_unmanaged_algorithm +from sans_core.algorithm_detail.mask_functions import SpectraBlock +from sans_core.algorithm_detail.xml_shapes import add_cylinder, add_outside_cylinder, create_phi_mask, create_line_mask +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import SANSInstrument +from sans_core.common.file_information import find_full_file_path, get_instrument_paths_for_sans_file +from sans_core.common.general_functions import create_unmanaged_algorithm # ------------------------------------------------------------------ diff --git a/scripts/sans/algorithm_detail/merge_reductions.py b/scripts/sans_core/algorithm_detail/merge_reductions.py similarity index 98% rename from scripts/sans/algorithm_detail/merge_reductions.py rename to scripts/sans_core/algorithm_detail/merge_reductions.py index 22c1a6023161..51e126c0410f 100644 --- a/scripts/sans/algorithm_detail/merge_reductions.py +++ b/scripts/sans_core/algorithm_detail/merge_reductions.py @@ -9,9 +9,9 @@ from abc import ABCMeta, abstractmethod import mantid.simpleapi as mantid_api -from sans.algorithm_detail.bundles import MergeBundle -from sans.common.enums import SANSFacility, DataType -from sans.common.general_functions import create_child_algorithm +from sans_core.algorithm_detail.bundles import MergeBundle +from sans_core.common.enums import SANSFacility, DataType +from sans_core.common.general_functions import create_child_algorithm class Merger(metaclass=ABCMeta): diff --git a/scripts/sans/algorithm_detail/move_sans_instrument_component.py b/scripts/sans_core/algorithm_detail/move_sans_instrument_component.py similarity index 95% rename from scripts/sans/algorithm_detail/move_sans_instrument_component.py rename to scripts/sans_core/algorithm_detail/move_sans_instrument_component.py index f3b198f10313..fa604c83cff3 100644 --- a/scripts/sans/algorithm_detail/move_sans_instrument_component.py +++ b/scripts/sans_core/algorithm_detail/move_sans_instrument_component.py @@ -6,10 +6,10 @@ # SPDX - License - Identifier: GPL - 3.0 + from enum import Enum -from sans.algorithm_detail.move_workspaces import create_mover -from sans.common.enums import DetectorType -from sans.state.AllStates import AllStates -from sans.state.StateObjects.state_instrument_info import StateInstrumentInfo +from sans_core.algorithm_detail.move_workspaces import create_mover +from sans_core.common.enums import DetectorType +from sans_core.state.AllStates import AllStates +from sans_core.state.StateObjects.state_instrument_info import StateInstrumentInfo class MoveTypes(Enum): diff --git a/scripts/sans/algorithm_detail/move_workspaces.py b/scripts/sans_core/algorithm_detail/move_workspaces.py similarity index 99% rename from scripts/sans/algorithm_detail/move_workspaces.py rename to scripts/sans_core/algorithm_detail/move_workspaces.py index 86486821a777..fa785e64856f 100644 --- a/scripts/sans/algorithm_detail/move_workspaces.py +++ b/scripts/sans_core/algorithm_detail/move_workspaces.py @@ -10,10 +10,10 @@ from mantid.api import MatrixWorkspace from abc import ABCMeta, abstractmethod -from sans.state.AllStates import AllStates -from sans.state.StateObjects.StateMoveDetectors import StateMoveLARMOR, StateMoveLOQ, StateMove, StateMoveSANS2D, StateMoveZOOM -from sans.common.enums import CanonicalCoordinates, DetectorType, SANSInstrument -from sans.common.general_functions import ( +from sans_core.state.AllStates import AllStates +from sans_core.state.StateObjects.StateMoveDetectors import StateMoveLARMOR, StateMoveLOQ, StateMove, StateMoveSANS2D, StateMoveZOOM +from sans_core.common.enums import CanonicalCoordinates, DetectorType, SANSInstrument +from sans_core.common.general_functions import ( create_unmanaged_algorithm, get_single_valued_logs_from_workspace, sanitise_instrument_name, diff --git a/scripts/sans/algorithm_detail/normalize_to_sans_monitor.py b/scripts/sans_core/algorithm_detail/normalize_to_sans_monitor.py similarity index 96% rename from scripts/sans/algorithm_detail/normalize_to_sans_monitor.py rename to scripts/sans_core/algorithm_detail/normalize_to_sans_monitor.py index 8df11ed28e2c..16369ee3113f 100644 --- a/scripts/sans/algorithm_detail/normalize_to_sans_monitor.py +++ b/scripts/sans_core/algorithm_detail/normalize_to_sans_monitor.py @@ -8,10 +8,10 @@ import json -from sans.common.constants import EMPTY_NAME -from sans.common.general_functions import create_unmanaged_algorithm -from sans.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor -from sans.state.StateObjects.StateWavelength import StateWavelength +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor +from sans_core.state.StateObjects.StateWavelength import StateWavelength def normalize_to_monitor( diff --git a/scripts/sans/algorithm_detail/save_workspace.py b/scripts/sans_core/algorithm_detail/save_workspace.py similarity index 95% rename from scripts/sans/algorithm_detail/save_workspace.py rename to scripts/sans_core/algorithm_detail/save_workspace.py index 929245bd3acd..f6c8cb08ae2b 100644 --- a/scripts/sans/algorithm_detail/save_workspace.py +++ b/scripts/sans_core/algorithm_detail/save_workspace.py @@ -7,11 +7,11 @@ from collections import namedtuple from mantid.api import MatrixWorkspace from mantid.dataobjects import EventWorkspace -from sans.common.general_functions import create_unmanaged_algorithm -from sans.common.constants import EMPTY_NAME -from sans.common.enums import SaveType +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import SaveType -# from sans.algorithm_detail.strip_end_nans_and_infs import strip_end_nans +# from sans_core.algorithm_detail.strip_end_nans_and_infs import strip_end_nans ZERO_ERROR_DEFAULT = 1e6 diff --git a/scripts/sans/algorithm_detail/scale_sans_workspace.py b/scripts/sans_core/algorithm_detail/scale_sans_workspace.py similarity index 94% rename from scripts/sans/algorithm_detail/scale_sans_workspace.py rename to scripts/sans_core/algorithm_detail/scale_sans_workspace.py index 093da79e4b1d..752b0fd22394 100644 --- a/scripts/sans/algorithm_detail/scale_sans_workspace.py +++ b/scripts/sans_core/algorithm_detail/scale_sans_workspace.py @@ -8,11 +8,11 @@ import math -from sans.common.constants import EMPTY_NAME -from sans.common.enums import SampleShape, SANSInstrument -from sans.common.file_information import convert_to_flag +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import SampleShape, SANSInstrument +from sans_core.common.file_information import convert_to_flag -from sans.common.general_functions import append_to_sans_file_tag, create_unmanaged_algorithm +from sans_core.common.general_functions import append_to_sans_file_tag, create_unmanaged_algorithm DEFAULT_SCALING = 100.0 diff --git a/scripts/sans/algorithm_detail/single_execution.py b/scripts/sans_core/algorithm_detail/single_execution.py similarity index 97% rename from scripts/sans/algorithm_detail/single_execution.py rename to scripts/sans_core/algorithm_detail/single_execution.py index 53dcf50a57de..0b498cb60a8b 100644 --- a/scripts/sans/algorithm_detail/single_execution.py +++ b/scripts/sans_core/algorithm_detail/single_execution.py @@ -10,7 +10,7 @@ from mantid.kernel import logger from mantid.dataobjects import Workspace2D -from sans.algorithm_detail.bundles import ( +from sans_core.algorithm_detail.bundles import ( EventSliceSettingBundle, OutputBundle, OutputPartsBundle, @@ -18,19 +18,19 @@ CompletedSlices, ReducedSlice, ) -from sans.algorithm_detail.merge_reductions import MergeFactory -from sans.algorithm_detail.strip_end_nans_and_infs import strip_end_nans -from sans.common.constants import EMPTY_NAME -from sans.common.enums import DetectorType, ReductionMode, OutputParts, TransmissionType, DataType -from sans.common.general_functions import ( +from sans_core.algorithm_detail.merge_reductions import MergeFactory +from sans_core.algorithm_detail.strip_end_nans_and_infs import strip_end_nans +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import DetectorType, ReductionMode, OutputParts, TransmissionType, DataType +from sans_core.common.general_functions import ( create_child_algorithm, get_reduced_can_workspace_from_ads, get_transmission_workspaces_from_ads, write_hash_into_reduced_can_workspace, wav_range_to_str, ) -from sans.data_objects.sans_workflow_algorithm_outputs import SANSWorkflowAlgorithmOutputs -from sans.state.Serializer import Serializer +from sans_core.data_objects.sans_workflow_algorithm_outputs import SANSWorkflowAlgorithmOutputs +from sans_core.state.Serializer import Serializer def run_initial_event_slice_reduction(reduction_alg, reduction_setting_bundle): diff --git a/scripts/sans/algorithm_detail/slice_sans_event.py b/scripts/sans_core/algorithm_detail/slice_sans_event.py similarity index 96% rename from scripts/sans/algorithm_detail/slice_sans_event.py rename to scripts/sans_core/algorithm_detail/slice_sans_event.py index a0e4a742e286..ca5ac6387ac4 100644 --- a/scripts/sans/algorithm_detail/slice_sans_event.py +++ b/scripts/sans_core/algorithm_detail/slice_sans_event.py @@ -6,9 +6,9 @@ # SPDX - License - Identifier: GPL - 3.0 + from SANSUtility import _clean_logs from mantid.dataobjects import Workspace2D -from sans.common.constants import EMPTY_NAME -from sans.common.general_functions import append_to_sans_file_tag, get_charge_and_time, create_unmanaged_algorithm -from sans.common.enums import DataType +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.general_functions import append_to_sans_file_tag, get_charge_and_time, create_unmanaged_algorithm +from sans_core.common.enums import DataType def slice_sans_event(state_slice, input_ws, input_ws_monitor, data_type_str="Sample"): diff --git a/scripts/sans/algorithm_detail/strip_end_nans_and_infs.py b/scripts/sans_core/algorithm_detail/strip_end_nans_and_infs.py similarity index 95% rename from scripts/sans/algorithm_detail/strip_end_nans_and_infs.py rename to scripts/sans_core/algorithm_detail/strip_end_nans_and_infs.py index 02d34da36e68..4a8e4ec70975 100644 --- a/scripts/sans/algorithm_detail/strip_end_nans_and_infs.py +++ b/scripts/sans_core/algorithm_detail/strip_end_nans_and_infs.py @@ -5,8 +5,8 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from math import isinf, isnan -from sans.common.constants import EMPTY_NAME -from sans.common.general_functions import create_child_algorithm +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.general_functions import create_child_algorithm def strip_end_nans(workspace, parent_alg=None): diff --git a/scripts/sans/algorithm_detail/xml_shapes.py b/scripts/sans_core/algorithm_detail/xml_shapes.py similarity index 99% rename from scripts/sans/algorithm_detail/xml_shapes.py rename to scripts/sans_core/algorithm_detail/xml_shapes.py index b3eb305a5346..2fa727061ea8 100644 --- a/scripts/sans/algorithm_detail/xml_shapes.py +++ b/scripts/sans_core/algorithm_detail/xml_shapes.py @@ -5,7 +5,7 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from math import pi, cos, sin -from sans.common.enums import MaskingQuadrant +from sans_core.common.enums import MaskingQuadrant def add_xml_shape(xml, complete_xml_element): diff --git a/scripts/sans/centre_finder.py b/scripts/sans_core/centre_finder.py similarity index 100% rename from scripts/sans/centre_finder.py rename to scripts/sans_core/centre_finder.py diff --git a/scripts/sans/command_interface/ISISCommandInterface.py b/scripts/sans_core/command_interface/ISISCommandInterface.py similarity index 98% rename from scripts/sans/command_interface/ISISCommandInterface.py rename to scripts/sans_core/command_interface/ISISCommandInterface.py index dfbc3110d0b5..497b3248e6c5 100644 --- a/scripts/sans/command_interface/ISISCommandInterface.py +++ b/scripts/sans_core/command_interface/ISISCommandInterface.py @@ -13,9 +13,9 @@ from SANSadd2 import add_runs from mantid.api import AnalysisDataService, WorkspaceGroup from mantid.kernel import config -from sans.command_interface.batch_csv_parser import BatchCsvParser -from sans.command_interface.command_interface_functions import print_message, warning_message -from sans.command_interface.command_interface_state_director import ( +from sans_core.command_interface.batch_csv_parser import BatchCsvParser +from sans_core.command_interface.command_interface_functions import print_message, warning_message +from sans_core.command_interface.command_interface_state_director import ( CommandInterfaceStateDirector, DataCommand, DataCommandId, @@ -23,8 +23,8 @@ NParameterCommandId, FitData, ) -from sans.common.constants import ALL_PERIODS -from sans.common.enums import ( +from sans_core.common.constants import ALL_PERIODS +from sans_core.common.enums import ( DetectorType, FitType, RangeStepType, @@ -35,14 +35,14 @@ OutputMode, FindDirectionEnum, ) -from sans.common.file_information import find_sans_file, find_full_file_path -from sans.common.general_functions import ( +from sans_core.common.file_information import find_sans_file, find_full_file_path +from sans_core.common.general_functions import ( convert_bank_name_to_detector_type_isis, get_output_name, is_part_of_reduced_output_workspace_group, ) -from sans.common.RowEntries import RowEntries -from sans.sans_batch import SANSBatchReduction, SANSCentreFinder +from sans_core.common.RowEntries import RowEntries +from sans_core.sans_batch import SANSBatchReduction, SANSCentreFinder # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/command_interface/__init__.py b/scripts/sans_core/command_interface/__init__.py similarity index 100% rename from scripts/sans/command_interface/__init__.py rename to scripts/sans_core/command_interface/__init__.py diff --git a/scripts/sans/command_interface/batch_csv_parser.py b/scripts/sans_core/command_interface/batch_csv_parser.py similarity index 98% rename from scripts/sans/command_interface/batch_csv_parser.py rename to scripts/sans_core/command_interface/batch_csv_parser.py index 262cfedfc347..6de7c29a353e 100644 --- a/scripts/sans/command_interface/batch_csv_parser.py +++ b/scripts/sans_core/command_interface/batch_csv_parser.py @@ -9,9 +9,9 @@ from csv import reader from enum import Enum -from sans.common.constants import ALL_PERIODS -from sans.common.file_information import find_full_file_path -from sans.common.RowEntries import RowEntries +from sans_core.common.constants import ALL_PERIODS +from sans_core.common.file_information import find_full_file_path +from sans_core.common.RowEntries import RowEntries class BatchFileKeywords(Enum): diff --git a/scripts/sans/command_interface/command_interface_functions.py b/scripts/sans_core/command_interface/command_interface_functions.py similarity index 100% rename from scripts/sans/command_interface/command_interface_functions.py rename to scripts/sans_core/command_interface/command_interface_functions.py diff --git a/scripts/sans/command_interface/command_interface_state_director.py b/scripts/sans_core/command_interface/command_interface_state_director.py similarity index 98% rename from scripts/sans/command_interface/command_interface_state_director.py rename to scripts/sans_core/command_interface/command_interface_state_director.py index c2c453f56de9..01182e78f57d 100644 --- a/scripts/sans/command_interface/command_interface_state_director.py +++ b/scripts/sans_core/command_interface/command_interface_state_director.py @@ -5,11 +5,11 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from enum import Enum -from sans.common.enums import DataType -from sans.common.file_information import SANSFileInformationFactory -from sans.state.AllStates import AllStates -from sans.state.StateObjects.StateData import get_data_builder -from sans.user_file.settings_tags import ( +from sans_core.common.enums import DataType +from sans_core.common.file_information import SANSFileInformationFactory +from sans_core.state.AllStates import AllStates +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.user_file.settings_tags import ( MonId, monitor_spectrum, OtherId, @@ -30,11 +30,11 @@ det_fit_range, single_entry_with_detector, ) -from sans.user_file.toml_parsers.toml_parser import TomlParser -from sans.user_file.txt_parsers.CommandInterfaceAdapter import CommandInterfaceAdapter +from sans_core.user_file.toml_parsers.toml_parser import TomlParser +from sans_core.user_file.txt_parsers.CommandInterfaceAdapter import CommandInterfaceAdapter -from sans.user_file.user_file_parser import UserFileParser -from sans.user_file.user_file_reader import UserFileReader +from sans_core.user_file.user_file_parser import UserFileParser +from sans_core.user_file.user_file_reader import UserFileReader # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/common/Containers/FloatRange.py b/scripts/sans_core/common/Containers/FloatRange.py similarity index 100% rename from scripts/sans/common/Containers/FloatRange.py rename to scripts/sans_core/common/Containers/FloatRange.py diff --git a/scripts/sans/common/Containers/MonitorID.py b/scripts/sans_core/common/Containers/MonitorID.py similarity index 100% rename from scripts/sans/common/Containers/MonitorID.py rename to scripts/sans_core/common/Containers/MonitorID.py diff --git a/scripts/sans/common/Containers/Position.py b/scripts/sans_core/common/Containers/Position.py similarity index 100% rename from scripts/sans/common/Containers/Position.py rename to scripts/sans_core/common/Containers/Position.py diff --git a/scripts/sans/common/Containers/__init__.py b/scripts/sans_core/common/Containers/__init__.py similarity index 100% rename from scripts/sans/common/Containers/__init__.py rename to scripts/sans_core/common/Containers/__init__.py diff --git a/scripts/sans/common/RowEntries.py b/scripts/sans_core/common/RowEntries.py similarity index 96% rename from scripts/sans/common/RowEntries.py rename to scripts/sans_core/common/RowEntries.py index 5484d6671091..caf869e70820 100644 --- a/scripts/sans/common/RowEntries.py +++ b/scripts/sans_core/common/RowEntries.py @@ -5,9 +5,9 @@ # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + from mantid.py36compat import dataclass -from sans.common.enums import RowState, SampleShape -from sans.common.file_information import SANSFileInformationFactory -from sans.common.RowOptionsModel import RowOptionsModel +from sans_core.common.enums import RowState, SampleShape +from sans_core.common.file_information import SANSFileInformationFactory +from sans_core.common.RowOptionsModel import RowOptionsModel from mantid.kernel import Logger diff --git a/scripts/sans/common/RowOptionsModel.py b/scripts/sans_core/common/RowOptionsModel.py similarity index 100% rename from scripts/sans/common/RowOptionsModel.py rename to scripts/sans_core/common/RowOptionsModel.py diff --git a/scripts/sans/common/__init__.py b/scripts/sans_core/common/__init__.py similarity index 100% rename from scripts/sans/common/__init__.py rename to scripts/sans_core/common/__init__.py diff --git a/scripts/sans/common/configurations.py b/scripts/sans_core/common/configurations.py similarity index 100% rename from scripts/sans/common/configurations.py rename to scripts/sans_core/common/configurations.py diff --git a/scripts/sans/common/constant_containers.py b/scripts/sans_core/common/constant_containers.py similarity index 93% rename from scripts/sans/common/constant_containers.py rename to scripts/sans_core/common/constant_containers.py index af8ba4d50756..64d049f2be80 100644 --- a/scripts/sans/common/constant_containers.py +++ b/scripts/sans_core/common/constant_containers.py @@ -4,8 +4,8 @@ # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + -from sans.common.constants import LARMOR, LOQ, SANS2D, ZOOM -from sans.common.enums import SANSInstrument +from sans_core.common.constants import LARMOR, LOQ, SANS2D, ZOOM +from sans_core.common.enums import SANSInstrument # ---------------------------------------------------------------------------------------------------------------------- # SANSInstrument diff --git a/scripts/sans/common/constants.py b/scripts/sans_core/common/constants.py similarity index 100% rename from scripts/sans/common/constants.py rename to scripts/sans_core/common/constants.py diff --git a/scripts/sans/common/enums.py b/scripts/sans_core/common/enums.py similarity index 99% rename from scripts/sans/common/enums.py rename to scripts/sans_core/common/enums.py index e73685d15f30..a76d5ca9f660 100644 --- a/scripts/sans/common/enums.py +++ b/scripts/sans_core/common/enums.py @@ -7,7 +7,7 @@ """The elements of this module define typed enums which are used in the SANS reduction framework.""" from enum import Enum -from sans.state.JsonSerializable import json_serializable +from sans_core.state.JsonSerializable import json_serializable @json_serializable diff --git a/scripts/sans/common/file_information.py b/scripts/sans_core/common/file_information.py similarity index 99% rename from scripts/sans/common/file_information.py rename to scripts/sans_core/common/file_information.py index 5121246c93f8..2073321796e3 100644 --- a/scripts/sans/common/file_information.py +++ b/scripts/sans_core/common/file_information.py @@ -15,8 +15,8 @@ from mantid.api import FileFinder from mantid.kernel import DateAndTime, ConfigService, Logger from mantid.api import AlgorithmManager, ExperimentInfo -from sans.common.enums import SANSInstrument, FileType, SampleShape -from sans.common.general_functions import get_instrument, instrument_name_correction, get_facility +from sans_core.common.enums import SANSInstrument, FileType, SampleShape +from sans_core.common.general_functions import get_instrument, instrument_name_correction, get_facility # ---------------------------------------------------------------------------------------------------------------------- # Constants diff --git a/scripts/sans/common/general_functions.py b/scripts/sans_core/common/general_functions.py similarity index 99% rename from scripts/sans/common/general_functions.py rename to scripts/sans_core/common/general_functions.py index 4228b33ebe8c..826af9c5e5d9 100644 --- a/scripts/sans/common/general_functions.py +++ b/scripts/sans_core/common/general_functions.py @@ -15,14 +15,14 @@ from typing import Tuple, Optional, List from mantid.api import AlgorithmManager, AnalysisDataService, isSameWorkspaceObject -from sans.common.constant_containers import ( +from sans_core.common.constant_containers import ( SANSInstrument_enum_list, SANSInstrument_string_list, SANSInstrument_string_as_key_NoInstrument, ) -from sans.common.constants import SANS_FILE_TAG, ALL_PERIODS, SANS2D, EMPTY_NAME, REDUCED_CAN_TAG -from sans.common.log_tagger import get_tag, has_tag, set_tag, has_hash, get_hash_value, set_hash -from sans.common.enums import ( +from sans_core.common.constants import SANS_FILE_TAG, ALL_PERIODS, SANS2D, EMPTY_NAME, REDUCED_CAN_TAG +from sans_core.common.log_tagger import get_tag, has_tag, set_tag, has_hash, get_hash_value, set_hash +from sans_core.common.enums import ( DetectorType, RangeStepType, ReductionDimensionality, @@ -38,7 +38,7 @@ # ------------------------------------------- # Constants # ------------------------------------------- -from sans.state.Serializer import Serializer +from sans_core.state.Serializer import Serializer ALTERNATIVE_SANS2D_NAME = "SAN" diff --git a/scripts/sans/common/log_tagger.py b/scripts/sans_core/common/log_tagger.py similarity index 100% rename from scripts/sans/common/log_tagger.py rename to scripts/sans_core/common/log_tagger.py diff --git a/scripts/sans/common/plotting.py b/scripts/sans_core/common/plotting.py similarity index 100% rename from scripts/sans/common/plotting.py rename to scripts/sans_core/common/plotting.py diff --git a/scripts/sans/common/xml_parsing.py b/scripts/sans_core/common/xml_parsing.py similarity index 100% rename from scripts/sans/common/xml_parsing.py rename to scripts/sans_core/common/xml_parsing.py diff --git a/scripts/sans/data_objects/__init__.py b/scripts/sans_core/data_objects/__init__.py similarity index 100% rename from scripts/sans/data_objects/__init__.py rename to scripts/sans_core/data_objects/__init__.py diff --git a/scripts/sans/data_objects/sans_workflow_algorithm_outputs.py b/scripts/sans_core/data_objects/sans_workflow_algorithm_outputs.py similarity index 100% rename from scripts/sans/data_objects/sans_workflow_algorithm_outputs.py rename to scripts/sans_core/data_objects/sans_workflow_algorithm_outputs.py diff --git a/scripts/sans/isis_instrument.py b/scripts/sans_core/isis_instrument.py similarity index 100% rename from scripts/sans/isis_instrument.py rename to scripts/sans_core/isis_instrument.py diff --git a/scripts/sans/isis_reducer.py b/scripts/sans_core/isis_reducer.py similarity index 100% rename from scripts/sans/isis_reducer.py rename to scripts/sans_core/isis_reducer.py diff --git a/scripts/sans/isis_reduction_steps.py b/scripts/sans_core/isis_reduction_steps.py similarity index 100% rename from scripts/sans/isis_reduction_steps.py rename to scripts/sans_core/isis_reduction_steps.py diff --git a/scripts/sans/reduction_settings.py b/scripts/sans_core/reduction_settings.py similarity index 100% rename from scripts/sans/reduction_settings.py rename to scripts/sans_core/reduction_settings.py diff --git a/scripts/sans/sans_batch.py b/scripts/sans_core/sans_batch.py similarity index 96% rename from scripts/sans/sans_batch.py rename to scripts/sans_core/sans_batch.py index 7caf0b4c9300..e89d82643e68 100644 --- a/scripts/sans/sans_batch.py +++ b/scripts/sans_core/sans_batch.py @@ -7,10 +7,10 @@ # pylint: disable=invalid-name """SANBatchReduction algorithm is the starting point for any new type reduction, event single reduction""" -from sans.state.AllStates import AllStates -from sans.algorithm_detail.batch_execution import single_reduction_for_batch -from sans.common.enums import OutputMode, FindDirectionEnum, DetectorType -from sans.algorithm_detail.centre_finder_new import centre_finder_new, centre_finder_mass +from sans_core.state.AllStates import AllStates +from sans_core.algorithm_detail.batch_execution import single_reduction_for_batch +from sans_core.common.enums import OutputMode, FindDirectionEnum, DetectorType +from sans_core.algorithm_detail.centre_finder_new import centre_finder_new, centre_finder_mass class SANSBatchReduction(object): diff --git a/scripts/sans/state/AllStates.py b/scripts/sans_core/state/AllStates.py similarity index 79% rename from scripts/sans/state/AllStates.py rename to scripts/sans_core/state/AllStates.py index 0b76179973f5..1243b1810063 100644 --- a/scripts/sans/state/AllStates.py +++ b/scripts/sans_core/state/AllStates.py @@ -9,25 +9,25 @@ import copy import json -from sans.common.enums import SANSFacility -from sans.state.JsonSerializable import JsonSerializable -from sans.state.StateObjects.StateAdjustment import StateAdjustment -from sans.state.StateObjects.StateCompatibility import get_compatibility_builder, StateCompatibility +from sans_core.common.enums import SANSFacility +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.state.StateObjects.StateAdjustment import StateAdjustment +from sans_core.state.StateObjects.StateCompatibility import get_compatibility_builder, StateCompatibility # Note that the compatibility state is not part of the new reduction chain, but allows us to accurately compare # results obtained via the old and new reduction chain -from sans.state.StateObjects.StateConvertToQ import StateConvertToQ -from sans.state.StateObjects.StateData import StateData -from sans.state.StateObjects.StateMaskDetectors import StateMask -from sans.state.StateObjects.StateMoveDetectors import StateMove -from sans.state.StateObjects.StateReductionMode import StateReductionMode -from sans.state.StateObjects.StateSave import StateSave -from sans.state.StateObjects.StateScale import StateScale -from sans.state.StateObjects.StateSliceEvent import StateSliceEvent -from sans.state.StateObjects.StateWavelength import StateWavelength -from sans.state.StateObjects.state_instrument_info import StateInstrumentInfo -from sans.state.StateObjects.StateBackgroundSubtraction import StateBackgroundSubtraction -from sans.state.automatic_setters import automatic_setters +from sans_core.state.StateObjects.StateConvertToQ import StateConvertToQ +from sans_core.state.StateObjects.StateData import StateData +from sans_core.state.StateObjects.StateMaskDetectors import StateMask +from sans_core.state.StateObjects.StateMoveDetectors import StateMove +from sans_core.state.StateObjects.StateReductionMode import StateReductionMode +from sans_core.state.StateObjects.StateSave import StateSave +from sans_core.state.StateObjects.StateScale import StateScale +from sans_core.state.StateObjects.StateSliceEvent import StateSliceEvent +from sans_core.state.StateObjects.StateWavelength import StateWavelength +from sans_core.state.StateObjects.state_instrument_info import StateInstrumentInfo +from sans_core.state.StateObjects.StateBackgroundSubtraction import StateBackgroundSubtraction +from sans_core.state.automatic_setters import automatic_setters # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/state/IStateParser.py b/scripts/sans_core/state/IStateParser.py similarity index 69% rename from scripts/sans/state/IStateParser.py rename to scripts/sans_core/state/IStateParser.py index 084096734b70..d3acea8ea07d 100644 --- a/scripts/sans/state/IStateParser.py +++ b/scripts/sans_core/state/IStateParser.py @@ -6,23 +6,23 @@ # SPDX - License - Identifier: GPL - 3.0 + from abc import ABCMeta, abstractmethod -from sans.common.enums import SANSFacility -from sans.state.AllStates import AllStates -from sans.state.StateObjects.StateAdjustment import StateAdjustment -from sans.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission -from sans.state.StateObjects.StateCompatibility import StateCompatibility -from sans.state.StateObjects.StateConvertToQ import StateConvertToQ -from sans.state.StateObjects.StateData import StateData, get_data_builder -from sans.state.StateObjects.StateMaskDetectors import StateMask -from sans.state.StateObjects.StateMoveDetectors import StateMove -from sans.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor -from sans.state.StateObjects.StateReductionMode import StateReductionMode -from sans.state.StateObjects.StateSave import StateSave -from sans.state.StateObjects.StateScale import StateScale -from sans.state.StateObjects.StateSliceEvent import StateSliceEvent -from sans.state.StateObjects.StateWavelength import StateWavelength -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment -from sans.state.StateObjects.state_instrument_info import StateInstrumentInfo +from sans_core.common.enums import SANSFacility +from sans_core.state.AllStates import AllStates +from sans_core.state.StateObjects.StateAdjustment import StateAdjustment +from sans_core.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission +from sans_core.state.StateObjects.StateCompatibility import StateCompatibility +from sans_core.state.StateObjects.StateConvertToQ import StateConvertToQ +from sans_core.state.StateObjects.StateData import StateData, get_data_builder +from sans_core.state.StateObjects.StateMaskDetectors import StateMask +from sans_core.state.StateObjects.StateMoveDetectors import StateMove +from sans_core.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor +from sans_core.state.StateObjects.StateReductionMode import StateReductionMode +from sans_core.state.StateObjects.StateSave import StateSave +from sans_core.state.StateObjects.StateScale import StateScale +from sans_core.state.StateObjects.StateSliceEvent import StateSliceEvent +from sans_core.state.StateObjects.StateWavelength import StateWavelength +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment +from sans_core.state.StateObjects.state_instrument_info import StateInstrumentInfo class IStateParser(metaclass=ABCMeta): diff --git a/scripts/sans/state/JsonSerializable.py b/scripts/sans_core/state/JsonSerializable.py similarity index 100% rename from scripts/sans/state/JsonSerializable.py rename to scripts/sans_core/state/JsonSerializable.py diff --git a/scripts/sans/state/Serializer.py b/scripts/sans_core/state/Serializer.py similarity index 97% rename from scripts/sans/state/Serializer.py rename to scripts/sans_core/state/Serializer.py index 48f5df79261c..f866f5ea8dd5 100644 --- a/scripts/sans/state/Serializer.py +++ b/scripts/sans_core/state/Serializer.py @@ -8,7 +8,7 @@ from enum import Enum -from sans.state.JsonSerializable import JsonSerializable +from sans_core.state.JsonSerializable import JsonSerializable class Serializer(object): diff --git a/scripts/sans/state/StateObjects/StateAdjustment.py b/scripts/sans_core/state/StateObjects/StateAdjustment.py similarity index 88% rename from scripts/sans/state/StateObjects/StateAdjustment.py rename to scripts/sans_core/state/StateObjects/StateAdjustment.py index 852150a55780..80e7d82488a8 100644 --- a/scripts/sans/state/StateObjects/StateAdjustment.py +++ b/scripts/sans_core/state/StateObjects/StateAdjustment.py @@ -10,12 +10,12 @@ import copy -from sans.common.enums import SANSFacility -from sans.state.JsonSerializable import JsonSerializable -from sans.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission -from sans.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment -from sans.state.automatic_setters import automatic_setters +from sans_core.common.enums import SANSFacility +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission +from sans_core.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment +from sans_core.state.automatic_setters import automatic_setters class StateAdjustment(metaclass=JsonSerializable): diff --git a/scripts/sans/state/StateObjects/StateBackgroundSubtraction.py b/scripts/sans_core/state/StateObjects/StateBackgroundSubtraction.py similarity index 91% rename from scripts/sans/state/StateObjects/StateBackgroundSubtraction.py rename to scripts/sans_core/state/StateObjects/StateBackgroundSubtraction.py index 9028810116c7..52fc492e289c 100644 --- a/scripts/sans/state/StateObjects/StateBackgroundSubtraction.py +++ b/scripts/sans_core/state/StateObjects/StateBackgroundSubtraction.py @@ -9,10 +9,10 @@ import json import copy -from sans.state.JsonSerializable import JsonSerializable -from sans.state.automatic_setters import automatic_setters -from sans.state.state_functions import is_pure_none_or_not_none, validation_message -from sans.common.enums import SANSFacility +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.state.automatic_setters import automatic_setters +from sans_core.state.state_functions import is_pure_none_or_not_none, validation_message +from sans_core.common.enums import SANSFacility # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/state/StateObjects/StateCalculateTransmission.py b/scripts/sans_core/state/StateObjects/StateCalculateTransmission.py similarity index 98% rename from scripts/sans/state/StateObjects/StateCalculateTransmission.py rename to scripts/sans_core/state/StateObjects/StateCalculateTransmission.py index a786c726695d..577e96a25002 100644 --- a/scripts/sans/state/StateObjects/StateCalculateTransmission.py +++ b/scripts/sans_core/state/StateObjects/StateCalculateTransmission.py @@ -11,11 +11,11 @@ import json from typing import Dict -from sans.common.configurations import Configurations -from sans.common.enums import RebinType, RangeStepType, FitType, DataType, SANSInstrument -from sans.state.JsonSerializable import JsonSerializable -from sans.state.StateObjects.wavelength_interval import WavelengthInterval -from sans.state.state_functions import ( +from sans_core.common.configurations import Configurations +from sans_core.common.enums import RebinType, RangeStepType, FitType, DataType, SANSInstrument +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.state.StateObjects.wavelength_interval import WavelengthInterval +from sans_core.state.state_functions import ( is_pure_none_or_not_none, validation_message, is_not_none_and_first_larger_than_second, diff --git a/scripts/sans/state/StateObjects/StateCompatibility.py b/scripts/sans_core/state/StateObjects/StateCompatibility.py similarity index 92% rename from scripts/sans/state/StateObjects/StateCompatibility.py rename to scripts/sans_core/state/StateObjects/StateCompatibility.py index 4b0f2f8eaae6..29574f97ac24 100644 --- a/scripts/sans/state/StateObjects/StateCompatibility.py +++ b/scripts/sans_core/state/StateObjects/StateCompatibility.py @@ -14,15 +14,15 @@ import copy -from sans.state.JsonSerializable import JsonSerializable +from sans_core.state.JsonSerializable import JsonSerializable -from sans.common.enums import SANSFacility +from sans_core.common.enums import SANSFacility # ---------------------------------------------------------------------------------------------------------------------- # State # ---------------------------------------------------------------------------------------------------------------------- -from sans.state.automatic_setters import automatic_setters +from sans_core.state.automatic_setters import automatic_setters class StateCompatibility(metaclass=JsonSerializable): diff --git a/scripts/sans/state/StateObjects/StateConvertToQ.py b/scripts/sans_core/state/StateObjects/StateConvertToQ.py similarity index 96% rename from scripts/sans/state/StateObjects/StateConvertToQ.py rename to scripts/sans_core/state/StateObjects/StateConvertToQ.py index 3d7d7e2dcb7d..c8711a2cc59a 100644 --- a/scripts/sans/state/StateObjects/StateConvertToQ.py +++ b/scripts/sans_core/state/StateObjects/StateConvertToQ.py @@ -11,10 +11,10 @@ import json import copy -from sans.state.JsonSerializable import JsonSerializable -from sans.common.enums import ReductionDimensionality, SANSFacility -from sans.state.automatic_setters import automatic_setters -from sans.state.state_functions import is_pure_none_or_not_none, is_not_none_and_first_larger_than_second, validation_message +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.common.enums import ReductionDimensionality, SANSFacility +from sans_core.state.automatic_setters import automatic_setters +from sans_core.state.state_functions import is_pure_none_or_not_none, is_not_none_and_first_larger_than_second, validation_message # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/state/StateObjects/StateData.py b/scripts/sans_core/state/StateObjects/StateData.py similarity index 94% rename from scripts/sans/state/StateObjects/StateData.py rename to scripts/sans_core/state/StateObjects/StateData.py index 75a4fc4c86c4..c7cfa7940075 100644 --- a/scripts/sans/state/StateObjects/StateData.py +++ b/scripts/sans_core/state/StateObjects/StateData.py @@ -11,11 +11,10 @@ import json import copy -from sans.state.JsonSerializable import JsonSerializable -from sans.common.enums import SANSFacility, SANSInstrument -import sans.common.constants -from sans.state.automatic_setters import automatic_setters -from sans.state.state_functions import is_pure_none_or_not_none, validation_message +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.common.enums import SANSFacility, SANSInstrument +from sans_core.state.automatic_setters import automatic_setters +from sans_core.state.state_functions import is_pure_none_or_not_none, validation_message # ---------------------------------------------------------------------------------------------------------------------- @@ -24,7 +23,7 @@ class StateData(metaclass=JsonSerializable): - ALL_PERIODS = sans.common.constants.ALL_PERIODS + ALL_PERIODS = sans_core.common.constants.ALL_PERIODS def __init__(self): super(StateData, self).__init__() diff --git a/scripts/sans/state/StateObjects/StateMaskDetectors.py b/scripts/sans_core/state/StateObjects/StateMaskDetectors.py similarity index 97% rename from scripts/sans/state/StateObjects/StateMaskDetectors.py rename to scripts/sans_core/state/StateObjects/StateMaskDetectors.py index 120c5a7e32b1..0c92789adc52 100644 --- a/scripts/sans/state/StateObjects/StateMaskDetectors.py +++ b/scripts/sans_core/state/StateObjects/StateMaskDetectors.py @@ -12,13 +12,13 @@ import copy from typing import List -from sans.state.JsonSerializable import JsonSerializable -from sans.state.automatic_setters import automatic_setters -from sans.state.state_functions import is_pure_none_or_not_none, validation_message +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.state.automatic_setters import automatic_setters +from sans_core.state.state_functions import is_pure_none_or_not_none, validation_message -from sans.common.file_information import find_full_file_path -from sans.common.enums import DetectorType, SANSInstrument -from sans.common.general_functions import get_bank_for_spectrum_number +from sans_core.common.file_information import find_full_file_path +from sans_core.common.enums import DetectorType, SANSInstrument +from sans_core.common.general_functions import get_bank_for_spectrum_number # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/state/StateObjects/StateMoveDetectors.py b/scripts/sans_core/state/StateObjects/StateMoveDetectors.py similarity index 97% rename from scripts/sans/state/StateObjects/StateMoveDetectors.py rename to scripts/sans_core/state/StateObjects/StateMoveDetectors.py index b5f4b2f61c43..ad4a38767d7b 100644 --- a/scripts/sans/state/StateObjects/StateMoveDetectors.py +++ b/scripts/sans_core/state/StateObjects/StateMoveDetectors.py @@ -11,9 +11,9 @@ import copy from typing import Dict -from sans.common.enums import CanonicalCoordinates, SANSInstrument, DetectorType -from sans.state.JsonSerializable import JsonSerializable -from sans.state.automatic_setters import automatic_setters +from sans_core.common.enums import CanonicalCoordinates, SANSInstrument, DetectorType +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.state.automatic_setters import automatic_setters # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/state/StateObjects/StateNormalizeToMonitor.py b/scripts/sans_core/state/StateObjects/StateNormalizeToMonitor.py similarity index 96% rename from scripts/sans/state/StateObjects/StateNormalizeToMonitor.py rename to scripts/sans_core/state/StateObjects/StateNormalizeToMonitor.py index 57fdad021257..4443bf14f7c5 100644 --- a/scripts/sans/state/StateObjects/StateNormalizeToMonitor.py +++ b/scripts/sans_core/state/StateObjects/StateNormalizeToMonitor.py @@ -11,11 +11,11 @@ import json import copy -from sans.state.JsonSerializable import JsonSerializable -from sans.common.enums import SANSInstrument, RebinType -from sans.state.automatic_setters import automatic_setters -from sans.state.state_functions import is_pure_none_or_not_none, is_not_none_and_first_larger_than_second, validation_message -from sans.common.xml_parsing import get_named_elements_from_ipf_file +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.common.enums import SANSInstrument, RebinType +from sans_core.state.automatic_setters import automatic_setters +from sans_core.state.state_functions import is_pure_none_or_not_none, is_not_none_and_first_larger_than_second, validation_message +from sans_core.common.xml_parsing import get_named_elements_from_ipf_file class StateNormalizeToMonitor(metaclass=JsonSerializable): diff --git a/scripts/sans/state/StateObjects/StateReductionMode.py b/scripts/sans_core/state/StateObjects/StateReductionMode.py similarity index 91% rename from scripts/sans/state/StateObjects/StateReductionMode.py rename to scripts/sans_core/state/StateObjects/StateReductionMode.py index b30f31d1ac52..691a7d054aac 100644 --- a/scripts/sans/state/StateObjects/StateReductionMode.py +++ b/scripts/sans_core/state/StateObjects/StateReductionMode.py @@ -8,8 +8,8 @@ import json -from sans.common.enums import ReductionMode, ReductionDimensionality, FitModeForMerge -from sans.state.JsonSerializable import JsonSerializable +from sans_core.common.enums import ReductionMode, ReductionDimensionality, FitModeForMerge +from sans_core.state.JsonSerializable import JsonSerializable class StateReductionMode(metaclass=JsonSerializable): diff --git a/scripts/sans/state/StateObjects/StateSave.py b/scripts/sans_core/state/StateObjects/StateSave.py similarity index 91% rename from scripts/sans/state/StateObjects/StateSave.py rename to scripts/sans_core/state/StateObjects/StateSave.py index 8bc4e7e943a4..ee12a956f969 100644 --- a/scripts/sans/state/StateObjects/StateSave.py +++ b/scripts/sans_core/state/StateObjects/StateSave.py @@ -10,9 +10,9 @@ import copy -from sans.state.JsonSerializable import JsonSerializable -from sans.common.enums import SaveType, SANSFacility -from sans.state.automatic_setters import automatic_setters +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.common.enums import SaveType, SANSFacility +from sans_core.state.automatic_setters import automatic_setters class StateSave(metaclass=JsonSerializable): diff --git a/scripts/sans/state/StateObjects/StateScale.py b/scripts/sans_core/state/StateObjects/StateScale.py similarity index 94% rename from scripts/sans/state/StateObjects/StateScale.py rename to scripts/sans_core/state/StateObjects/StateScale.py index 37fde030bce4..25af4fabebf4 100644 --- a/scripts/sans/state/StateObjects/StateScale.py +++ b/scripts/sans_core/state/StateObjects/StateScale.py @@ -8,14 +8,14 @@ import copy -from sans.state.JsonSerializable import JsonSerializable -from sans.common.enums import SampleShape, SANSFacility +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.common.enums import SampleShape, SANSFacility # ---------------------------------------------------------------------------------------------------------------------- # State # ---------------------------------------------------------------------------------------------------------------------- -from sans.state.automatic_setters import automatic_setters +from sans_core.state.automatic_setters import automatic_setters class StateScale(metaclass=JsonSerializable): diff --git a/scripts/sans/state/StateObjects/StateSliceEvent.py b/scripts/sans_core/state/StateObjects/StateSliceEvent.py similarity index 94% rename from scripts/sans/state/StateObjects/StateSliceEvent.py rename to scripts/sans_core/state/StateObjects/StateSliceEvent.py index 690892bfd080..a1ed59ac4977 100644 --- a/scripts/sans/state/StateObjects/StateSliceEvent.py +++ b/scripts/sans_core/state/StateObjects/StateSliceEvent.py @@ -9,10 +9,10 @@ import json import copy -from sans.state.JsonSerializable import JsonSerializable -from sans.state.automatic_setters import automatic_setters -from sans.state.state_functions import is_pure_none_or_not_none, validation_message -from sans.common.enums import SANSFacility +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.state.automatic_setters import automatic_setters +from sans_core.state.state_functions import is_pure_none_or_not_none, validation_message +from sans_core.common.enums import SANSFacility # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/sans/state/StateObjects/StateWavelength.py b/scripts/sans_core/state/StateObjects/StateWavelength.py similarity index 90% rename from scripts/sans/state/StateObjects/StateWavelength.py rename to scripts/sans_core/state/StateObjects/StateWavelength.py index 467f1d32c411..162a2db48d38 100644 --- a/scripts/sans/state/StateObjects/StateWavelength.py +++ b/scripts/sans_core/state/StateObjects/StateWavelength.py @@ -9,11 +9,11 @@ import json import copy -from sans.state.JsonSerializable import JsonSerializable -from sans.common.enums import RangeStepType, SANSFacility -from sans.state.StateObjects.wavelength_interval import WavelengthInterval -from sans.state.automatic_setters import automatic_setters -from sans.state.state_functions import one_is_none, validation_message +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.common.enums import RangeStepType, SANSFacility +from sans_core.state.StateObjects.wavelength_interval import WavelengthInterval +from sans_core.state.automatic_setters import automatic_setters +from sans_core.state.state_functions import one_is_none, validation_message class StateWavelength(metaclass=JsonSerializable): diff --git a/scripts/sans/state/StateObjects/StateWavelengthAndPixelAdjustment.py b/scripts/sans_core/state/StateObjects/StateWavelengthAndPixelAdjustment.py similarity index 92% rename from scripts/sans/state/StateObjects/StateWavelengthAndPixelAdjustment.py rename to scripts/sans_core/state/StateObjects/StateWavelengthAndPixelAdjustment.py index b2943c963188..8207edf58b80 100644 --- a/scripts/sans/state/StateObjects/StateWavelengthAndPixelAdjustment.py +++ b/scripts/sans_core/state/StateObjects/StateWavelengthAndPixelAdjustment.py @@ -11,11 +11,11 @@ import copy import json -from sans.common.enums import RangeStepType, DetectorType -from sans.state.JsonSerializable import JsonSerializable -from sans.state.StateObjects.wavelength_interval import WavelengthInterval -from sans.state.automatic_setters import automatic_setters -from sans.state.state_functions import one_is_none, validation_message +from sans_core.common.enums import RangeStepType, DetectorType +from sans_core.state.JsonSerializable import JsonSerializable +from sans_core.state.StateObjects.wavelength_interval import WavelengthInterval +from sans_core.state.automatic_setters import automatic_setters +from sans_core.state.state_functions import one_is_none, validation_message class StateAdjustmentFiles(metaclass=JsonSerializable): diff --git a/scripts/sans/state/StateObjects/__init__.py b/scripts/sans_core/state/StateObjects/__init__.py similarity index 100% rename from scripts/sans/state/StateObjects/__init__.py rename to scripts/sans_core/state/StateObjects/__init__.py diff --git a/scripts/sans/state/StateObjects/state_instrument_info.py b/scripts/sans_core/state/StateObjects/state_instrument_info.py similarity index 94% rename from scripts/sans/state/StateObjects/state_instrument_info.py rename to scripts/sans_core/state/StateObjects/state_instrument_info.py index b63db4f4315d..02a3298227d3 100644 --- a/scripts/sans/state/StateObjects/state_instrument_info.py +++ b/scripts/sans_core/state/StateObjects/state_instrument_info.py @@ -6,11 +6,11 @@ # SPDX - License - Identifier: GPL - 3.0 + from typing import Dict -from sans.common.enums import SANSInstrument, DetectorType -from sans.common.xml_parsing import get_monitor_names_from_idf_file, get_named_elements_from_ipf_file -from sans.state.JsonSerializable import JsonSerializable +from sans_core.common.enums import SANSInstrument, DetectorType +from sans_core.common.xml_parsing import get_monitor_names_from_idf_file, get_named_elements_from_ipf_file +from sans_core.state.JsonSerializable import JsonSerializable from mantid.py36compat import dataclass -from sans.state.StateObjects.StateData import StateData +from sans_core.state.StateObjects.StateData import StateData @dataclass() diff --git a/scripts/sans/state/StateObjects/wavelength_interval.py b/scripts/sans_core/state/StateObjects/wavelength_interval.py similarity index 96% rename from scripts/sans/state/StateObjects/wavelength_interval.py rename to scripts/sans_core/state/StateObjects/wavelength_interval.py index d056ee7b0fe0..b0752af0c71f 100644 --- a/scripts/sans/state/StateObjects/wavelength_interval.py +++ b/scripts/sans_core/state/StateObjects/wavelength_interval.py @@ -7,7 +7,7 @@ from typing import Tuple, List from mantid.py36compat import dataclass, field -from sans.state.JsonSerializable import JsonSerializable +from sans_core.state.JsonSerializable import JsonSerializable WavRange = Tuple[float, float] diff --git a/scripts/sans/state/__init__.py b/scripts/sans_core/state/__init__.py similarity index 100% rename from scripts/sans/state/__init__.py rename to scripts/sans_core/state/__init__.py diff --git a/scripts/sans/state/automatic_setters.py b/scripts/sans_core/state/automatic_setters.py similarity index 100% rename from scripts/sans/state/automatic_setters.py rename to scripts/sans_core/state/automatic_setters.py diff --git a/scripts/sans/state/state_functions.py b/scripts/sans_core/state/state_functions.py similarity index 100% rename from scripts/sans/state/state_functions.py rename to scripts/sans_core/state/state_functions.py diff --git a/scripts/sans/test_helper/__init__.py b/scripts/sans_core/test_helper/__init__.py similarity index 100% rename from scripts/sans/test_helper/__init__.py rename to scripts/sans_core/test_helper/__init__.py diff --git a/scripts/sans/test_helper/common.py b/scripts/sans_core/test_helper/common.py similarity index 100% rename from scripts/sans/test_helper/common.py rename to scripts/sans_core/test_helper/common.py diff --git a/scripts/sans/test_helper/file_information_mock.py b/scripts/sans_core/test_helper/file_information_mock.py similarity index 92% rename from scripts/sans/test_helper/file_information_mock.py rename to scripts/sans_core/test_helper/file_information_mock.py index 1739c2bc00df..6b0c00fbf721 100644 --- a/scripts/sans/test_helper/file_information_mock.py +++ b/scripts/sans_core/test_helper/file_information_mock.py @@ -4,9 +4,9 @@ # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + -from sans.common.file_information import SANSFileInformation +from sans_core.common.file_information import SANSFileInformation from mantid.kernel import DateAndTime -from sans.common.enums import SANSFacility, SANSInstrument, FileType, SampleShape +from sans_core.common.enums import SANSFacility, SANSInstrument, FileType, SampleShape class SANSFileInformationMock(SANSFileInformation): diff --git a/scripts/sans/test_helper/test_director.py b/scripts/sans_core/test_helper/test_director.py similarity index 88% rename from scripts/sans/test_helper/test_director.py rename to scripts/sans_core/test_helper/test_director.py index 92cce547a82c..b2a8c0fe9583 100644 --- a/scripts/sans/test_helper/test_director.py +++ b/scripts/sans_core/test_helper/test_director.py @@ -6,22 +6,22 @@ # SPDX - License - Identifier: GPL - 3.0 + """A Test director""" -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateMoveDetectors import get_move_builder -from sans.state.StateObjects.StateReductionMode import StateReductionMode -from sans.state.StateObjects.StateSliceEvent import get_slice_event_builder -from sans.state.StateObjects.StateMaskDetectors import get_mask_builder -from sans.state.AllStates import get_all_states_builder -from sans.state.StateObjects.StateWavelength import get_wavelength_builder, StateWavelength -from sans.state.StateObjects.StateSave import get_save_builder -from sans.state.StateObjects.StateNormalizeToMonitor import get_normalize_to_monitor_builder -from sans.state.StateObjects.StateScale import get_scale_builder -from sans.state.StateObjects.StateCalculateTransmission import get_calculate_transmission -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import get_wavelength_and_pixel_adjustment_builder -from sans.state.StateObjects.StateAdjustment import get_adjustment_builder -from sans.state.StateObjects.StateConvertToQ import get_convert_to_q_builder - -from sans.common.enums import ( +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateMoveDetectors import get_move_builder +from sans_core.state.StateObjects.StateReductionMode import StateReductionMode +from sans_core.state.StateObjects.StateSliceEvent import get_slice_event_builder +from sans_core.state.StateObjects.StateMaskDetectors import get_mask_builder +from sans_core.state.AllStates import get_all_states_builder +from sans_core.state.StateObjects.StateWavelength import get_wavelength_builder, StateWavelength +from sans_core.state.StateObjects.StateSave import get_save_builder +from sans_core.state.StateObjects.StateNormalizeToMonitor import get_normalize_to_monitor_builder +from sans_core.state.StateObjects.StateScale import get_scale_builder +from sans_core.state.StateObjects.StateCalculateTransmission import get_calculate_transmission +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import get_wavelength_and_pixel_adjustment_builder +from sans_core.state.StateObjects.StateAdjustment import get_adjustment_builder +from sans_core.state.StateObjects.StateConvertToQ import get_convert_to_q_builder + +from sans_core.common.enums import ( SANSFacility, ReductionMode, ReductionDimensionality, @@ -33,8 +33,8 @@ SampleShape, SANSInstrument, ) -from sans.state.StateObjects.state_instrument_info import StateInstrumentInfo -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.state.StateObjects.state_instrument_info import StateInstrumentInfo +from sans_core.test_helper.file_information_mock import SANSFileInformationMock class TestDirector(object): diff --git a/scripts/sans/test_helper/user_file_test_helper.py b/scripts/sans_core/test_helper/user_file_test_helper.py similarity index 100% rename from scripts/sans/test_helper/user_file_test_helper.py rename to scripts/sans_core/test_helper/user_file_test_helper.py diff --git a/scripts/sans/user_file/__init__.py b/scripts/sans_core/user_file/__init__.py similarity index 100% rename from scripts/sans/user_file/__init__.py rename to scripts/sans_core/user_file/__init__.py diff --git a/scripts/sans/user_file/parser_helpers/__init__.py b/scripts/sans_core/user_file/parser_helpers/__init__.py similarity index 100% rename from scripts/sans/user_file/parser_helpers/__init__.py rename to scripts/sans_core/user_file/parser_helpers/__init__.py diff --git a/scripts/sans/user_file/parser_helpers/toml_parser_impl_base.py b/scripts/sans_core/user_file/parser_helpers/toml_parser_impl_base.py similarity index 100% rename from scripts/sans/user_file/parser_helpers/toml_parser_impl_base.py rename to scripts/sans_core/user_file/parser_helpers/toml_parser_impl_base.py diff --git a/scripts/sans/user_file/parser_helpers/wavelength_parser.py b/scripts/sans_core/user_file/parser_helpers/wavelength_parser.py similarity index 84% rename from scripts/sans/user_file/parser_helpers/wavelength_parser.py rename to scripts/sans_core/user_file/parser_helpers/wavelength_parser.py index 6ccdabc206ed..a042e28e0eab 100644 --- a/scripts/sans/user_file/parser_helpers/wavelength_parser.py +++ b/scripts/sans_core/user_file/parser_helpers/wavelength_parser.py @@ -7,13 +7,13 @@ from typing import Tuple from mantid.py36compat import dataclass -from sans.common.enums import RangeStepType -from sans.common.general_functions import get_ranges_from_event_slice_setting -from sans.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission -from sans.state.StateObjects.StateWavelength import StateWavelength -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment -from sans.state.StateObjects.wavelength_interval import WavRangePairs, WavRange -from sans.user_file.parser_helpers.toml_parser_impl_base import TomlParserImplBase +from sans_core.common.enums import RangeStepType +from sans_core.common.general_functions import get_ranges_from_event_slice_setting +from sans_core.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission +from sans_core.state.StateObjects.StateWavelength import StateWavelength +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment +from sans_core.state.StateObjects.wavelength_interval import WavRangePairs, WavRange +from sans_core.user_file.parser_helpers.toml_parser_impl_base import TomlParserImplBase @dataclass(init=True) diff --git a/scripts/sans/user_file/settings_tags.py b/scripts/sans_core/user_file/settings_tags.py similarity index 100% rename from scripts/sans/user_file/settings_tags.py rename to scripts/sans_core/user_file/settings_tags.py diff --git a/scripts/sans/user_file/toml_parsers/__init__.py b/scripts/sans_core/user_file/toml_parsers/__init__.py similarity index 100% rename from scripts/sans/user_file/toml_parsers/__init__.py rename to scripts/sans_core/user_file/toml_parsers/__init__.py diff --git a/scripts/sans/user_file/toml_parsers/toml_parser.py b/scripts/sans_core/user_file/toml_parsers/toml_parser.py similarity index 86% rename from scripts/sans/user_file/toml_parsers/toml_parser.py rename to scripts/sans_core/user_file/toml_parsers/toml_parser.py index a83b4f236c4d..2b1d923b617e 100644 --- a/scripts/sans/user_file/toml_parsers/toml_parser.py +++ b/scripts/sans_core/user_file/toml_parsers/toml_parser.py @@ -4,10 +4,10 @@ # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + -from sans.state.AllStates import AllStates -from sans.state.IStateParser import IStateParser -from sans.user_file.toml_parsers.toml_reader import TomlReader -from sans.user_file.toml_parsers.toml_v1_parser import TomlV1Parser +from sans_core.state.AllStates import AllStates +from sans_core.state.IStateParser import IStateParser +from sans_core.user_file.toml_parsers.toml_reader import TomlReader +from sans_core.user_file.toml_parsers.toml_v1_parser import TomlV1Parser class TomlParser(object): diff --git a/scripts/sans/user_file/toml_parsers/toml_reader.py b/scripts/sans_core/user_file/toml_parsers/toml_reader.py similarity index 100% rename from scripts/sans/user_file/toml_parsers/toml_reader.py rename to scripts/sans_core/user_file/toml_parsers/toml_reader.py diff --git a/scripts/sans/user_file/toml_parsers/toml_v1_parser.py b/scripts/sans_core/user_file/toml_parsers/toml_v1_parser.py similarity index 93% rename from scripts/sans/user_file/toml_parsers/toml_v1_parser.py rename to scripts/sans_core/user_file/toml_parsers/toml_v1_parser.py index 3eaeb57800dc..9958a3946040 100644 --- a/scripts/sans/user_file/toml_parsers/toml_v1_parser.py +++ b/scripts/sans_core/user_file/toml_parsers/toml_v1_parser.py @@ -5,26 +5,26 @@ # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + -from sans.common.enums import SANSInstrument, ReductionMode, DetectorType, RangeStepType, FitModeForMerge, DataType, FitType, RebinType -from sans.common.general_functions import get_bank_for_spectrum_number, get_detector_types_from_instrument -from sans.state.IStateParser import IStateParser -from sans.state.StateObjects.StateAdjustment import StateAdjustment -from sans.state.StateObjects.StateCalculateTransmission import get_calculate_transmission -from sans.state.StateObjects.StateCompatibility import StateCompatibility -from sans.state.StateObjects.StateConvertToQ import StateConvertToQ -from sans.state.StateObjects.StateData import StateData -from sans.state.StateObjects.StateMaskDetectors import get_mask_builder, StateMaskDetectors -from sans.state.StateObjects.StateMoveDetectors import get_move_builder -from sans.state.StateObjects.StateNormalizeToMonitor import get_normalize_to_monitor_builder -from sans.state.StateObjects.StateReductionMode import StateReductionMode -from sans.state.StateObjects.StateSave import StateSave -from sans.state.StateObjects.StateScale import StateScale -from sans.state.StateObjects.StateSliceEvent import StateSliceEvent -from sans.state.StateObjects.StateWavelength import StateWavelength -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import get_wavelength_and_pixel_adjustment_builder -from sans.user_file.parser_helpers.toml_parser_impl_base import TomlParserImplBase -from sans.user_file.parser_helpers.wavelength_parser import DuplicateWavelengthStates, WavelengthTomlParser -from sans.user_file.toml_parsers.toml_v1_schema import TomlSchemaV1Validator +from sans_core.common.enums import SANSInstrument, ReductionMode, DetectorType, RangeStepType, FitModeForMerge, DataType, FitType, RebinType +from sans_core.common.general_functions import get_bank_for_spectrum_number, get_detector_types_from_instrument +from sans_core.state.IStateParser import IStateParser +from sans_core.state.StateObjects.StateAdjustment import StateAdjustment +from sans_core.state.StateObjects.StateCalculateTransmission import get_calculate_transmission +from sans_core.state.StateObjects.StateCompatibility import StateCompatibility +from sans_core.state.StateObjects.StateConvertToQ import StateConvertToQ +from sans_core.state.StateObjects.StateData import StateData +from sans_core.state.StateObjects.StateMaskDetectors import get_mask_builder, StateMaskDetectors +from sans_core.state.StateObjects.StateMoveDetectors import get_move_builder +from sans_core.state.StateObjects.StateNormalizeToMonitor import get_normalize_to_monitor_builder +from sans_core.state.StateObjects.StateReductionMode import StateReductionMode +from sans_core.state.StateObjects.StateSave import StateSave +from sans_core.state.StateObjects.StateScale import StateScale +from sans_core.state.StateObjects.StateSliceEvent import StateSliceEvent +from sans_core.state.StateObjects.StateWavelength import StateWavelength +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import get_wavelength_and_pixel_adjustment_builder +from sans_core.user_file.parser_helpers.toml_parser_impl_base import TomlParserImplBase +from sans_core.user_file.parser_helpers.wavelength_parser import DuplicateWavelengthStates, WavelengthTomlParser +from sans_core.user_file.toml_parsers.toml_v1_schema import TomlSchemaV1Validator class TomlV1Parser(IStateParser): diff --git a/scripts/sans/user_file/toml_parsers/toml_v1_schema.py b/scripts/sans_core/user_file/toml_parsers/toml_v1_schema.py similarity index 100% rename from scripts/sans/user_file/toml_parsers/toml_v1_schema.py rename to scripts/sans_core/user_file/toml_parsers/toml_v1_schema.py diff --git a/scripts/sans/user_file/txt_parsers/CommandInterfaceAdapter.py b/scripts/sans_core/user_file/txt_parsers/CommandInterfaceAdapter.py similarity index 84% rename from scripts/sans/user_file/txt_parsers/CommandInterfaceAdapter.py rename to scripts/sans_core/user_file/txt_parsers/CommandInterfaceAdapter.py index bb4a9beaa9a4..d66b8105d4f6 100644 --- a/scripts/sans/user_file/txt_parsers/CommandInterfaceAdapter.py +++ b/scripts/sans_core/user_file/txt_parsers/CommandInterfaceAdapter.py @@ -4,8 +4,8 @@ # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + -from sans.state.AllStates import AllStates -from sans.user_file.txt_parsers.ParsedDictConverter import ParsedDictConverter +from sans_core.state.AllStates import AllStates +from sans_core.user_file.txt_parsers.ParsedDictConverter import ParsedDictConverter class CommandInterfaceAdapter(ParsedDictConverter): diff --git a/scripts/sans/user_file/txt_parsers/ParsedDictConverter.py b/scripts/sans_core/user_file/txt_parsers/ParsedDictConverter.py similarity index 97% rename from scripts/sans/user_file/txt_parsers/ParsedDictConverter.py rename to scripts/sans_core/user_file/txt_parsers/ParsedDictConverter.py index 0d5ca06c58a8..9382d1b2e9c0 100644 --- a/scripts/sans/user_file/txt_parsers/ParsedDictConverter.py +++ b/scripts/sans_core/user_file/txt_parsers/ParsedDictConverter.py @@ -6,25 +6,25 @@ # SPDX - License - Identifier: GPL - 3.0 + import abc -from sans.common.enums import DetectorType, RangeStepType, RebinType, FitType, DataType, FitModeForMerge -from sans.common.general_functions import get_ranges_from_event_slice_setting, get_ranges_for_rebin_setting, get_ranges_for_rebin_array -from sans.state.AllStates import AllStates -from sans.state.IStateParser import IStateParser -from sans.state.StateObjects.StateAdjustment import StateAdjustment -from sans.state.StateObjects.StateCalculateTransmission import get_calculate_transmission -from sans.state.StateObjects.StateCompatibility import StateCompatibility -from sans.state.StateObjects.StateConvertToQ import StateConvertToQ -from sans.state.StateObjects.StateMaskDetectors import get_mask_builder -from sans.state.StateObjects.StateMoveDetectors import get_move_builder -from sans.state.StateObjects.StateNormalizeToMonitor import get_normalize_to_monitor_builder -from sans.state.StateObjects.StateReductionMode import StateReductionMode -from sans.state.StateObjects.StateSave import StateSave -from sans.state.StateObjects.StateScale import StateScale -from sans.state.StateObjects.StateSliceEvent import StateSliceEvent -from sans.state.StateObjects.StateWavelength import StateWavelength -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment -from sans.user_file.parser_helpers.wavelength_parser import parse_range_wavelength -from sans.user_file.settings_tags import ( +from sans_core.common.enums import DetectorType, RangeStepType, RebinType, FitType, DataType, FitModeForMerge +from sans_core.common.general_functions import get_ranges_from_event_slice_setting, get_ranges_for_rebin_setting, get_ranges_for_rebin_array +from sans_core.state.AllStates import AllStates +from sans_core.state.IStateParser import IStateParser +from sans_core.state.StateObjects.StateAdjustment import StateAdjustment +from sans_core.state.StateObjects.StateCalculateTransmission import get_calculate_transmission +from sans_core.state.StateObjects.StateCompatibility import StateCompatibility +from sans_core.state.StateObjects.StateConvertToQ import StateConvertToQ +from sans_core.state.StateObjects.StateMaskDetectors import get_mask_builder +from sans_core.state.StateObjects.StateMoveDetectors import get_move_builder +from sans_core.state.StateObjects.StateNormalizeToMonitor import get_normalize_to_monitor_builder +from sans_core.state.StateObjects.StateReductionMode import StateReductionMode +from sans_core.state.StateObjects.StateSave import StateSave +from sans_core.state.StateObjects.StateScale import StateScale +from sans_core.state.StateObjects.StateSliceEvent import StateSliceEvent +from sans_core.state.StateObjects.StateWavelength import StateWavelength +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment +from sans_core.user_file.parser_helpers.wavelength_parser import parse_range_wavelength +from sans_core.user_file.settings_tags import ( TubeCalibrationFileId, MaskId, LimitsId, diff --git a/scripts/sans/user_file/txt_parsers/UserFileReaderAdapter.py b/scripts/sans_core/user_file/txt_parsers/UserFileReaderAdapter.py similarity index 85% rename from scripts/sans/user_file/txt_parsers/UserFileReaderAdapter.py rename to scripts/sans_core/user_file/txt_parsers/UserFileReaderAdapter.py index 504061a8b107..41899725ec42 100644 --- a/scripts/sans/user_file/txt_parsers/UserFileReaderAdapter.py +++ b/scripts/sans_core/user_file/txt_parsers/UserFileReaderAdapter.py @@ -4,8 +4,8 @@ # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + -from sans.user_file.txt_parsers.ParsedDictConverter import ParsedDictConverter -from sans.user_file.user_file_reader import UserFileReader +from sans_core.user_file.txt_parsers.ParsedDictConverter import ParsedDictConverter +from sans_core.user_file.user_file_reader import UserFileReader class UserFileReaderAdapter(ParsedDictConverter): diff --git a/scripts/sans/user_file/txt_parsers/__init__.py b/scripts/sans_core/user_file/txt_parsers/__init__.py similarity index 100% rename from scripts/sans/user_file/txt_parsers/__init__.py rename to scripts/sans_core/user_file/txt_parsers/__init__.py diff --git a/scripts/sans/user_file/user_file_parser.py b/scripts/sans_core/user_file/user_file_parser.py similarity index 99% rename from scripts/sans/user_file/user_file_parser.py rename to scripts/sans_core/user_file/user_file_parser.py index 5065e868516e..3275f3df2477 100644 --- a/scripts/sans/user_file/user_file_parser.py +++ b/scripts/sans_core/user_file/user_file_parser.py @@ -11,8 +11,8 @@ from math import copysign -from sans.common.enums import ReductionMode, DetectorType, RangeStepType, FitType, DataType, SANSInstrument -from sans.user_file.settings_tags import ( +from sans_core.common.enums import ReductionMode, DetectorType, RangeStepType, FitType, DataType, SANSInstrument +from sans_core.user_file.settings_tags import ( DetectorId, BackId, range_entry, diff --git a/scripts/sans/user_file/user_file_reader.py b/scripts/sans_core/user_file/user_file_reader.py similarity index 92% rename from scripts/sans/user_file/user_file_reader.py rename to scripts/sans_core/user_file/user_file_reader.py index 25ea4e1a1c84..ebe15b07ec63 100644 --- a/scripts/sans/user_file/user_file_reader.py +++ b/scripts/sans_core/user_file/user_file_reader.py @@ -4,8 +4,8 @@ # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + -from sans.common.file_information import find_full_file_path -from sans.user_file.user_file_parser import UserFileParser +from sans_core.common.file_information import find_full_file_path +from sans_core.user_file.user_file_parser import UserFileParser class UserFileReader(object): diff --git a/scripts/test/sans/algorithm_detail/batch_execution_test.py b/scripts/test/sans/algorithm_detail/batch_execution_test.py index 74bf27fa11d6..0d93246db6f2 100644 --- a/scripts/test/sans/algorithm_detail/batch_execution_test.py +++ b/scripts/test/sans/algorithm_detail/batch_execution_test.py @@ -10,7 +10,7 @@ from mantid.api import WorkspaceGroup, AnalysisDataService from mantid.simpleapi import CreateSampleWorkspace, GroupWorkspaces -from sans.algorithm_detail.batch_execution import ( +from sans_core.algorithm_detail.batch_execution import ( get_all_names_to_save, get_transmission_names_to_save, ReductionPackage, @@ -23,8 +23,8 @@ group_bgsub_if_required, save_to_file, ) -from sans.common.enums import SaveType, ReductionMode -from sans.common.constants import SCALED_BGSUB_SUFFIX +from sans_core.common.enums import SaveType, ReductionMode +from sans_core.common.constants import SCALED_BGSUB_SUFFIX class ADSMock(object): @@ -187,7 +187,7 @@ def test_that_empty_string_returned_if_transmission_base_name_is_none(self): f"Should have returned an empty string because transmission sample name was None. Returned {returned_name} instead", ) - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(False)) + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(False)) def test_no_transmission_workspace_names_returned_if_not_in_ADS(self): # Check transmission sample returned_name = get_transmission_names_to_save(self.reduction_package_transmissions, False) @@ -205,7 +205,7 @@ def test_no_transmission_workspace_names_returned_if_not_in_ADS(self): f"Should have returned an empty string because transmission can was not in the ADS. Returned {returned_name} instead", ) - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) def test_transmission_workspace_names_from_reduction_package_are_returned_if_in_ADS(self): reduction_package = self.reduction_package_transmissions reduction_package.unfitted_transmission_base_name = "Base" @@ -229,7 +229,7 @@ def test_transmission_workspace_names_from_reduction_package_are_returned_if_in_ f"Should have returned transmission can as name because transmission can was not in the ADS. Returned {returned_name} instead.", ) - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) def test_transmission_names_added_to_correct_workspaces_when_not_saving_can(self): reduction_packages = [self.reduction_package_transmissions] names_to_save = get_all_names_to_save(reduction_packages, False) @@ -242,7 +242,7 @@ def test_transmission_names_added_to_correct_workspaces_when_not_saving_can(self self.assertEqual(names_to_save, names_expected) - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) def test_transmission_names_added_to_unsubtracted_can_and_sample(self): reduction_packages = [self.reduction_package_transmissions] names_to_save = get_all_names_to_save(reduction_packages, True) @@ -268,7 +268,7 @@ def test_does_not_use_event_slice_optimisation_when_not_requiring_event_slices(s ) self.assertEqual(actual_using_event_slice_optimisation, False) - @mock.patch("sans.algorithm_detail.batch_execution.split_reduction_packages_for_event_slice_packages") + @mock.patch("sans_core.algorithm_detail.batch_execution.split_reduction_packages_for_event_slice_packages") def test_does_not_use_event_slice_optimisation_when_compatibility_mode_turned_on(self, event_slice_splitter_mock): require_event_slices = True compatibility_mode = True @@ -280,7 +280,7 @@ def test_does_not_use_event_slice_optimisation_when_compatibility_mode_turned_on # Test that reduction packages have been split into event slices event_slice_splitter_mock.assert_called_once_with([]) - @mock.patch("sans.algorithm_detail.batch_execution.split_reduction_packages_for_event_slice_packages") + @mock.patch("sans_core.algorithm_detail.batch_execution.split_reduction_packages_for_event_slice_packages") def test_does_not_use_event_slice_optimisation_when_optimisation_not_selected(self, event_slice_splitter_mock): require_event_slices = True compatibility_mode = False @@ -301,7 +301,7 @@ def test_use_event_slice_optimisation_when_using_event_slice_optimisation_is_che ) self.assertEqual(actual_using_event_slice_optimisation, True) - @mock.patch("sans.algorithm_detail.batch_execution.create_unmanaged_algorithm") + @mock.patch("sans_core.algorithm_detail.batch_execution.create_unmanaged_algorithm") def test_that_save_workspace_to_file_includes_run_numbers_in_options(self, mock_alg_manager): ws_name = "wsName" filename = "fileName" @@ -327,8 +327,8 @@ def test_that_save_workspace_to_file_includes_run_numbers_in_options(self, mock_ } mock_alg_manager.assert_called_once_with("SANSSave", **expected_options) - @mock.patch("sans.algorithm_detail.batch_execution.get_all_names_to_save") - @mock.patch("sans.algorithm_detail.batch_execution.save_workspace_to_file") + @mock.patch("sans_core.algorithm_detail.batch_execution.get_all_names_to_save") + @mock.patch("sans_core.algorithm_detail.batch_execution.save_workspace_to_file") def test_that_non_subtracted_save_to_file_does_not_include_metadata_in_options(self, mock_save_func, mock_names_func): state = mock.MagicMock() save_info_mock = mock.MagicMock() @@ -346,8 +346,8 @@ def test_that_non_subtracted_save_to_file_does_not_include_metadata_in_options(s save_to_file([reduction_package], False, {}, {}) mock_save_func.assert_called_with("unsubbed_ws", file_formats_mock, "unsubbed_ws", {}, {}) - @mock.patch("sans.algorithm_detail.batch_execution.get_all_names_to_save") - @mock.patch("sans.algorithm_detail.batch_execution.save_workspace_to_file") + @mock.patch("sans_core.algorithm_detail.batch_execution.get_all_names_to_save") + @mock.patch("sans_core.algorithm_detail.batch_execution.save_workspace_to_file") def test_that_subtracted_save_to_file_includes_metadata_in_options(self, mock_save_func, mock_names_func): state = mock.MagicMock() save_info_mock = mock.MagicMock() @@ -371,7 +371,7 @@ def test_that_subtracted_save_to_file_includes_metadata_in_options(self, mock_sa {"BackgroundSubtractionWorkspace": "scaled_ws", "BackgroundSubtractionScaleFactor": 0.5}, ) - @mock.patch("sans.algorithm_detail.batch_execution.create_unmanaged_algorithm") + @mock.patch("sans_core.algorithm_detail.batch_execution.create_unmanaged_algorithm") def test_that_subtracted_save_workspace_to_file_does_include_metadata_in_options(self, mock_alg_manager): ws_name = "wsName_bgsub" filename = "fileName" @@ -390,7 +390,7 @@ def test_that_subtracted_save_workspace_to_file_does_include_metadata_in_options } mock_alg_manager.assert_called_once_with("SANSSave", **expected_options) - @mock.patch("sans.algorithm_detail.batch_execution.create_unmanaged_algorithm") + @mock.patch("sans_core.algorithm_detail.batch_execution.create_unmanaged_algorithm") def test_that_save_workspace_to_file_can_set_file_types(self, mock_alg_manager): ws_name = "wsName" filename = "fileName" @@ -414,7 +414,7 @@ def test_that_save_workspace_to_file_can_set_file_types(self, mock_alg_manager): } mock_alg_manager.assert_called_once_with("SANSSave", **expected_options) - @mock.patch("sans.algorithm_detail.batch_execution.create_unmanaged_algorithm") + @mock.patch("sans_core.algorithm_detail.batch_execution.create_unmanaged_algorithm") def test_that_save_workspace_to_file_can_set_transmission_workspace_names(self, mock_alg_manager): ws_name = "wsName" filename = "fileName" @@ -444,8 +444,8 @@ def test_that_save_workspace_to_file_can_set_transmission_workspace_names(self, class ScaledBackgroundSubtractionTest(unittest.TestCase): - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) - @mock.patch("sans.algorithm_detail.batch_execution.create_unmanaged_algorithm") + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) + @mock.patch("sans_core.algorithm_detail.batch_execution.create_unmanaged_algorithm") def test_get_scaled_background_workspace_calls_algs(self, mock_alg_manager): state = mock.MagicMock() reduction_package = mock.MagicMock() @@ -467,8 +467,8 @@ def test_get_scaled_background_workspace_calls_algs(self, mock_alg_manager): mock_alg_manager.assert_called_once_with("Scale", **expected_options) self.assertEqual(result, expected_out_name, "Should output the scaled ws name.") - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) - @mock.patch("sans.algorithm_detail.batch_execution.create_unmanaged_algorithm") + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) + @mock.patch("sans_core.algorithm_detail.batch_execution.create_unmanaged_algorithm") def test_subtract_background_from_merged_calls_algorithms_correctly(self, mock_alg_manager): mock_minus = mock.MagicMock() reduction_package = mock.MagicMock() @@ -485,7 +485,7 @@ def test_subtract_background_from_merged_calls_algorithms_correctly(self, mock_a self.assertEqual(len(created_workspaces), len(created_workspace_names)) self.assertEqual(mock_minus.execute.call_count, 2) - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(True)) def test_check_for_background_workspace_in_ads_workspace_exists(self): state = mock.MagicMock() reduction_package = mock.MagicMock() @@ -493,7 +493,7 @@ def test_check_for_background_workspace_in_ads_workspace_exists(self): self.assertEqual("test_ws", check_for_background_workspace_in_ads(state, reduction_package)) - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService") + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService") def test_check_for_background_workspace_in_ads_suffix_workspace_exists(self, ads): state = mock.MagicMock() reduction_package = mock.MagicMock() @@ -505,7 +505,7 @@ def test_check_for_background_workspace_in_ads_suffix_workspace_exists(self, ads self.assertEqual("test_ws_merged_1D_1_2", check_for_background_workspace_in_ads(state, reduction_package)) - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService") + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService") def test_check_for_background_workspace_in_ads_suffix_workspace_exists_and_no_name_given(self, ads): state = mock.MagicMock() reduction_package = mock.MagicMock() @@ -518,7 +518,7 @@ def test_check_for_background_workspace_in_ads_suffix_workspace_exists_and_no_na self.assertEqual("test_ws_merged_1D_1_2", check_for_background_workspace_in_ads(state, reduction_package)) - @mock.patch("sans.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(False)) + @mock.patch("sans_core.algorithm_detail.batch_execution.AnalysisDataService", new=ADSMock(False)) def test_check_for_background_workspace_in_ads_workspace_none_exists(self): state = mock.MagicMock() reduction_package = mock.MagicMock() @@ -544,7 +544,7 @@ def test_create_scaled_background_with_all_detectors_fails(self): reduction_package, ) - @mock.patch("sans.algorithm_detail.batch_execution.add_to_group") + @mock.patch("sans_core.algorithm_detail.batch_execution.add_to_group") def test_group_bgsub_if_required(self, mock_add): reduction_package = mock.MagicMock() reduction_package.reduction_mode = ReductionMode.MERGED diff --git a/scripts/test/sans/algorithm_detail/calculate_sans_transmission_test.py b/scripts/test/sans/algorithm_detail/calculate_sans_transmission_test.py index 936729b4919a..b987f9158c4e 100644 --- a/scripts/test/sans/algorithm_detail/calculate_sans_transmission_test.py +++ b/scripts/test/sans/algorithm_detail/calculate_sans_transmission_test.py @@ -8,10 +8,10 @@ import unittest from mantid.simpleapi import CloneWorkspace, DeleteWorkspace, Load, Rebin -from sans.algorithm_detail.calculate_sans_transmission import calculate_transmission -from sans.common.enums import RebinType, RangeStepType, FitType -from sans.state.StateObjects.StateCalculateTransmission import get_calculate_transmission -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.calculate_sans_transmission import calculate_transmission +from sans_core.common.enums import RebinType, RangeStepType, FitType +from sans_core.state.StateObjects.StateCalculateTransmission import get_calculate_transmission +from sans_core.test_helper.test_director import TestDirector def get_expected_for_spectrum_n(data_workspace, selected_workspace_index, value_array): diff --git a/scripts/test/sans/algorithm_detail/calculate_transmission_helper_test.py b/scripts/test/sans/algorithm_detail/calculate_transmission_helper_test.py index 9a2db345c0c4..ea3a8daf69f5 100644 --- a/scripts/test/sans/algorithm_detail/calculate_transmission_helper_test.py +++ b/scripts/test/sans/algorithm_detail/calculate_transmission_helper_test.py @@ -10,7 +10,7 @@ from mantid.api import AnalysisDataService from mantid.kernel import config, ConfigService from mantid.simpleapi import CreateSampleWorkspace, MaskDetectors, DeleteWorkspace, LoadNexusProcessed, Load, Rebin -from sans.algorithm_detail.calculate_transmission_helper import ( +from sans_core.algorithm_detail.calculate_transmission_helper import ( get_masked_det_ids, get_idf_path_from_workspace, get_workspace_indices_for_monitors, diff --git a/scripts/test/sans/algorithm_detail/centre_finder_new_test.py b/scripts/test/sans/algorithm_detail/centre_finder_new_test.py index 03bf4607917b..b9079534d82c 100644 --- a/scripts/test/sans/algorithm_detail/centre_finder_new_test.py +++ b/scripts/test/sans/algorithm_detail/centre_finder_new_test.py @@ -7,9 +7,9 @@ import unittest from unittest import mock -from sans.algorithm_detail.centre_finder_new import centre_finder_new, centre_finder_mass -from sans.common.enums import SANSDataType, FindDirectionEnum, DetectorType -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.centre_finder_new import centre_finder_new, centre_finder_mass +from sans_core.common.enums import SANSDataType, FindDirectionEnum, DetectorType +from sans_core.test_helper.test_director import TestDirector class CentreFinderNewTest(unittest.TestCase): @@ -17,8 +17,8 @@ def setUp(self): state_builder = TestDirector() self.state = state_builder.construct() - @mock.patch("sans.algorithm_detail.centre_finder_new.provide_loaded_data") - @mock.patch("sans.algorithm_detail.centre_finder_new.create_managed_non_child_algorithm") + @mock.patch("sans_core.algorithm_detail.centre_finder_new.provide_loaded_data") + @mock.patch("sans_core.algorithm_detail.centre_finder_new.create_managed_non_child_algorithm") def test_that_create_manage_non_child_algorithm_is_called_once_in_centre_finder_new(self, make_algorithm_mock, load_data_mock): r_min = 5 r_max = 10 @@ -59,8 +59,8 @@ def test_that_create_manage_non_child_algorithm_is_called_once_in_centre_finder_ make_algorithm_mock.assert_called_once_with(beam_centre_finder, **beam_centre_finder_options) - @mock.patch("sans.algorithm_detail.centre_finder_new.provide_loaded_data") - @mock.patch("sans.algorithm_detail.centre_finder_new.create_managed_non_child_algorithm") + @mock.patch("sans_core.algorithm_detail.centre_finder_new.provide_loaded_data") + @mock.patch("sans_core.algorithm_detail.centre_finder_new.create_managed_non_child_algorithm") def test_that_create_manage_non_child_algorithm_is_called_once_in_centre_finder_mass(self, make_algorithm_mock, load_data_mock): r_min = 5 position_1_start = 300 diff --git a/scripts/test/sans/algorithm_detail/convert_to_q_test.py b/scripts/test/sans/algorithm_detail/convert_to_q_test.py index 0475be6184df..d441d4718872 100644 --- a/scripts/test/sans/algorithm_detail/convert_to_q_test.py +++ b/scripts/test/sans/algorithm_detail/convert_to_q_test.py @@ -7,13 +7,13 @@ import unittest from mantid.simpleapi import DeleteWorkspace -from sans.algorithm_detail.convert_to_q import convert_workspace -from sans.common.enums import SANSFacility, ReductionDimensionality, RangeStepType, SANSInstrument -from sans.common.general_functions import create_unmanaged_algorithm -from sans.state.StateObjects.StateConvertToQ import get_convert_to_q_builder -from sans.state.StateObjects.StateData import get_data_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.convert_to_q import convert_workspace +from sans_core.common.enums import SANSFacility, ReductionDimensionality, RangeStepType, SANSInstrument +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.state.StateObjects.StateConvertToQ import get_convert_to_q_builder +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.test_helper.test_director import TestDirector class ConvertToQTest(unittest.TestCase): diff --git a/scripts/test/sans/algorithm_detail/create_sans_adjustment_workspaces_test.py b/scripts/test/sans/algorithm_detail/create_sans_adjustment_workspaces_test.py index a3153ac5812b..4615025cbfe4 100644 --- a/scripts/test/sans/algorithm_detail/create_sans_adjustment_workspaces_test.py +++ b/scripts/test/sans/algorithm_detail/create_sans_adjustment_workspaces_test.py @@ -7,9 +7,9 @@ import unittest from mantid.simpleapi import CreateSampleWorkspace, CloneWorkspace, Load, Rebin -from sans.algorithm_detail.CreateSANSAdjustmentWorkspaces import CreateSANSAdjustmentWorkspaces -from sans.common.enums import DetectorType, DataType -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.CreateSANSAdjustmentWorkspaces import CreateSANSAdjustmentWorkspaces +from sans_core.common.enums import DetectorType, DataType +from sans_core.test_helper.test_director import TestDirector class CreateSANSAdjustmentWorkspacesTest(unittest.TestCase): diff --git a/scripts/test/sans/algorithm_detail/create_sans_wavelength_pixel_adjustment_test.py b/scripts/test/sans/algorithm_detail/create_sans_wavelength_pixel_adjustment_test.py index 45835fdd7b5c..20229a784b37 100644 --- a/scripts/test/sans/algorithm_detail/create_sans_wavelength_pixel_adjustment_test.py +++ b/scripts/test/sans/algorithm_detail/create_sans_wavelength_pixel_adjustment_test.py @@ -10,10 +10,10 @@ from mantid.kernel import config from mantid.simpleapi import CreateSampleWorkspace -from sans.algorithm_detail.CreateSANSWavelengthPixelAdjustment import CreateSANSWavelengthPixelAdjustment -from sans.common.enums import RangeStepType, DetectorType -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import get_wavelength_and_pixel_adjustment_builder -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.CreateSANSWavelengthPixelAdjustment import CreateSANSWavelengthPixelAdjustment +from sans_core.common.enums import RangeStepType, DetectorType +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import get_wavelength_and_pixel_adjustment_builder +from sans_core.test_helper.test_director import TestDirector class CreateSANSWavelengthPixelAdjustmentTest(unittest.TestCase): diff --git a/scripts/test/sans/algorithm_detail/crop_helper_test.py b/scripts/test/sans/algorithm_detail/crop_helper_test.py index 162d524d04d3..09a82f786d0a 100644 --- a/scripts/test/sans/algorithm_detail/crop_helper_test.py +++ b/scripts/test/sans/algorithm_detail/crop_helper_test.py @@ -7,10 +7,10 @@ import unittest from mantid.api import FileFinder -from sans.algorithm_detail.crop_helper import get_component_name -from sans.common.constants import EMPTY_NAME -from sans.common.enums import DetectorType -from sans.common.general_functions import create_unmanaged_algorithm +from sans_core.algorithm_detail.crop_helper import get_component_name +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import DetectorType +from sans_core.common.general_functions import create_unmanaged_algorithm class CropHelperTest(unittest.TestCase): diff --git a/scripts/test/sans/algorithm_detail/mask_sans_workspace_test.py b/scripts/test/sans/algorithm_detail/mask_sans_workspace_test.py index 0b3551154608..0b9cbaef46c3 100644 --- a/scripts/test/sans/algorithm_detail/mask_sans_workspace_test.py +++ b/scripts/test/sans/algorithm_detail/mask_sans_workspace_test.py @@ -10,15 +10,15 @@ import unittest from mantid.simpleapi import CloneWorkspace, DeleteWorkspace, Load, LoadEmptyInstrument, SANSLoad -from sans.algorithm_detail.mask_sans_workspace import mask_workspace -from sans.common.enums import SANSFacility -from sans.common.file_information import SANSFileInformationFactory -from sans.state.Serializer import Serializer -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateMaskDetectors import get_mask_builder -from sans.state.StateObjects.StateMoveDetectors import get_move_builder -from sans.state.StateObjects.state_instrument_info import StateInstrumentInfo -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.mask_sans_workspace import mask_workspace +from sans_core.common.enums import SANSFacility +from sans_core.common.file_information import SANSFileInformationFactory +from sans_core.state.Serializer import Serializer +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateMaskDetectors import get_mask_builder +from sans_core.state.StateObjects.StateMoveDetectors import get_move_builder +from sans_core.state.StateObjects.state_instrument_info import StateInstrumentInfo +from sans_core.test_helper.test_director import TestDirector def get_masked_spectrum_numbers(workspace): diff --git a/scripts/test/sans/algorithm_detail/mask_workspace_test.py b/scripts/test/sans/algorithm_detail/mask_workspace_test.py index ead1f0aa662c..6efffff939eb 100644 --- a/scripts/test/sans/algorithm_detail/mask_workspace_test.py +++ b/scripts/test/sans/algorithm_detail/mask_workspace_test.py @@ -7,12 +7,12 @@ import unittest from unittest import mock -from sans.algorithm_detail.mask_workspace import mask_with_mask_files +from sans_core.algorithm_detail.mask_workspace import mask_with_mask_files class MaskWorkspaceTest(unittest.TestCase): - @mock.patch("sans.algorithm_detail.mask_workspace.find_full_file_path") - @mock.patch("sans.algorithm_detail.mask_workspace.create_unmanaged_algorithm") + @mock.patch("sans_core.algorithm_detail.mask_workspace.find_full_file_path") + @mock.patch("sans_core.algorithm_detail.mask_workspace.create_unmanaged_algorithm") def test_raises_if_file_not_found(self, _1, finder): mask_info, inst_info = mock.Mock(), mock.Mock() mask_info.mask_files = ["filename", "filename2"] @@ -20,8 +20,8 @@ def test_raises_if_file_not_found(self, _1, finder): with self.assertRaisesRegex(FileNotFoundError, "(?=filename)(?=filename2)"): mask_with_mask_files(mask_info, inst_info, workspace=None) - @mock.patch("sans.algorithm_detail.mask_workspace.find_full_file_path") - @mock.patch("sans.algorithm_detail.mask_workspace.create_unmanaged_algorithm") + @mock.patch("sans_core.algorithm_detail.mask_workspace.find_full_file_path") + @mock.patch("sans_core.algorithm_detail.mask_workspace.create_unmanaged_algorithm") def test_does_not_raise_if_found(self, _1, finder): finder.return_value = "some_path" mask_info, inst_info = mock.Mock(), mock.Mock() diff --git a/scripts/test/sans/algorithm_detail/merge_reductions_test.py b/scripts/test/sans/algorithm_detail/merge_reductions_test.py index 9cadb615d1f2..552edef39119 100644 --- a/scripts/test/sans/algorithm_detail/merge_reductions_test.py +++ b/scripts/test/sans/algorithm_detail/merge_reductions_test.py @@ -7,14 +7,14 @@ import unittest from unittest import mock -from sans.algorithm_detail.bundles import OutputPartsBundle, ReducedSlice -from sans.algorithm_detail.merge_reductions import MergeFactory, ISIS1DMerger -from sans.common.constants import EMPTY_NAME -from sans.common.enums import DataType, ReductionMode -from sans.common.enums import ReductionDimensionality, FitModeForMerge -from sans.common.general_functions import create_unmanaged_algorithm -from sans.state.StateObjects.StateReductionMode import StateReductionMode -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.bundles import OutputPartsBundle, ReducedSlice +from sans_core.algorithm_detail.merge_reductions import MergeFactory, ISIS1DMerger +from sans_core.common.constants import EMPTY_NAME +from sans_core.common.enums import DataType, ReductionMode +from sans_core.common.enums import ReductionDimensionality, FitModeForMerge +from sans_core.common.general_functions import create_unmanaged_algorithm +from sans_core.state.StateObjects.StateReductionMode import StateReductionMode +from sans_core.test_helper.test_director import TestDirector # Test merge reductions diff --git a/scripts/test/sans/algorithm_detail/move_sans_instrument_component_test.py b/scripts/test/sans/algorithm_detail/move_sans_instrument_component_test.py index 5b93df494101..7cb8f3799cda 100644 --- a/scripts/test/sans/algorithm_detail/move_sans_instrument_component_test.py +++ b/scripts/test/sans/algorithm_detail/move_sans_instrument_component_test.py @@ -11,14 +11,14 @@ from mantid.kernel import Quat, V3D from mantid.simpleapi import AddSampleLog, LoadEmptyInstrument -from sans.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes -from sans.algorithm_detail.move_workspaces import create_mover, SANSMoveLOQ, SANSMoveSANS2D, SANSMoveLARMORNewStyle, SANSMoveZOOM -from sans.common.enums import SANSFacility, DetectorType, SANSInstrument -from sans.state.AllStates import AllStates -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateMoveDetectors import get_move_builder -from sans.state.StateObjects.state_instrument_info import StateInstrumentInfo -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.algorithm_detail.move_sans_instrument_component import move_component, MoveTypes +from sans_core.algorithm_detail.move_workspaces import create_mover, SANSMoveLOQ, SANSMoveSANS2D, SANSMoveLARMORNewStyle, SANSMoveZOOM +from sans_core.common.enums import SANSFacility, DetectorType, SANSInstrument +from sans_core.state.AllStates import AllStates +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateMoveDetectors import get_move_builder +from sans_core.state.StateObjects.state_instrument_info import StateInstrumentInfo +from sans_core.test_helper.file_information_mock import SANSFileInformationMock def load_empty_instrument(instrument_name): diff --git a/scripts/test/sans/algorithm_detail/move_workspaces_test.py b/scripts/test/sans/algorithm_detail/move_workspaces_test.py index 453a6b1adb46..b7ca0491cdbb 100644 --- a/scripts/test/sans/algorithm_detail/move_workspaces_test.py +++ b/scripts/test/sans/algorithm_detail/move_workspaces_test.py @@ -7,13 +7,13 @@ import unittest import mantid.simpleapi -from sans.algorithm_detail.move_workspaces import SANSMoveZOOM, SANSMoveSANS2D -from sans.common.enums import SANSFacility, SANSInstrument, DetectorType -from sans.state.AllStates import AllStates -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateMoveDetectors import get_move_builder -from sans.state.StateObjects.state_instrument_info import StateInstrumentInfo -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.algorithm_detail.move_workspaces import SANSMoveZOOM, SANSMoveSANS2D +from sans_core.common.enums import SANSFacility, SANSInstrument, DetectorType +from sans_core.state.AllStates import AllStates +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateMoveDetectors import get_move_builder +from sans_core.state.StateObjects.state_instrument_info import StateInstrumentInfo +from sans_core.test_helper.file_information_mock import SANSFileInformationMock def get_coordinates(): diff --git a/scripts/test/sans/algorithm_detail/normalize_to_sans_monitor_test.py b/scripts/test/sans/algorithm_detail/normalize_to_sans_monitor_test.py index 189f2e1171be..8da888db26c0 100644 --- a/scripts/test/sans/algorithm_detail/normalize_to_sans_monitor_test.py +++ b/scripts/test/sans/algorithm_detail/normalize_to_sans_monitor_test.py @@ -8,9 +8,9 @@ from mantid.api import AnalysisDataService from mantid.simpleapi import CreateSampleWorkspace, Rebin -from sans.algorithm_detail.normalize_to_sans_monitor import normalize_to_monitor -from sans.state.StateObjects.StateNormalizeToMonitor import get_normalize_to_monitor_builder -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.normalize_to_sans_monitor import normalize_to_monitor +from sans_core.state.StateObjects.StateNormalizeToMonitor import get_normalize_to_monitor_builder +from sans_core.test_helper.test_director import TestDirector def get_expected_for_spectrum_1_case(monitor_workspace, selected_detector): diff --git a/scripts/test/sans/algorithm_detail/sans_slice_event_test.py b/scripts/test/sans/algorithm_detail/sans_slice_event_test.py index 236fd647be3b..35e113ff9d4b 100644 --- a/scripts/test/sans/algorithm_detail/sans_slice_event_test.py +++ b/scripts/test/sans/algorithm_detail/sans_slice_event_test.py @@ -9,9 +9,9 @@ from mantid.dataobjects import Workspace2D from mantid.kernel import DateAndTime from mantid.simpleapi import AddTimeSeriesLog, CreateSampleWorkspace -from sans.algorithm_detail.slice_sans_event import slice_sans_event -from sans.state.StateObjects.StateSliceEvent import get_slice_event_builder -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.slice_sans_event import slice_sans_event +from sans_core.state.StateObjects.StateSliceEvent import get_slice_event_builder +from sans_core.test_helper.test_director import TestDirector def provide_workspace_with_proton_charge(output_name, is_event=True): diff --git a/scripts/test/sans/algorithm_detail/scale_sans_workspace_test.py b/scripts/test/sans/algorithm_detail/scale_sans_workspace_test.py index 39bd05ee3a43..a0fcf0470d1b 100644 --- a/scripts/test/sans/algorithm_detail/scale_sans_workspace_test.py +++ b/scripts/test/sans/algorithm_detail/scale_sans_workspace_test.py @@ -8,12 +8,12 @@ import unittest from mantid.simpleapi import CreateSampleWorkspace -from sans.algorithm_detail.scale_sans_workspace import scale_workspace, _divide_by_sample_volume, _multiply_by_abs_scale -from sans.common.enums import SANSFacility, SampleShape, SANSInstrument -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateScale import get_scale_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock -from sans.test_helper.test_director import TestDirector +from sans_core.algorithm_detail.scale_sans_workspace import scale_workspace, _divide_by_sample_volume, _multiply_by_abs_scale +from sans_core.common.enums import SANSFacility, SampleShape, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateScale import get_scale_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.test_helper.test_director import TestDirector class SANSScaleTest(unittest.TestCase): diff --git a/scripts/test/sans/algorithm_detail/strip_end_nans_test.py b/scripts/test/sans/algorithm_detail/strip_end_nans_test.py index 1b9d64019b1c..e31d4fa4255b 100644 --- a/scripts/test/sans/algorithm_detail/strip_end_nans_test.py +++ b/scripts/test/sans/algorithm_detail/strip_end_nans_test.py @@ -7,7 +7,7 @@ import unittest from mantid.api import AlgorithmManager, FrameworkManager -from sans.algorithm_detail.strip_end_nans_and_infs import strip_end_nans +from sans_core.algorithm_detail.strip_end_nans_and_infs import strip_end_nans class StripEndNansTest(unittest.TestCase): diff --git a/scripts/test/sans/command_interface/batch_csv_file_parser_test.py b/scripts/test/sans/command_interface/batch_csv_file_parser_test.py index 0fbeddd658c4..b30607eb0092 100644 --- a/scripts/test/sans/command_interface/batch_csv_file_parser_test.py +++ b/scripts/test/sans/command_interface/batch_csv_file_parser_test.py @@ -9,9 +9,9 @@ import mantid from unittest import mock -from sans.command_interface.batch_csv_parser import BatchCsvParser -from sans.common.constants import ALL_PERIODS -from sans.common.RowEntries import RowEntries +from sans_core.command_interface.batch_csv_parser import BatchCsvParser +from sans_core.common.constants import ALL_PERIODS +from sans_core.common.RowEntries import RowEntries class BatchCsvParserTest(unittest.TestCase): diff --git a/scripts/test/sans/command_interface/command_interface_state_director_test.py b/scripts/test/sans/command_interface/command_interface_state_director_test.py index 4220dad250c8..649f1cc5ae9d 100644 --- a/scripts/test/sans/command_interface/command_interface_state_director_test.py +++ b/scripts/test/sans/command_interface/command_interface_state_director_test.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.command_interface.command_interface_state_director import ( +from sans_core.command_interface.command_interface_state_director import ( NParameterCommand, NParameterCommandId, CommandInterfaceStateDirector, @@ -14,7 +14,7 @@ DataCommandId, FitData, ) -from sans.common.enums import ( +from sans_core.common.enums import ( SANSFacility, RebinType, DetectorType, diff --git a/scripts/test/sans/command_interface/isis_command_interface_test.py b/scripts/test/sans/command_interface/isis_command_interface_test.py index 9c17cf06505b..ce85c00f01a6 100644 --- a/scripts/test/sans/command_interface/isis_command_interface_test.py +++ b/scripts/test/sans/command_interface/isis_command_interface_test.py @@ -10,7 +10,7 @@ import uuid from unittest import mock -from sans.command_interface.ISISCommandInterface import MaskFile +from sans_core.command_interface.ISISCommandInterface import MaskFile class ISISCommandInterfaceTest(unittest.TestCase): @@ -47,7 +47,7 @@ def test_mask_file_for_existing_file(self): tmp_file = tempfile.NamedTemporaryFile(mode="r") file_name = os.path.basename(tmp_file.name) - with mock.patch("sans.command_interface.ISISCommandInterface.find_full_file_path") as mocked_finder: + with mock.patch("sans_core.command_interface.ISISCommandInterface.find_full_file_path") as mocked_finder: mocked_finder.return_value = tmp_file.name self.assertIsNone(MaskFile(file_name)) diff --git a/scripts/test/sans/common/file_information_test.py b/scripts/test/sans/common/file_information_test.py index 56dee38c3c7a..cfe0513a6c43 100644 --- a/scripts/test/sans/common/file_information_test.py +++ b/scripts/test/sans/common/file_information_test.py @@ -8,8 +8,8 @@ from mantid.kernel import DateAndTime from unittest import mock -from sans.common.enums import SampleShape -from sans.common.file_information import ( +from sans_core.common.enums import SampleShape +from sans_core.common.file_information import ( SANSFileInformationFactory, FileType, SANSInstrument, @@ -17,7 +17,7 @@ SANSFileInformationISISAdded, SANSFileInformationISISNexus, ) -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.test_helper.file_information_mock import SANSFileInformationMock class SANSFileInformationTest(unittest.TestCase): diff --git a/scripts/test/sans/common/general_functions_test.py b/scripts/test/sans/common/general_functions_test.py index d7bee01741e0..6f5709b6ce1f 100644 --- a/scripts/test/sans/common/general_functions_test.py +++ b/scripts/test/sans/common/general_functions_test.py @@ -9,8 +9,8 @@ from mantid.api import AnalysisDataService, FrameworkManager from mantid.kernel import V3D, Quat from unittest import mock -from sans.common.constants import SANS2D, LOQ, LARMOR -from sans.common.enums import ( +from sans_core.common.constants import SANS2D, LOQ, LARMOR +from sans_core.common.enums import ( ReductionMode, ReductionDimensionality, OutputParts, @@ -20,7 +20,7 @@ SANSFacility, DataType, ) -from sans.common.general_functions import ( +from sans_core.common.general_functions import ( quaternion_to_angle_and_axis, create_managed_non_child_algorithm, create_unmanaged_algorithm, @@ -40,8 +40,8 @@ wav_range_to_str, wav_ranges_to_str, ) -from sans.state.StateObjects.StateData import StateData -from sans.test_helper.test_director import TestDirector +from sans_core.state.StateObjects.StateData import StateData +from sans_core.test_helper.test_director import TestDirector class SANSFunctionsTest(unittest.TestCase): @@ -585,7 +585,7 @@ def test_returned_name_for_all_multi_reduction_without_user_specified_name_corre self.assertEqual(output_name, "12345_rear_1D_12.0_34.0Phi12.0_56.0_t4.57_T12.37") self.assertEqual(group_output_name, "12345_rear_1DPhi12.0_56.0") - @mock.patch("sans.common.general_functions.AlgorithmManager") + @mock.patch("sans_core.common.general_functions.AlgorithmManager") def test_that_can_create_versioned_managed_non_child_algorithms(self, alg_manager_mock): create_managed_non_child_algorithm("TestAlg", version=2, **{"test_val": 5}) alg_manager_mock.create.assert_called_once_with("TestAlg", 2) diff --git a/scripts/test/sans/common/log_tagger_test.py b/scripts/test/sans/common/log_tagger_test.py index 074847145754..2a43ea8aaf8f 100644 --- a/scripts/test/sans/common/log_tagger_test.py +++ b/scripts/test/sans/common/log_tagger_test.py @@ -7,7 +7,7 @@ import unittest from mantid.api import AlgorithmManager, FrameworkManager -from sans.common.log_tagger import has_tag, set_tag, get_tag, has_hash, set_hash, get_hash_value +from sans_core.common.log_tagger import has_tag, set_tag, get_tag, has_hash, set_hash, get_hash_value class SANSLogTaggerTest(unittest.TestCase): diff --git a/scripts/test/sans/common/test_enums.py b/scripts/test/sans/common/test_enums.py index b1f4f30fb824..f1004c91158c 100644 --- a/scripts/test/sans/common/test_enums.py +++ b/scripts/test/sans/common/test_enums.py @@ -6,7 +6,7 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import ReductionMode +from sans_core.common.enums import ReductionMode class TestSANSEnums(unittest.TestCase): diff --git a/scripts/test/sans/common/xml_parsing_test.py b/scripts/test/sans/common/xml_parsing_test.py index 3974d4836664..ebd4565ad81b 100644 --- a/scripts/test/sans/common/xml_parsing_test.py +++ b/scripts/test/sans/common/xml_parsing_test.py @@ -7,8 +7,8 @@ import unittest from mantid.kernel import DateAndTime -from sans.common.file_information import SANSFileInformationFactory, get_instrument_paths_for_sans_file -from sans.common.xml_parsing import ( +from sans_core.common.file_information import SANSFileInformationFactory, get_instrument_paths_for_sans_file +from sans_core.common.xml_parsing import ( get_named_elements_from_ipf_file, get_monitor_names_from_idf_file, get_valid_to_time_from_idf_string, diff --git a/scripts/test/sans/state/JsonSerializerTest.py b/scripts/test/sans/state/JsonSerializerTest.py index e61f3e73a9de..4898d63c9111 100644 --- a/scripts/test/sans/state/JsonSerializerTest.py +++ b/scripts/test/sans/state/JsonSerializerTest.py @@ -15,8 +15,8 @@ # Test the typed parameters # ---------------------------------------------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------------------------------------------- -from sans.state.JsonSerializable import JsonSerializable, json_serializable -from sans.state.Serializer import Serializer +from sans_core.state.JsonSerializable import JsonSerializable, json_serializable +from sans_core.state.Serializer import Serializer class TestClass(metaclass=JsonSerializable): diff --git a/scripts/test/sans/state/adjustment_test.py b/scripts/test/sans/state/adjustment_test.py index 8b8789161991..4460b939da56 100644 --- a/scripts/test/sans/state/adjustment_test.py +++ b/scripts/test/sans/state/adjustment_test.py @@ -6,13 +6,13 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSFacility, SANSInstrument -from sans.state.StateObjects.StateAdjustment import StateAdjustment, get_adjustment_builder -from sans.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.common.enums import SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateAdjustment import StateAdjustment, get_adjustment_builder +from sans_core.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/background_subtraction_test.py b/scripts/test/sans/state/background_subtraction_test.py index bc1bf0b62ea6..ff87fa0967ff 100644 --- a/scripts/test/sans/state/background_subtraction_test.py +++ b/scripts/test/sans/state/background_subtraction_test.py @@ -6,10 +6,10 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSFacility -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateBackgroundSubtraction import StateBackgroundSubtraction, get_background_subtraction_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.common.enums import SANSFacility +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateBackgroundSubtraction import StateBackgroundSubtraction, get_background_subtraction_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/calculate_transmission_test.py b/scripts/test/sans/state/calculate_transmission_test.py index 882c1c294665..60146a749466 100644 --- a/scripts/test/sans/state/calculate_transmission_test.py +++ b/scripts/test/sans/state/calculate_transmission_test.py @@ -6,14 +6,14 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import RebinType, RangeStepType, FitType, DataType, SANSFacility, SANSInstrument -from sans.state.StateObjects.StateCalculateTransmission import ( +from sans_core.common.enums import RebinType, RangeStepType, FitType, DataType, SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateCalculateTransmission import ( StateCalculateTransmission, StateCalculateTransmissionLOQ, get_calculate_transmission, ) -from sans.state.StateObjects.StateData import get_data_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/convert_to_q_test.py b/scripts/test/sans/state/convert_to_q_test.py index 524d3b93ff84..f92af0f1344e 100644 --- a/scripts/test/sans/state/convert_to_q_test.py +++ b/scripts/test/sans/state/convert_to_q_test.py @@ -6,10 +6,10 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import RangeStepType, ReductionDimensionality, SANSFacility, SANSInstrument -from sans.state.StateObjects.StateConvertToQ import StateConvertToQ, get_convert_to_q_builder -from sans.state.StateObjects.StateData import get_data_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.common.enums import RangeStepType, ReductionDimensionality, SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateConvertToQ import StateConvertToQ, get_convert_to_q_builder +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/data_test.py b/scripts/test/sans/state/data_test.py index 7479760d0927..e4e688b03d16 100644 --- a/scripts/test/sans/state/data_test.py +++ b/scripts/test/sans/state/data_test.py @@ -6,9 +6,9 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSFacility, SANSInstrument -from sans.state.StateObjects.StateData import StateData, get_data_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.common.enums import SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateData import StateData, get_data_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/mask_test.py b/scripts/test/sans/state/mask_test.py index 6f748f23a91a..aa4236732af8 100644 --- a/scripts/test/sans/state/mask_test.py +++ b/scripts/test/sans/state/mask_test.py @@ -6,10 +6,10 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSFacility, DetectorType -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateMaskDetectors import StateMaskSANS2D, get_mask_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.common.enums import SANSFacility, DetectorType +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateMaskDetectors import StateMaskSANS2D, get_mask_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- # State diff --git a/scripts/test/sans/state/move_test.py b/scripts/test/sans/state/move_test.py index 52ed9f686fd6..abbac506e7c5 100644 --- a/scripts/test/sans/state/move_test.py +++ b/scripts/test/sans/state/move_test.py @@ -7,9 +7,9 @@ import unittest from unittest import mock -from sans.common.enums import CanonicalCoordinates, SANSFacility, DetectorType, SANSInstrument -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateMoveDetectors import ( +from sans_core.common.enums import CanonicalCoordinates, SANSFacility, DetectorType, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateMoveDetectors import ( StateMoveLOQ, StateMoveSANS2D, StateMoveLARMOR, @@ -18,7 +18,7 @@ StateMoveDetectors, get_move_builder, ) -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/normalize_to_monitor_test.py b/scripts/test/sans/state/normalize_to_monitor_test.py index ba9d3655adf3..20cc5066dbdf 100644 --- a/scripts/test/sans/state/normalize_to_monitor_test.py +++ b/scripts/test/sans/state/normalize_to_monitor_test.py @@ -6,14 +6,14 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import RebinType, RangeStepType, SANSFacility, SANSInstrument -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateNormalizeToMonitor import ( +from sans_core.common.enums import RebinType, RangeStepType, SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateNormalizeToMonitor import ( StateNormalizeToMonitor, StateNormalizeToMonitorLOQ, get_normalize_to_monitor_builder, ) -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/reduction_mode_test.py b/scripts/test/sans/state/reduction_mode_test.py index 1b1cb50dea3b..1f055cb22c4c 100644 --- a/scripts/test/sans/state/reduction_mode_test.py +++ b/scripts/test/sans/state/reduction_mode_test.py @@ -6,8 +6,8 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import ReductionMode, ReductionDimensionality, FitModeForMerge -from sans.state.StateObjects.StateReductionMode import StateReductionMode +from sans_core.common.enums import ReductionMode, ReductionDimensionality, FitModeForMerge +from sans_core.state.StateObjects.StateReductionMode import StateReductionMode # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/save_test.py b/scripts/test/sans/state/save_test.py index 8fb6b84741df..8c9d29b012fa 100644 --- a/scripts/test/sans/state/save_test.py +++ b/scripts/test/sans/state/save_test.py @@ -6,10 +6,10 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSFacility, SaveType, SANSInstrument -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateSave import get_save_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.common.enums import SANSFacility, SaveType, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateSave import get_save_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/scale_test.py b/scripts/test/sans/state/scale_test.py index d917fdff8fb0..de04d92d64cb 100644 --- a/scripts/test/sans/state/scale_test.py +++ b/scripts/test/sans/state/scale_test.py @@ -6,10 +6,10 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSFacility, SampleShape -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateScale import get_scale_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.common.enums import SANSFacility, SampleShape +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateScale import get_scale_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/slice_event_test.py b/scripts/test/sans/state/slice_event_test.py index c72c23038da6..cefa12bf208b 100644 --- a/scripts/test/sans/state/slice_event_test.py +++ b/scripts/test/sans/state/slice_event_test.py @@ -6,10 +6,10 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSFacility, SANSInstrument -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateSliceEvent import StateSliceEvent, get_slice_event_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.common.enums import SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateSliceEvent import StateSliceEvent, get_slice_event_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/state_functions_test.py b/scripts/test/sans/state/state_functions_test.py index 9cd99c5ab4a4..3997730813fc 100644 --- a/scripts/test/sans/state/state_functions_test.py +++ b/scripts/test/sans/state/state_functions_test.py @@ -6,15 +6,15 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import ReductionDimensionality -from sans.state.StateObjects.StateData import StateData -from sans.state.state_functions import ( +from sans_core.common.enums import ReductionDimensionality +from sans_core.state.StateObjects.StateData import StateData +from sans_core.state.state_functions import ( is_pure_none_or_not_none, one_is_none, validation_message, is_not_none_and_first_larger_than_second, ) -from sans.test_helper.test_director import TestDirector +from sans_core.test_helper.test_director import TestDirector class StateFunctionsTest(unittest.TestCase): diff --git a/scripts/test/sans/state/state_instrument_info_test.py b/scripts/test/sans/state/state_instrument_info_test.py index ff8f1370c2ec..600aa9621da4 100644 --- a/scripts/test/sans/state/state_instrument_info_test.py +++ b/scripts/test/sans/state/state_instrument_info_test.py @@ -7,9 +7,9 @@ import unittest from unittest import mock -from sans.common.enums import SANSInstrument, DetectorType -from sans.state.StateObjects import state_instrument_info -from sans.state.StateObjects.state_instrument_info import StateInstrumentInfo +from sans_core.common.enums import SANSInstrument, DetectorType +from sans_core.state.StateObjects import state_instrument_info +from sans_core.state.StateObjects.state_instrument_info import StateInstrumentInfo class StateInstrumentInfoTest(unittest.TestCase): diff --git a/scripts/test/sans/state/state_test.py b/scripts/test/sans/state/state_test.py index ef331df72970..6e78b022eb25 100644 --- a/scripts/test/sans/state/state_test.py +++ b/scripts/test/sans/state/state_test.py @@ -6,21 +6,21 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSInstrument, SANSFacility -from sans.state.StateObjects.StateAdjustment import StateAdjustment -from sans.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission -from sans.state.StateObjects.StateConvertToQ import StateConvertToQ -from sans.state.StateObjects.StateData import StateData -from sans.state.StateObjects.StateMaskDetectors import StateMask -from sans.state.StateObjects.StateMoveDetectors import StateMove -from sans.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor -from sans.state.StateObjects.StateReductionMode import StateReductionMode -from sans.state.StateObjects.StateSave import StateSave -from sans.state.StateObjects.StateScale import StateScale -from sans.state.StateObjects.StateSliceEvent import StateSliceEvent -from sans.state.AllStates import AllStates -from sans.state.StateObjects.StateWavelength import StateWavelength -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment +from sans_core.common.enums import SANSInstrument, SANSFacility +from sans_core.state.StateObjects.StateAdjustment import StateAdjustment +from sans_core.state.StateObjects.StateCalculateTransmission import StateCalculateTransmission +from sans_core.state.StateObjects.StateConvertToQ import StateConvertToQ +from sans_core.state.StateObjects.StateData import StateData +from sans_core.state.StateObjects.StateMaskDetectors import StateMask +from sans_core.state.StateObjects.StateMoveDetectors import StateMove +from sans_core.state.StateObjects.StateNormalizeToMonitor import StateNormalizeToMonitor +from sans_core.state.StateObjects.StateReductionMode import StateReductionMode +from sans_core.state.StateObjects.StateSave import StateSave +from sans_core.state.StateObjects.StateScale import StateScale +from sans_core.state.StateObjects.StateSliceEvent import StateSliceEvent +from sans_core.state.AllStates import AllStates +from sans_core.state.StateObjects.StateWavelength import StateWavelength +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import StateWavelengthAndPixelAdjustment # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/wavelength_and_pixel_adjustment_test.py b/scripts/test/sans/state/wavelength_and_pixel_adjustment_test.py index 9b0b8831372c..33905dbba852 100644 --- a/scripts/test/sans/state/wavelength_and_pixel_adjustment_test.py +++ b/scripts/test/sans/state/wavelength_and_pixel_adjustment_test.py @@ -6,13 +6,13 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import RangeStepType, DetectorType, SANSFacility, SANSInstrument -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateWavelengthAndPixelAdjustment import ( +from sans_core.common.enums import RangeStepType, DetectorType, SANSFacility, SANSInstrument +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateWavelengthAndPixelAdjustment import ( StateWavelengthAndPixelAdjustment, get_wavelength_and_pixel_adjustment_builder, ) -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/state/wavelength_test.py b/scripts/test/sans/state/wavelength_test.py index 2e72ae1f8987..fe0929451304 100644 --- a/scripts/test/sans/state/wavelength_test.py +++ b/scripts/test/sans/state/wavelength_test.py @@ -6,10 +6,10 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import SANSFacility, SANSInstrument, RangeStepType -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateWavelength import StateWavelength, get_wavelength_builder -from sans.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.common.enums import SANSFacility, SANSInstrument, RangeStepType +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateWavelength import StateWavelength, get_wavelength_builder +from sans_core.test_helper.file_information_mock import SANSFileInformationMock # ---------------------------------------------------------------------------------------------------------------------- diff --git a/scripts/test/sans/user_file/toml_parsers/parser_helpers/toml_parser_impl_base_test.py b/scripts/test/sans/user_file/toml_parsers/parser_helpers/toml_parser_impl_base_test.py index 9d74b5cbf242..00d1c00d2fb3 100644 --- a/scripts/test/sans/user_file/toml_parsers/parser_helpers/toml_parser_impl_base_test.py +++ b/scripts/test/sans/user_file/toml_parsers/parser_helpers/toml_parser_impl_base_test.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from sans.user_file.parser_helpers.toml_parser_impl_base import TomlParserImplBase, MissingMandatoryParam +from sans_core.user_file.parser_helpers.toml_parser_impl_base import TomlParserImplBase, MissingMandatoryParam class TomlParserImplBaseTest(unittest.TestCase): diff --git a/scripts/test/sans/user_file/toml_parsers/parser_helpers/wavelength_parser_test.py b/scripts/test/sans/user_file/toml_parsers/parser_helpers/wavelength_parser_test.py index cd2e605d705e..6df57928049d 100644 --- a/scripts/test/sans/user_file/toml_parsers/parser_helpers/wavelength_parser_test.py +++ b/scripts/test/sans/user_file/toml_parsers/parser_helpers/wavelength_parser_test.py @@ -7,8 +7,8 @@ import unittest from unittest import mock -from sans.common.enums import RangeStepType -from sans.user_file.parser_helpers.wavelength_parser import parse_range_wavelength, DuplicateWavelengthStates, WavelengthTomlParser +from sans_core.common.enums import RangeStepType +from sans_core.user_file.parser_helpers.wavelength_parser import parse_range_wavelength, DuplicateWavelengthStates, WavelengthTomlParser class WavelengthParserTest(unittest.TestCase): diff --git a/scripts/test/sans/user_file/toml_parsers/toml_parser_test.py b/scripts/test/sans/user_file/toml_parsers/toml_parser_test.py index 2f80f221dcd0..7681c4c39285 100644 --- a/scripts/test/sans/user_file/toml_parsers/toml_parser_test.py +++ b/scripts/test/sans/user_file/toml_parsers/toml_parser_test.py @@ -7,8 +7,8 @@ import unittest from unittest import mock -from sans.user_file.toml_parsers.toml_parser import TomlParser -from sans.user_file.toml_parsers.toml_reader import TomlReader +from sans_core.user_file.toml_parsers.toml_parser import TomlParser +from sans_core.user_file.toml_parsers.toml_reader import TomlReader class TomlParserTest(unittest.TestCase): @@ -22,7 +22,7 @@ def test_returns_v1_parser(self): parser = TomlParser(toml_reader=self.get_mocked_reader(test_dict)) mocked_file_info = mock.NonCallableMock() - with mock.patch("sans.user_file.toml_parsers.toml_parser.TomlV1Parser") as mocked_import: + with mock.patch("sans_core.user_file.toml_parsers.toml_parser.TomlV1Parser") as mocked_import: parser_version = parser.get_toml_parser(toml_file_path=mock.NonCallableMock, file_information=mocked_file_info) self.assertEqual(mocked_import.return_value, parser_version) # Check correct params were forwarded on @@ -43,7 +43,7 @@ def test_parse_toml_file_calls_get_all_states(self): test_dict = {"toml_file_version": 1} parser = TomlParser(toml_reader=self.get_mocked_reader(test_dict)) - with mock.patch("sans.user_file.toml_parsers.toml_parser.TomlV1Parser") as mocked_parser: + with mock.patch("sans_core.user_file.toml_parsers.toml_parser.TomlV1Parser") as mocked_parser: parsed = parser.parse_toml_file(mock.NonCallableMock, file_information=None) mocked_parser.return_value.get_all_states.assert_called_once() self.assertEqual(mocked_parser.return_value.get_all_states.return_value, parsed) diff --git a/scripts/test/sans/user_file/toml_parsers/toml_v1_parser_test.py b/scripts/test/sans/user_file/toml_parsers/toml_v1_parser_test.py index 08505bb59c81..b2a099fb9e46 100644 --- a/scripts/test/sans/user_file/toml_parsers/toml_v1_parser_test.py +++ b/scripts/test/sans/user_file/toml_parsers/toml_v1_parser_test.py @@ -8,7 +8,7 @@ from typing import List, Dict from unittest import mock -from sans.common.enums import ( +from sans_core.common.enums import ( SANSInstrument, SANSFacility, DetectorType, @@ -19,11 +19,11 @@ FitType, RebinType, ) -from sans.state.StateObjects.StateData import get_data_builder -from sans.state.StateObjects.StateMaskDetectors import StateMaskDetectors, StateMask -from sans.test_helper.file_information_mock import SANSFileInformationMock -from sans.user_file.parser_helpers.toml_parser_impl_base import MissingMandatoryParam -from sans.user_file.toml_parsers.toml_v1_parser import TomlV1Parser +from sans_core.state.StateObjects.StateData import get_data_builder +from sans_core.state.StateObjects.StateMaskDetectors import StateMaskDetectors, StateMask +from sans_core.test_helper.file_information_mock import SANSFileInformationMock +from sans_core.user_file.parser_helpers.toml_parser_impl_base import MissingMandatoryParam +from sans_core.user_file.toml_parsers.toml_v1_parser import TomlV1Parser class TomlV1ParserTest(unittest.TestCase): @@ -65,7 +65,7 @@ def test_validate_is_called_on_init(self): schema_validator = mock.Mock() # No implementation needed - with mock.patch("sans.user_file.toml_parsers.toml_v1_parser.TomlV1Parser._get_impl"): + with mock.patch("sans_core.user_file.toml_parsers.toml_v1_parser.TomlV1Parser._get_impl"): TomlV1Parser(dict_to_parse=None, schema_validator=schema_validator, file_information=None) self.assertTrue(schema_validator.validate.called) diff --git a/scripts/test/sans/user_file/toml_parsers/toml_v1_schema_test.py b/scripts/test/sans/user_file/toml_parsers/toml_v1_schema_test.py index f98b3b50c710..c84896a80200 100644 --- a/scripts/test/sans/user_file/toml_parsers/toml_v1_schema_test.py +++ b/scripts/test/sans/user_file/toml_parsers/toml_v1_schema_test.py @@ -7,7 +7,7 @@ import unittest from unittest import mock -from sans.user_file.toml_parsers.toml_v1_schema import TomlSchemaV1Validator, TomlValidationError +from sans_core.user_file.toml_parsers.toml_v1_schema import TomlSchemaV1Validator, TomlValidationError class SchemaV1ValidatorTest(unittest.TestCase): diff --git a/scripts/test/sans/user_file/txt_parsers/ParsedDictConverterTest.py b/scripts/test/sans/user_file/txt_parsers/ParsedDictConverterTest.py index 9a7cc2e6a59b..b594aa8d2ae2 100644 --- a/scripts/test/sans/user_file/txt_parsers/ParsedDictConverterTest.py +++ b/scripts/test/sans/user_file/txt_parsers/ParsedDictConverterTest.py @@ -8,13 +8,13 @@ import unittest from unittest import mock -from sans.common.configurations import Configurations -from sans.common.enums import DetectorType, SANSInstrument, ReductionMode, RangeStepType, RebinType, DataType, FitType -from sans.state.StateObjects.StateMoveDetectors import StateMoveZOOM -from sans.test_helper.user_file_test_helper import create_user_file, sample_user_file -from sans.user_file.settings_tags import DetectorId, TransId -from sans.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter -from sans.user_file.user_file_reader import UserFileReader +from sans_core.common.configurations import Configurations +from sans_core.common.enums import DetectorType, SANSInstrument, ReductionMode, RangeStepType, RebinType, DataType, FitType +from sans_core.state.StateObjects.StateMoveDetectors import StateMoveZOOM +from sans_core.test_helper.user_file_test_helper import create_user_file, sample_user_file +from sans_core.user_file.settings_tags import DetectorId, TransId +from sans_core.user_file.txt_parsers.UserFileReaderAdapter import UserFileReaderAdapter +from sans_core.user_file.user_file_reader import UserFileReader class ParsedDictConverterTest(unittest.TestCase): diff --git a/scripts/test/sans/user_file/user_file_parser_test.py b/scripts/test/sans/user_file/user_file_parser_test.py index 9c33874b84c6..b3ff8cb1760b 100644 --- a/scripts/test/sans/user_file/user_file_parser_test.py +++ b/scripts/test/sans/user_file/user_file_parser_test.py @@ -6,8 +6,8 @@ # SPDX - License - Identifier: GPL - 3.0 + import unittest -from sans.common.enums import ReductionMode, DetectorType, RangeStepType, FitType, DataType, SANSInstrument -from sans.user_file.settings_tags import ( +from sans_core.common.enums import ReductionMode, DetectorType, RangeStepType, FitType, DataType, SANSInstrument +from sans_core.user_file.settings_tags import ( DetectorId, BackId, range_entry, @@ -40,7 +40,7 @@ det_fit_range, q_rebin_values, ) -from sans.user_file.user_file_parser import ( +from sans_core.user_file.user_file_parser import ( InstrParser, DetParser, LimitParser, diff --git a/scripts/test/sans/user_file/user_file_reader_test.py b/scripts/test/sans/user_file/user_file_reader_test.py index 0edc6518bfbd..f67e82289410 100644 --- a/scripts/test/sans/user_file/user_file_reader_test.py +++ b/scripts/test/sans/user_file/user_file_reader_test.py @@ -7,9 +7,9 @@ import os import unittest -from sans.common.enums import ReductionMode, DetectorType, RangeStepType, FitType -from sans.test_helper.user_file_test_helper import create_user_file, sample_user_file -from sans.user_file.settings_tags import ( +from sans_core.common.enums import ReductionMode, DetectorType, RangeStepType, FitType +from sans_core.test_helper.user_file_test_helper import create_user_file, sample_user_file +from sans_core.user_file.settings_tags import ( DetectorId, BackId, range_entry, @@ -36,7 +36,7 @@ PrintId, q_rebin_values, ) -from sans.user_file.user_file_reader import UserFileReader +from sans_core.user_file.user_file_reader import UserFileReader # -----------------------------------------------------------------