Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RenameWorkspaces should only overwrite if forced #16263

Closed
NickDraper opened this issue May 17, 2016 · 0 comments
Closed

RenameWorkspaces should only overwrite if forced #16263

NickDraper opened this issue May 17, 2016 · 0 comments
Assignees
Labels
Framework Issues and pull requests related to components in the Framework
Milestone

Comments

@NickDraper
Copy link
Contributor

Expected behaviour

RenameWorkspace should fail if an existing workspace of the output name is defined. This check needs to be for anything in the ADS and also members of groups in the ADS.

We should add a new overwite Boolean property (default false) that would delete the outputworkspace if it exists before renaming.

Actual behaviour

Currently renameWorkspace can overwite workspaces if the outputworkspace name is already in use.
This can make a particular mess if you name two members within a workspace group the same (see #8652).

Steps to reproduce the behavior

CreateSampleWorkspace(OutputWorkspace='bob', Function='User Defined', UserDefinedFunction='name=LinearBackground,A0=3.22542,A1=-0.0633193')
CreateSampleWorkspace(OutputWorkspace='bob1', Function='User Defined', UserDefinedFunction='name=LinearBackground,A0=3.22542,A1=-0.0633193')
CreateSampleWorkspace(OutputWorkspace='bob2', Function='User Defined', UserDefinedFunction='name=LinearBackground,A0=3.22542,A1=-0.0633193')
CreateSampleWorkspace(OutputWorkspace='bob3', Function='User Defined', UserDefinedFunction='name=LinearBackground,A0=3.22542,A1=-0.0633193')
GroupWorkspaces(InputWorkspaces='bob,bob1,bob2,bob3', OutputWorkspace='NewGroup')
RenameWorkspace(InputWorkspace='bob1', OutputWorkspace='bob')

This will give you a group with two members with the same name, there is lots of trouble from this point on.

Platforms affected

All

Once this is solved we should check with Rob Dalgleish to make sure this does not mess up his scripts.

@NickDraper NickDraper added Framework Issues and pull requests related to components in the Framework Misc: Easy labels May 17, 2016
@NickDraper NickDraper added this to the Release 3.8 milestone May 17, 2016
DavidFair pushed a commit that referenced this issue Jul 13, 2016
DavidFair pushed a commit that referenced this issue Jul 13, 2016
DavidFair pushed a commit that referenced this issue Jul 13, 2016
DavidFair pushed a commit that referenced this issue Jul 14, 2016
DavidFair pushed a commit that referenced this issue Jul 14, 2016
DavidFair pushed a commit that referenced this issue Jul 14, 2016
DavidFair pushed a commit that referenced this issue Jul 20, 2016
DavidFair pushed a commit that referenced this issue Jul 21, 2016
DavidFair added a commit that referenced this issue Jul 21, 2016
DavidFair added a commit that referenced this issue Jul 22, 2016
DavidFair added a commit that referenced this issue Jul 29, 2016
…aces_check_if_out_name_exists

Re #16263

# Conflicts:
#	docs/source/release/v3.8.0/framework.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework
Projects
None yet
Development

No branches or pull requests

2 participants