Skip to content

String representation - #351

Draft
gubaidulinvadim wants to merge 1 commit into
mainfrom
string-representation
Draft

String representation#351
gubaidulinvadim wants to merge 1 commit into
mainfrom
string-representation

Conversation

@gubaidulinvadim

@gubaidulinvadim gubaidulinvadim commented Aug 15, 2026

Copy link
Copy Markdown
Member

Work in progress!
Modified pyaml_repr to print nested string representation. For BPM, this gives better results.

sr = Accelerator.load("tests/config/EBSOrbit.yaml")
bpm_design = sr.design.get_bpm("BPM_C04-04")
print(bpm_design)
    BPM(description=None, lattice_names='BPM_C04-04', name='BPM_C04-04', peer=Simulator(name='design', lattice='/home/gubaidulin/codes/operation/pyAML/pyaml/tests/config/sr/lattices/ebs.mat', mat_key=None, linker=None, description=None))

There are a few issues still that can be resolved in different ways.

  • There's no x_pos/y_pos (control system name string) in the string representation. It was present before.
    • We could make x_pos and y_pos 'public' by removing '_'. Then they would appear automatically in the string representation.
    • Another option is to make an 'include' keyword, similar to 'exclude' and explicitly include some attributes.
  • I'm worried if nested string representation will not have the same issues as we had before with very long and unreadable string representation. Maybe there should be a length limit?

When solved resolves #345

@gubaidulinvadim gubaidulinvadim self-assigned this Aug 15, 2026
@gubaidulinvadim gubaidulinvadim added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Aug 15, 2026
@gubaidulinvadim
gubaidulinvadim marked this pull request as draft August 15, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

String representation with new configuration

1 participant