Skip to content

Edit Runnable.load() to allow for loading a .obj using a specified path - #210

Merged
carlandreaslindstrom merged 3 commits into
mainfrom
Runnable_improve_load_obj
Oct 20, 2026
Merged

carlandreaslindstrom merged 3 commits into
mainfrom
Runnable_improve_load_obj

Conversation

@ben-c-2013

Copy link
Copy Markdown
Collaborator

No description provided.

@ben-c-2013 ben-c-2013 added the enhancement New feature or request label Mar 26, 2026
@ben-c-2013

Copy link
Copy Markdown
Collaborator Author

Still a bit cumbersome to use, as one needs to first create a dummy Runnable. E.g.

linac_dummy = PlasmaLinac()
obj_path= 'path/containing/.obj'
linac = linac_dummy.load(obj_path=obj_path)  # Load the linac from file

@carlandreaslindstrom

Copy link
Copy Markdown
Collaborator

Still a bit cumbersome to use, as one needs to first create a dummy Runnable. E.g.

linac_dummy = PlasmaLinac()
obj_path= 'path/containing/.obj'
linac = linac_dummy.load(obj_path=obj_path)  # Load the linac from file

This is now fixed by making the self argument optional. That means one can run e.g.
linac = PlasmaLinac.load(obj_path='run_data/linac_example/shot_000/runnable.obj')

@carlandreaslindstrom carlandreaslindstrom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks fine to me now!

@carlandreaslindstrom
carlandreaslindstrom merged commit 8f901fa into main Oct 20, 2026
1 check passed
@carlandreaslindstrom
carlandreaslindstrom deleted the Runnable_improve_load_obj branch October 20, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants