Skip to content

Accelerator.add() utility function - #482

Merged
gubaidulinvadim merged 3 commits into
mainfrom
issue-420-accelerator-add
Oct 30, 2026
Merged

gubaidulinvadim merged 3 commits into
mainfrom
issue-420-accelerator-add

Conversation

@gubaidulinvadim

Copy link
Copy Markdown
Member

Added Accelerator.add() utility function to add elements to all modes and holders.

Resolves #420

@gubaidulinvadim gubaidulinvadim added this to the ESRF Workshop milestone Oct 15, 2026
@gubaidulinvadim gubaidulinvadim self-assigned this Oct 15, 2026
@gubaidulinvadim gubaidulinvadim added the enhancement New feature or request label Oct 15, 2026

@GamelinAl GamelinAl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

An improvement would be to do this in a try/except block and to remove the names added so far from every holder in the except block. That way if it fails in the middle the configuration is still the starting one.

@gubaidulinvadim

Copy link
Copy Markdown
Member Author

Arhg, interactive use will have objects dangling even if error is thrown... I'll fix it but there's no nice solution because you need to keep track of elements added during the function call.

@gubaidulinvadim

Copy link
Copy Markdown
Member Author

I've checked it works as intended now. The element is getting deleted if try fails.

@GamelinAl GamelinAl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me

@GamelinAl

Copy link
Copy Markdown
Member

@TeresiaOlsson the current setting for merge looks fine (no need to bypass this one).

@gubaidulinvadim
gubaidulinvadim merged commit 6a1bd8a into main Oct 30, 2026
4 checks passed
@TeresiaOlsson

Copy link
Copy Markdown
Member

@TeresiaOlsson the current setting for merge looks fine (no need to bypass this one).

Mm, that's good. The question is now if you weren't a maintainer could you still merge? I want to test that before I give all members write permissions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accelerator.add()

3 participants