Skip to content

Conversation

@ax3l
Copy link
Member

@ax3l ax3l commented Jan 7, 2026

Hide more internals of serialization (more user friendly) and prepare for increased complexity of the root structure of PALS.

Close #56

@ax3l ax3l requested a review from EZoni January 7, 2026 20:37
Hide more internals of serialization (more user friendly) and
prepare for increased complexity of the root structure of PALS.
@ax3l ax3l force-pushed the topic-load-store branch from aeb7285 to 1d62eb5 Compare January 7, 2026 20:40
@ax3l ax3l requested a review from cemitch99 January 7, 2026 20:40
@ax3l ax3l added the element kinds beamline elements & segments/lines label Jan 7, 2026
Comment on lines 215 to +217
# Read back from file
with open(yaml_file, "r") as file:
loaded_yaml_data = yaml.safe_load(file)
print(f"\nComprehensive lattice YAML:\n{file.read()}")
Copy link
Member

Choose a reason for hiding this comment

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

It looks to me like this with block can be removed now, correct? I don't see any other instructions besides the print statement within the block.

Comment on lines 270 to +272
# Read back from file
with open(json_file, "r") as file:
loaded_json_data = json.loads(file.read())
print(f"\nComprehensive lattice JSON:\n{file.read()}")
Copy link
Member

Choose a reason for hiding this comment

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

It looks to me like this with block can be removed now, correct? I don't see any other instructions besides the print statement within the block.

@EZoni
Copy link
Member

EZoni commented Jan 20, 2026

This looks good to me. I think it can be merged after the two comments above are addressed.

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

Labels

element kinds beamline elements & segments/lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Load/Store API

2 participants