mantid icon indicating copy to clipboard operation
mantid copied to clipboard

Throw error on invalid workspace names

Open peterfpeterson opened this issue 11 months ago • 0 comments

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.

peterfpeterson avatar Mar 20 '24 19:03 peterfpeterson