diff --git a/Framework/PythonInterface/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h b/Framework/PythonInterface/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h index dc429e1a15fae9d8476cc47d8cde72da03288f75..aff1c6a9507ca2431c3838f5558181fc7933a5b9 100644 --- a/Framework/PythonInterface/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h +++ b/Framework/PythonInterface/inc/MantidPythonInterface/api/WorkspacePropertyExporter.h @@ -134,10 +134,10 @@ template <typename WorkspaceType> struct WorkspacePropertyExporter { API::PropertyMode::Type, API::LockMode::Type>( args("name", "defaultValue", "direction", "optional", "locking"))) // These variants require the validator object to be cloned - .def("__init__", - make_constructor( - &createPropertyWithValidator, default_call_policies(), - (arg("name"), arg("defaultValue"), arg("direction"), arg("validator")))) + .def("__init__", make_constructor(&createPropertyWithValidator, + default_call_policies(), + (arg("name"), arg("defaultValue"), + arg("direction"), arg("validator")))) .def("__init__", make_constructor(&createPropertyWithOptionalFlag, default_call_policies(), @@ -148,8 +148,7 @@ template <typename WorkspaceType> struct WorkspacePropertyExporter { default_call_policies(), args("name", "defaultValue", "direction", "optional", "locking", "validator"))) - .def("isOptional", &TypedWorkspaceProperty::isOptional, - arg("self"), + .def("isOptional", &TypedWorkspaceProperty::isOptional, arg("self"), "Returns true if the property has been marked as optional") .add_property("value", &value); diff --git a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/DataServiceExporter.h b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/DataServiceExporter.h index 83663e18f0cc56e89c25a09e6ee3b314a0174e46..90679c67007c4a433a9654ac8c4b214633f45354 100644 --- a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/DataServiceExporter.h +++ b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/DataServiceExporter.h @@ -73,37 +73,30 @@ template <typename SvcType, typename SvcPtrType> struct DataServiceExporter { (arg("self"), arg("name"), arg("item")), "Adds the given object to the service with the given name. " "The the name exists the object is replaced.") - .def("doesExist", &SvcType::doesExist, - (arg("self"), arg("name")), + .def("doesExist", &SvcType::doesExist, (arg("self"), arg("name")), "Returns True if the object is found in the service.") .def("retrieve", &DataServiceExporter::retrieveOrKeyError, (arg("self"), arg("name")), "Retrieve the named object. Raises an exception if the name " "does not exist") - .def("remove", &SvcType::remove, - (arg("self"), arg("name")), + .def("remove", &SvcType::remove, (arg("self"), arg("name")), "Remove a named object") - .def("clear", &SvcType::clear, - arg("self"), + .def("clear", &SvcType::clear, arg("self"), "Removes all objects managed by the service.") - .def("size", &SvcType::size, - arg("self"), + .def("size", &SvcType::size, arg("self"), "Returns the number of objects within the service") .def("getObjectNames", &DataServiceExporter::getObjectNamesAsList, arg("self"), "Return the list of names currently known to the ADS") // Make it act like a dictionary - .def("__len__", &SvcType::size, - arg("self")) + .def("__len__", &SvcType::size, arg("self")) .def("__getitem__", &DataServiceExporter::retrieveOrKeyError, (arg("self"), arg("name"))) .def("__setitem__", &DataServiceExporter::addOrReplaceItem, (arg("self"), arg("name"), arg("item"))) - .def("__contains__", &SvcType::doesExist, - arg("self")) - .def("__delitem__", &SvcType::remove, - (arg("self"), arg("name"))); + .def("__contains__", &SvcType::doesExist, arg("self")) + .def("__delitem__", &SvcType::remove, (arg("self"), arg("name"))); return classType; } diff --git a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/TypedValidatorExporter.h b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/TypedValidatorExporter.h index 95e603d531931f65178711fa946c17e3c00a2e2b..aed38b70fe762cec3f5f3df0fa9c7fc1038125f5 100644 --- a/Framework/PythonInterface/inc/MantidPythonInterface/kernel/TypedValidatorExporter.h +++ b/Framework/PythonInterface/inc/MantidPythonInterface/kernel/TypedValidatorExporter.h @@ -39,8 +39,7 @@ template <typename Type> struct TypedValidatorExporter { class_<TypedValidator<Type>, bases<IValidator>, boost::noncopyable>( pythonClassName, no_init) - .def("isValid", &IValidator::isValid<Type>, - (arg("self"), arg("value")), + .def("isValid", &IValidator::isValid<Type>, (arg("self"), arg("value")), "Returns an empty string if the value is considered valid, " "otherwise a string defining the error is returned."); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp index 28a2bd3235f1f136e9517afdc068b23e0ae9cb9e..33ccab704e1fd89ce72166a2c9a69b0573ff59f2 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Algorithm.cpp @@ -78,8 +78,9 @@ void export_leaf_classes() { "Initialize the algorithm from a string representation") .staticmethod("fromString") .def("createChildAlgorithm", &Algorithm::createChildAlgorithm, - (arg("self"), arg("name"), arg("startProgress") = -1.0, arg("endProgress") = -1.0, - arg("enableLogging") = true, arg("version") = -1), + (arg("self"), arg("name"), arg("startProgress") = -1.0, + arg("endProgress") = -1.0, arg("enableLogging") = true, + arg("version") = -1), "Creates and intializes a named child algorithm. Output workspaces " "are given a dummy name.") .def("declareProperty", diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp index 4aa463269f8aff38ce2c78ecaba7cb77778e507b..1e6b97507c9fe4f50f9668a74344137990745406 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmFactory.cpp @@ -124,10 +124,9 @@ void export_AlgorithmFactory() { (arg("self"), arg("algorithm_name")), "Returns the highest version of the named algorithm. Throws " "ValueError if no algorithm can be found") - .def("subscribe", &subscribe, - (arg("self"), arg("object")), + .def("subscribe", &subscribe, (arg("self"), arg("object")), "Register a Python class derived from " - "PythonAlgorithm into the factory") + "PythonAlgorithm into the factory") .def("Instance", &AlgorithmFactory::Instance, return_value_policy<reference_existing_object>(), diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmHistory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmHistory.cpp index e0778ad2d267ec8877131f3ed6df8daae9146442..05a5f7045434a46b2bbd1ba14e0f7e9a2b35ec6a 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmHistory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmHistory.cpp @@ -58,31 +58,25 @@ void export_AlgorithmHistory() { register_ptr_to_python<Mantid::API::AlgorithmHistory_sptr>(); class_<AlgorithmHistory>("AlgorithmHistory", no_init) - .def("name", &AlgorithmHistory::name, - arg("self"), + .def("name", &AlgorithmHistory::name, arg("self"), return_value_policy<copy_const_reference>(), "Returns the name of the algorithm.") - .def("version", &AlgorithmHistory::version, - arg("self"), + .def("version", &AlgorithmHistory::version, arg("self"), return_value_policy<copy_const_reference>(), "Returns the version of the algorithm.") .def("executionDuration", &AlgorithmHistory::executionDuration, - arg("self"), - "Returns the execution duration of the algorithm.") + arg("self"), "Returns the execution duration of the algorithm.") - .def("executionDate", &AlgorithmHistory::executionDate, - arg("self"), + .def("executionDate", &AlgorithmHistory::executionDate, arg("self"), "Returns the execution date of the algorithm.") - .def("execCount", &AlgorithmHistory::execCount, - arg("self"), + .def("execCount", &AlgorithmHistory::execCount, arg("self"), return_value_policy<copy_const_reference>(), "Returns the execution number of the algorithm.") - .def("childHistorySize", &AlgorithmHistory::childHistorySize, - arg("self"), + .def("childHistorySize", &AlgorithmHistory::childHistorySize, arg("self"), "Returns the number of the child algorithms.") .def("getChildAlgorithmHistory", @@ -90,14 +84,12 @@ void export_AlgorithmHistory() { (arg("self"), arg("index")), "Returns the child algorithm at the given index in the history") - .def("getChildHistories", &getChildrenAsList, - arg("self"), + .def("getChildHistories", &getChildrenAsList, arg("self"), "Returns a list of child " "algorithm histories for " "this algorithm history.") - .def("getProperties", &getPropertiesAsList, - arg("self"), + .def("getProperties", &getPropertiesAsList, arg("self"), "Returns properties for this algorithm history.") .def("getChildAlgorithm", &AlgorithmHistory::getChildAlgorithm, diff --git a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp index d31a131fe26a2cbae3b5abac8bac3de539c80cba..17e52e83fc062eb2251a949012cdede39e5e106e 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/AlgorithmManager.cpp @@ -78,17 +78,14 @@ void export_AlgorithmManager() { .def("createUnmanaged", &AlgorithmManagerImpl::createUnmanaged, createUnmanaged_overloads((arg("name"), arg("version")), "Creates an unmanaged algorithm.")) - .def("size", &AlgorithmManagerImpl::size, - arg("self"), + .def("size", &AlgorithmManagerImpl::size, arg("self"), "Returns the number of managed algorithms") .def("setMaxAlgorithms", &AlgorithmManagerImpl::setMaxAlgorithms, (arg("self"), arg("n")), "Set the maximum number of allowed managed algorithms") - .def("getAlgorithm", &getAlgorithm, - (arg("self"), arg("id_holder")), + .def("getAlgorithm", &getAlgorithm, (arg("self"), arg("id_holder")), "Return the algorithm instance identified by the given id.") - .def("removeById", &removeById, - (arg("self"), arg("id_holder")), + .def("removeById", &removeById, (arg("self"), arg("id_holder")), "Remove an algorithm from the managed list") .def("newestInstanceOf", &AlgorithmManagerImpl::newestInstanceOf, (arg("self"), arg("algorithm_name")), @@ -97,11 +94,9 @@ void export_AlgorithmManager() { (arg("self"), arg("algorithm_name")), "Returns a list of managed algorithm instances that are " "currently executing") - .def("clear", &AlgorithmManagerImpl::clear, - arg("self"), + .def("clear", &AlgorithmManagerImpl::clear, arg("self"), "Clears the current list of managed algorithms") - .def("cancelAll", &AlgorithmManagerImpl::cancelAll, - arg("self"), + .def("cancelAll", &AlgorithmManagerImpl::cancelAll, arg("self"), "Requests that all currently running algorithms be cancelled"); // Instance method diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp index a185fc4b0171d4477354a1a5da01a474aa9eb199..6cc64c5f4ee62183820832c18f0d4aeb9e8ea54b 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Axis.cpp @@ -90,10 +90,9 @@ void export_Axis() { arg("self"), return_value_policy<copy_const_reference>(), "Returns the unit object for the axis") .def("getValue", &Axis::getValue, - Axis_getValue( - (arg("self"), arg("index"), arg("vertical_index")), - "Returns the value at the given point on the Axis. " - "The vertical axis index [default=0]")) + Axis_getValue((arg("self"), arg("index"), arg("vertical_index")), + "Returns the value at the given point on the Axis. " + "The vertical axis index [default=0]")) .def("extractValues", &extractAxisValues, arg("self"), "Return a numpy array of the axis values") .def("setUnit", &Axis::setUnit, (arg("self"), arg("unit_name")), @@ -127,8 +126,7 @@ void export_NumericAxis() { /// Exported so that Boost.Python can give back a NumericAxis class when an /// Axis* is returned class_<NumericAxis, bases<Axis>, boost::noncopyable>("NumericAxis", no_init) - .def("create", &createNumericAxis, - arg("length"), + .def("create", &createNumericAxis, arg("length"), return_internal_reference<>(), "Creates a new NumericAxis of a specified length") .staticmethod("create"); @@ -152,8 +150,7 @@ void export_BinEdgeAxis() { /// Axis* is returned class_<BinEdgeAxis, bases<NumericAxis>, boost::noncopyable>("BinEdgeAxis", no_init) - .def("create", &createBinEdgeAxis, - arg("length"), + .def("create", &createBinEdgeAxis, arg("length"), return_internal_reference<>(), "Creates a new BinEdgeAxis of a specified length") .staticmethod("create"); diff --git a/Framework/PythonInterface/mantid/api/src/Exports/BoxController.cpp b/Framework/PythonInterface/mantid/api/src/Exports/BoxController.cpp index 35b0b67d8376ec227bda8ec343e0ede9af3c31db..af6debd38bd7864bcda9671f74e9e7979deeeed6 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/BoxController.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/BoxController.cpp @@ -11,17 +11,14 @@ void export_BoxController() { register_ptr_to_python<boost::shared_ptr<BoxController>>(); class_<BoxController, boost::noncopyable>("BoxController", no_init) - .def("getNDims", &BoxController::getNDims, - arg("self"), + .def("getNDims", &BoxController::getNDims, arg("self"), "Get # of dimensions") - .def("getSplitThreshold", &BoxController::getSplitThreshold, - arg("self"), + .def("getSplitThreshold", &BoxController::getSplitThreshold, arg("self"), "Return the splitting threshold, in # of events") .def("getSplitInto", &BoxController::getSplitInto, (arg("self"), arg("dim")), "Return into how many to split along a dimension") - .def("getMaxDepth", &BoxController::getMaxDepth, - arg("self"), + .def("getMaxDepth", &BoxController::getMaxDepth, arg("self"), "Return the max recursion depth allowed for grid box splitting.") .def("getTotalNumMDBoxes", &BoxController::getTotalNumMDBoxes, arg("self"), @@ -29,17 +26,13 @@ void export_BoxController() { .def("getTotalNumMDGridBoxes", &BoxController::getTotalNumMDGridBoxes, arg("self"), "Return the total number of MDGridBox'es, irrespective of depth") - .def("getAverageDepth", &BoxController::getAverageDepth, - arg("self"), + .def("getAverageDepth", &BoxController::getAverageDepth, arg("self"), "Return the average recursion depth of gridding.") - .def("isFileBacked", &BoxController::isFileBacked, - arg("self"), + .def("isFileBacked", &BoxController::isFileBacked, arg("self"), "Return True if the MDEventWorkspace is backed by a file ") - .def("getFilename", &BoxController::getFilename, - arg("self"), + .def("getFilename", &BoxController::getFilename, arg("self"), "Return the full path to the file open as the file-based back or " "empty string if no file back-end is initiated") - .def("useWriteBuffer", &BoxController::useWriteBuffer, - arg("self"), + .def("useWriteBuffer", &BoxController::useWriteBuffer, arg("self"), "Return true if the MRU should be used"); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp index 782feec2f82c753697964c97b5e8f6f8242f48e3..00c8a38090785a1306a40883c221b28f3dffbcd5 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/DataProcessorAlgorithm.cpp @@ -47,8 +47,7 @@ void export_DataProcessorAlgorithm() { "input file when processing in chunks") .def("loadChunk", &DataProcessorAdapter::loadChunkProxy, - (arg("self"), arg("row_index")), - "Load a chunk of data") + (arg("self"), arg("row_index")), "Load a chunk of data") .def("load", (loadOverload1)&DataProcessorAdapter::loadProxy, (arg("self"), arg("input_data")), @@ -62,8 +61,7 @@ void export_DataProcessorAlgorithm() { "AnalysisDataService.") .def("splitInput", &DataProcessorAdapter::splitInputProxy, - (arg("self"), arg("input")), - return_value_policy<VectorToNumpy>()) + (arg("self"), arg("input")), return_value_policy<VectorToNumpy>()) .def("forwardProperties", &DataProcessorAdapter::forwardPropertiesProxy, arg("self")) @@ -92,8 +90,7 @@ void export_DataProcessorAlgorithm() { "build. For " "non-MPI build it always returns true") - .def("getNThreads", &DataProcessorAdapter::getNThreadsProxy, - arg("self"), + .def("getNThreads", &DataProcessorAdapter::getNThreadsProxy, arg("self"), "Returns the number of running MPI processes in an MPI build or 1 " "for " "a non-MPI build"); diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp index c80cd1af888b9460bd8859f157e9b61f150c0876..6ceb418a721310d6df50cf2093d74c68098cce44 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FileFinder.cpp @@ -19,8 +19,7 @@ void export_FileFinder() { "Return a full path to the given file if it can be found within " "datasearch.directories paths. Directories can be ignored with " "ignoreDirs=True. An empty string is returned otherwise.")) - .def("findRuns", &FileFinderImpl::findRuns, - (arg("self"), arg("hintstr")), + .def("findRuns", &FileFinderImpl::findRuns, (arg("self"), arg("hintstr")), "Find a list of files file given a hint. " "The hint can be a comma separated list of run numbers and can also " "include ranges of runs, e.g. 123-135 or equivalently 123-35" diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FrameworkManager.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FrameworkManager.cpp index 1203f15ca02ef4b76db15eb988c580377eba9b93..d6df442a862bd0060019dd70b7ef395c26ec8a73 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FrameworkManager.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FrameworkManager.cpp @@ -12,8 +12,7 @@ void export_FrameworkManager() { class_<FrameworkManagerImpl, boost::noncopyable>("FrameworkManagerImpl", no_init) .def("setNumOMPThreadsToConfigValue", - &FrameworkManagerImpl::setNumOMPThreadsToConfigValue, - arg("self"), + &FrameworkManagerImpl::setNumOMPThreadsToConfigValue, arg("self"), "Sets the number of OpenMP threads to the value specified in the " "config file") @@ -25,26 +24,22 @@ void export_FrameworkManager() { arg("self"), "Returns the number of OpenMP threads that will be used.") - .def("clear", &FrameworkManagerImpl::clear, - arg("self"), + .def("clear", &FrameworkManagerImpl::clear, arg("self"), "Clear all memory held by Mantid") .def("clearAlgorithms", &FrameworkManagerImpl::clearAlgorithms, arg("self"), "Clear memory held by algorithms (does not include workspaces)") - .def("clearData", &FrameworkManagerImpl::clearData, - arg("self"), + .def("clearData", &FrameworkManagerImpl::clearData, arg("self"), "Clear memory held by the data service (essentially all workspaces, " "including hidden)") .def("clearInstruments", &FrameworkManagerImpl::clearInstruments, - arg("self"), - "Clear memory held by the cached instruments") + arg("self"), "Clear memory held by the cached instruments") .def("clearPropertyManagers", - &FrameworkManagerImpl::clearPropertyManagers, - arg("self"), + &FrameworkManagerImpl::clearPropertyManagers, arg("self"), "Clear memory held by the PropertyManagerDataService") .def("Instance", &FrameworkManager::Instance, diff --git a/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp index f5c103bca4bb9b335eb1891893d43d712c9d4af4..7735fc15decf7418218e07c3b204f3235ef4774c 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/FunctionFactory.cpp @@ -89,18 +89,15 @@ void export_FunctionFactory() { class_<FunctionFactoryImpl, boost::noncopyable>("FunctionFactoryImpl", no_init) - .def("getFunctionNames", &getFunctionNames, - arg("self"), + .def("getFunctionNames", &getFunctionNames, arg("self"), "Returns a list of the currently available functions") .def("createFunction", &FunctionFactoryImpl::createFunction, (arg("self"), arg("type")), "Return a pointer to the requested function") - .def("subscribe", &subscribe, - (arg("self"), arg("object")), + .def("subscribe", &subscribe, (arg("self"), arg("object")), "Register a Python class derived from IFunction into the factory") .def("unsubscribe", &FunctionFactoryImpl::unsubscribe, - (arg("self"), arg("class_name")), - "Remove a type from the factory") + (arg("self"), arg("class_name")), "Remove a type from the factory") .def("Instance", &FunctionFactory::Instance, return_value_policy<reference_existing_object>(), "Returns a reference to the FunctionFactory singleton") diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp index 2c775d7d4b1cddf8b2a1c506893dc850aa7fb412..009ca30fb110ff5ede255104d493cfe8e16fcbdf 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IAlgorithm.cpp @@ -340,27 +340,22 @@ void export_ialgorithm() { "Return a list of input, in/out and output properties " "such that the mandatory properties are first followed by the " "optional ones.") - .def("outputProperties", &getOutputProperties, - arg("self"), + .def("outputProperties", &getOutputProperties, arg("self"), "Returns a list of the output properties on the algorithm") - .def("isInitialized", &IAlgorithm::isInitialized, - arg("self"), + .def("isInitialized", &IAlgorithm::isInitialized, arg("self"), "Returns True if the algorithm is initialized, False otherwise") - .def("isExecuted", &IAlgorithm::isExecuted, - arg("self"), + .def("isExecuted", &IAlgorithm::isExecuted, arg("self"), "Returns True if the algorithm has been executed successfully, " "False otherwise") .def("isLogging", &IAlgorithm::isLogging, arg("self"), "Returns True if the " "algorithm's logger is turned " "on, False otherwise") - .def("isRunning", &IAlgorithm::isRunning, - arg("self"), + .def("isRunning", &IAlgorithm::isRunning, arg("self"), "Returns True if the algorithm " "is considered to be running, " "False otherwise") - .def("setChild", &IAlgorithm::setChild, - (arg("self"), arg("is_child")), + .def("setChild", &IAlgorithm::setChild, (arg("self"), arg("is_child")), "If true this algorithm is run as a child algorithm. There will be " "no logging and nothing is stored in the Analysis Data Service") .def("enableHistoryRecordingForChild", @@ -372,46 +367,37 @@ void export_ialgorithm() { (arg("self"), arg("enabled")), "If true then allow logging of start and end messages") .def("getAlgStartupLogging", &IAlgorithm::getAlgStartupLogging, - arg("self"), - "Returns true if logging of start and end messages") + arg("self"), "Returns true if logging of start and end messages") .def("setAlwaysStoreInADS", &IAlgorithm::setAlwaysStoreInADS, (arg("self"), arg("do_store")), "If true then even child algorithms will have their workspaces " "stored in the ADS.") - .def("isChild", &IAlgorithm::isChild, - arg("self"), + .def("isChild", &IAlgorithm::isChild, arg("self"), "Returns True if the algorithm has been marked to run as a child. " "If True then Output workspaces " "are NOT stored in the Analysis Data Service but must be retrieved " "from the property.") - .def("setLogging", &IAlgorithm::setLogging, - (arg("self"), arg("value")), + .def("setLogging", &IAlgorithm::setLogging, (arg("self"), arg("value")), "Toggle logging on/off.") .def("setRethrows", &IAlgorithm::setRethrows, - (arg("self"), arg("rethrow")), - "To query whether an algorithm should rethrow exceptions when executing.") - .def("initialize", &IAlgorithm::initialize, - arg("self"), + (arg("self"), arg("rethrow")), "To query whether an algorithm " + "should rethrow exceptions when " + "executing.") + .def("initialize", &IAlgorithm::initialize, arg("self"), "Initializes the algorithm") - .def("validateInputs", &IAlgorithm::validateInputs, - arg("self"), + .def("validateInputs", &IAlgorithm::validateInputs, arg("self"), "Cross-check all inputs and return any errors as a dictionary") - .def("execute", &executeProxy, - arg("self"), + .def("execute", &executeProxy, arg("self"), "Runs the algorithm and returns whether it has been successful") // 'Private' static methods - .def("_algorithmInThread", &_algorithmInThread, - arg("thread_id")) + .def("_algorithmInThread", &_algorithmInThread, arg("thread_id")) .staticmethod("_algorithmInThread") // Special methods - .def("__str__", &IAlgorithm::toString, - arg("self")) + .def("__str__", &IAlgorithm::toString, arg("self")) // deprecated methods - .def("getOptionalMessage", &getOptionalMessage, - arg("self"), + .def("getOptionalMessage", &getOptionalMessage, arg("self"), "Returns the optional user message attached to the algorithm") - .def("getWikiSummary", &getWikiSummary, - arg("self"), + .def("getWikiSummary", &getWikiSummary, arg("self"), "Returns the summary found on the wiki page"); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp index 9c7f5b920b407127abaf8a39478a567dc8f708ba..d3eaabbe8e0a8da596f401ca71d7732b38fafb12 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IFunction.cpp @@ -94,13 +94,13 @@ void export_IFunction() { .def("setParameter", (setParameterType1)&IFunction::setParameter, setParameterType1_Overloads( - (arg("self"), arg("i"), arg("value"), arg("explicitlySet")), - "Sets the value of the ith parameter")) + (arg("self"), arg("i"), arg("value"), arg("explicitlySet")), + "Sets the value of the ith parameter")) .def("setParameter", (setParameterType2)&IFunction::setParameter, setParameterType2_Overloads( - (arg("self"), arg("name"), arg("value"), arg("explicitlySet")), - "Sets the value of the named parameter")) + (arg("self"), arg("name"), arg("value"), arg("explicitlySet")), + "Sets the value of the named parameter")) .def("declareAttribute", &IFunctionAdapter::declareAttribute, (arg("self"), arg("name"), arg("default_value")), @@ -126,27 +126,21 @@ void export_IFunction() { "Declare a fitting parameter settings its default value to 0.0") //-- Deprecated functions that have the wrong names -- - .def("categories", &getCategories, - arg("self"), + .def("categories", &getCategories, arg("self"), "Returns a list of the categories for an algorithm") - .def("numParams", &IFunction::nParams, - arg("self"), + .def("numParams", &IFunction::nParams, arg("self"), "Return the number of parameters") - .def("getParamName", &IFunction::parameterName, - (arg("self"), arg("i")), + .def("getParamName", &IFunction::parameterName, (arg("self"), arg("i")), "Return the name of the ith parameter") .def("getParamDescr", &IFunction::parameterDescription, - (arg("self"), arg("i")), - "Return a description of the ith parameter") + (arg("self"), arg("i")), "Return a description of the ith parameter") .def("getParamExplicit", &IFunction::isExplicitlySet, (arg("self"), arg("i")), "Return whether the ith parameter needs to be explicitely set") .def("getParamValue", (double (IFunction::*)(std::size_t) const) & IFunction::getParameter, - (arg("self"), arg("i")), - "Get the value of the ith parameter") + (arg("self"), arg("i")), "Get the value of the ith parameter") //-- Python special methods -- - .def("__repr__", &IFunction::asString, - arg("self"), + .def("__repr__", &IFunction::asString, arg("self"), "Return a string representation of the function"); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp index cacc585f9548871905e22857dc23c106b5c2a479..7090972a851786d4d7cf28c5e48773cfe1146485 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IMaskWorkspace.cpp @@ -28,15 +28,13 @@ bool isMaskedFromList(const IMaskWorkspace &self, void export_IMaskWorkspace() { class_<IMaskWorkspace, boost::noncopyable>("IMaskWorkspace", no_init) - .def("getNumberMasked", &IMaskWorkspace::getNumberMasked, - arg("self"), + .def("getNumberMasked", &IMaskWorkspace::getNumberMasked, arg("self"), "Returns the number of masked pixels in the workspace") .def("isMasked", (bool (IMaskWorkspace::*)(const Mantid::detid_t) const) & IMaskWorkspace::isMasked, (arg("self"), arg("detector_id")), "Returns whether the given detector ID is masked") - .def("isMasked", isMaskedFromList, - (arg("self"), arg("detector_id_list")), + .def("isMasked", isMaskedFromList, (arg("self"), arg("detector_id_list")), "Returns whether all of the given detector ID list are masked"); // register pointers diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp index 6f2d447f7e6ebdffb6c42de9bbe0784dbc415921..f3e42c14c3f26423d58cb51961c44b632746c78a 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IPeak.cpp @@ -124,11 +124,9 @@ void export_IPeak() { .def("setSigmaIntensity", &IPeak::setSigmaIntensity, (arg("self"), arg("sigma_intensity")), "Set the error on the integrated peak intensity") - .def("getBinCount", &IPeak::getBinCount, - arg("self"), + .def("getBinCount", &IPeak::getBinCount, arg("self"), "Return the # of counts in the bin at its peak") - .def("setBinCount", &IPeak::setBinCount, - (arg("self"), arg("bin_count")), + .def("setBinCount", &IPeak::setBinCount, (arg("self"), arg("bin_count")), "Set the # of counts in the bin at its peak") .def("getRow", &IPeak::getRow, arg("self"), "For RectangularDetectors only, returns " diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp index 0c0c19486ea22b10b222ed4224f5c1ad5669221a..3ac4f6332732a278c3b3ffaa9371cdb41d21edf9 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp @@ -17,8 +17,7 @@ void export_IPeakFunction() { (arg("self"), arg("vec_x")), "Calculate the values of the function for the given x values. The " "output should be stored in the out array") - .def("intensity", &IPeakFunction::intensity, - arg("self"), + .def("intensity", &IPeakFunction::intensity, arg("self"), "Returns the integral intensity of the peak function.") .def("setIntensity", &IPeakFunction::setIntensity, (arg("self"), arg("new_intensity")), diff --git a/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp index 7471b0b121b6b584a4884ef8b16c08adaec3e12d..2ace16a65bb1aac998660d10ba45565d1a2e88c1 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/ISplittersWorkspace.cpp @@ -11,8 +11,7 @@ void export_ISplittersWorkspace() { class_<ISplittersWorkspace, boost::noncopyable>("ISplittersWorkspace", no_init) .def("getNumberSplitters", &ISplittersWorkspace::getNumberSplitters, - arg("self"), - "Returns the number of splitters within the workspace"); + arg("self"), "Returns the number of splitters within the workspace"); // register pointers RegisterWorkspacePtrToPython<ISplittersWorkspace>(); diff --git a/Framework/PythonInterface/mantid/api/src/Exports/IWorkspaceProperty.cpp b/Framework/PythonInterface/mantid/api/src/Exports/IWorkspaceProperty.cpp index 08baa60252634808cfb560cfb163eda9d1baef9f..8e50a5b573226ff8e8a6707bca688bf8555f6c7b 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/IWorkspaceProperty.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/IWorkspaceProperty.cpp @@ -6,10 +6,8 @@ void export_IWorkspaceProperty() { using Mantid::API::IWorkspaceProperty; class_<IWorkspaceProperty, boost::noncopyable>("IWorkspaceProperty", no_init) - .def("isOptional", &IWorkspaceProperty::isOptional, - arg("self"), + .def("isOptional", &IWorkspaceProperty::isOptional, arg("self"), "Is the input workspace property optional") - .def("isLocking", &IWorkspaceProperty::isLocking, - arg("self"), + .def("isLocking", &IWorkspaceProperty::isLocking, arg("self"), "Will the workspace be locked when starting an algorithm"); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp index 31bb8859817904f3d16e3d8646dce0d72f20513e..e9d0eb07cfbfb1e91c8151f51e009ff885a90daf 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Jacobian.cpp @@ -9,7 +9,8 @@ void export_Jacobian() { register_ptr_to_python<Jacobian *>(); class_<Jacobian, boost::noncopyable>("Jacobian", no_init) - .def("set", &Jacobian::set, (arg("self"), arg("iy"), arg("ip"), arg("value")), + .def("set", &Jacobian::set, + (arg("self"), arg("iy"), arg("ip"), arg("value")), "Set an element of the Jacobian matrix where iy=index of data " "point, ip=index of parameter.") diff --git a/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp b/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp index 5ebb9d41783003e42b43b0abec9873f9e9f6d391..1635dd5d4cc22a15a23e6c5c364668734bbd86f4 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/MultipleExperimentInfos.cpp @@ -15,7 +15,6 @@ void export_MultipleExperimentInfos() { (arg("self"), arg("run_index")), "Return the experiment info at the given index.") .def("getNumExperimentInfo", - &MultipleExperimentInfos::getNumExperimentInfo, - arg("self"), + &MultipleExperimentInfos::getNumExperimentInfo, arg("self"), "Return the number of experiment info objects,"); } diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp index 6f57b9aab6b45c4246c47c525953c861c329a5fc..bc950c6e2ff6754c95539fd6a278f394a995040d 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Run.cpp @@ -182,10 +182,8 @@ void export_Run() { "Returns the value pointed to by the key or the default value given") .def("keys", &keys, arg("self"), "Returns the names of the properties as list") - .def("__contains__", &Run::hasProperty, - (arg("self"), arg("name"))) - .def("__getitem__", &Run::getProperty, - (arg("self"), arg("name")), + .def("__contains__", &Run::hasProperty, (arg("self"), arg("name"))) + .def("__getitem__", &Run::getProperty, (arg("self"), arg("name")), return_value_policy<return_by_value>()) .def("__setitem__", &addOrReplaceProperty, (arg("self"), arg("name"), arg("value"))) diff --git a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp index a926f6057b5a526137da1c454eeef479f4817620..73427a857342ef55e416a3df8f859a6365cf3c4b 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/Workspace.cpp @@ -34,11 +34,10 @@ void export_Workspace() { .def("setComment", &Workspace::setComment, (arg("self"), arg("comment")), "Set the comment field of the workspace") .def("isDirty", &Workspace::isDirty, - Workspace_isDirtyOverloads( - (arg("self"), arg("n")), - "True if the workspace has run " - "more than n algorithms " - "(Default=1)")) + Workspace_isDirtyOverloads((arg("self"), arg("n")), + "True if the workspace has run " + "more than n algorithms " + "(Default=1)")) .def("getMemorySize", &Workspace::getMemorySize, arg("self"), "Returns the memory footprint of the workspace in KB") .def("getHistory", (const WorkspaceHistory &(Workspace::*)() const) & diff --git a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp index ad9a9207e811909433660e5083c3a0d25a7d82c7..7875811ce61e0663571a587177a145048847083c 100644 --- a/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp +++ b/Framework/PythonInterface/mantid/api/src/Exports/WorkspaceFactory.cpp @@ -62,22 +62,26 @@ void export_WorkspaceFactory() { class_<WorkspaceFactoryImpl, boost::noncopyable>("WorkspaceFactoryImpl", no_init) .def("create", &createFromParentPtr, - createFromParent_Overload( - createFromParentDoc, (arg("self"), arg("parent"), arg("NVectors") = -1, - arg("XLength") = -1, arg("YLength") = -1))) + createFromParent_Overload(createFromParentDoc, + (arg("self"), arg("parent"), + arg("NVectors") = -1, arg("XLength") = -1, + arg("YLength") = -1))) .def("create", (createFromScratchPtr)&WorkspaceFactoryImpl::create, createFromScratchDoc, return_value_policy<AsType<Workspace_sptr>>(), - (arg("self"), arg("className"), arg("NVectors"), arg("XLength"), arg("YLength"))) + (arg("self"), arg("className"), arg("NVectors"), arg("XLength"), + arg("YLength"))) .def("createTable", &WorkspaceFactoryImpl::createTable, - createTable_Overload("Creates an empty TableWorkspace", - (arg("self"), arg("className") = "TableWorkspace")) + createTable_Overload( + "Creates an empty TableWorkspace", + (arg("self"), arg("className") = "TableWorkspace")) [return_value_policy<AsType<Workspace_sptr>>()]) .def("createPeaks", &WorkspaceFactoryImpl::createPeaks, - createPeaks_Overload("Creates an empty PeaksWorkspace", - (arg("self"), arg("className") = "PeaksWorkspace")) + createPeaks_Overload( + "Creates an empty PeaksWorkspace", + (arg("self"), arg("className") = "PeaksWorkspace")) [return_value_policy<AsType<Workspace_sptr>>()]) .def("Instance", &WorkspaceFactory::Instance,