-
Notifications
You must be signed in to change notification settings - Fork 3
Add BeamLine.from/to_file Functions
#57
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
Conversation
Hide more internals of serialization (more user friendly) and prepare for increased complexity of the root structure of PALS.
| # 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()}") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I left them intentionally to just plot the content we wrote in the test.
| # 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()}") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I left them intentionally to just plot the content we wrote in the test.
|
This looks good to me. I think it can be merged after the two comments above are addressed. |
Hide more internals of serialization (more user friendly) and prepare for increased complexity of the root structure of PALS.
Close #56