Remove ElementHolder backward-compatible tool aliases (PR #430 review) - #455
Merged
gupichon merged 1 commit intoSep 30, 2026
Conversation
gupichon
requested review from
GamelinAl,
JeanLucPons,
TeresiaOlsson,
gubaidulinvadim and
kparasch
September 28, 2026 14:59
Member
Author
|
@kparasch, could you take a look at this PR? |
kparasch
approved these changes
Sep 30, 2026
kparasch
left a comment
Member
There was a problem hiding this comment.
ipynb files are my nightmare!
I think it looks good
gupichon
merged commit Sep 30, 2026
314ca97
into
199-elementholder-api-refurbishment
3 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Addresses kparasch's two review comments on #430 (Elementholder api refurbishment):
ToolHolder's 7 default-tool properties (chromaticity,crm,tune,trm,orbit,orm,dispersion) went throughself._peer.get_X_tuning(name), a parallel lookup path that does the exact same_TOOLSdict lookup asself.get(name), just with a slightly different error message. Simplified to useself.get(name)directly.ElementHolderkept 7 backward-compatible aliases (design.tune,.chromaticity,.orbit,.dispersion,.trm,.crm,.orm) fordesign.tool.<name>. Per review feedback, removed them outright rather than keep both spellings this early in development, and enforceddesign.tool.<name>as the only way to reach a mode's default tuning/measurement tool.Related Issue
Review follow-up on #430 (part of epic #199, ElementHolder API refurbishment).
Not a separate tracked issue.
Features/issues described there are:
ToolHolderand dropped duplicate top-level accessors onElementHolder, per reviewer request, to keep a single way to reach each default tool.Changes to existing functionality
ElementHolder.tune/.chromaticity/.orbit/.dispersion/.trm/.crm/.ormproperties removed. Every caller must now usedesign.tool.<name>. This is a breaking change for any code still using the short form.ToolHolder's 7 properties now callself.get(name)instead ofself._peer.get_X_tuning(name).ElementHolder.get_X_tuning(name)(the named, non-default lookup methods) are unchanged and still part of the public API.Testing
The following tests were updated (no new tests needed, this is a removal/simplification):
tests/tuning_tools/test_tuning_dispersion.py,test_tuning_orm.py,test_tuning_orbit_correction.py,test_tuning_tools.py, andtests/diagnostics/test_diagnostic_accessors.pymigrated to.tool.<name>tests/tuning_tools/test_tool_accessors.pymigrated, andtest_tool_typed_properties_alias_existing_defaultsremoved (it only asserted the now-gone alias equalled.tool.<name>, tautological once the alias is gone)examples/use_cases/01-tune_correction.{py,ipynb},03-orbit_correction.{py,ipynb},examples/other_examples/ORM_Tango_server/ORM.pyand theuse_cases/README.mdtable updated to the new accessorVerify that your checklist complies with the project