We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e722cc commit 22c0f45Copy full SHA for 22c0f45
1 file changed
examples/test_external_examples.py
@@ -1,5 +1,4 @@
1
import argparse
2
-import yaml
3
4
from pals import BeamLine
5
@@ -14,12 +13,8 @@ def main():
14
13
)
15
args = parser.parse_args()
16
example_file = args.path
17
- # Read YAML data from file
18
- with open(example_file, "r") as file:
19
- data = yaml.safe_load(file)
20
- # Parse and validate YAML data
21
- print(f"Parsing data from {example_file}...")
22
- BeamLine(**data)
+ # Parse and validate YAML data from file
+ BeamLine.from_file(example_file)
23
24
25
if __name__ == "__main__":
0 commit comments