mantid
mantid copied to clipboard
Throw error on invalid workspace names
The ADS exposes several methods where the names of workspaces become python variable names and is described in the user documentation. The general rules are (taken from)
- Names are case-sensitive
- Names cannot start with a digit
- Names can contain letters, numbers, and underscores
AnalysisDataService::rename()
does not currently call AnalysisDataService::verifyName()
which needs to be changed. All of the additional checks can be put into AnalysisDataService::isValid()
which is called by AnalysisDataService::verifyName()
.
Note that unicode characters are allowed, but they may not be appropriate for workspace names because the ADS stores the names as std::string
.