Skip to content

PALS Root Structure#63

Merged
ax3l merged 1 commit intopals-project:mainfrom
ax3l:pals-root
Feb 19, 2026
Merged

PALS Root Structure#63
ax3l merged 1 commit intopals-project:mainfrom
ax3l:pals-root

Conversation

@ax3l
Copy link
Member

@ax3l ax3l commented Feb 19, 2026

Add a free standing load/store function.
Parse the root structure.
https://pals-project.readthedocs.io/en/latest/conventions.html#pals-root-object

Add a free standing `load`/`store` function.
Parse the root structure.
https://pals-project.readthedocs.io/en/latest/conventions.html#pals-root-object
@ax3l
Copy link
Member Author

ax3l commented Feb 19, 2026

@EZoni after this PR we can attempt to parse the main repo example in #55

After that, we can do the lattice expansion

@ax3l ax3l merged commit ef707cc into pals-project:main Feb 19, 2026
8 checks passed
@ax3l ax3l deleted the pals-root branch February 19, 2026 07:46
Comment on lines +21 to +27
@model_validator(mode="before")
@classmethod
def unpack_json_structure(cls, data):
"""Deserialize the JSON/YAML/...-like dict for facility elements"""
from pals.kinds.mixin.all_element_mixin import unpack_element_list_structure

return unpack_element_list_structure(data, "facility", "facility")
Copy link
Member

Choose a reason for hiding this comment

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

With the latest updates, I think we have unpack_json_structure defined for

  • PALS
  • BeamLine
  • Lattice
  • UnionEle

Do you know if all of these classes still need that method? Or can we remove it from some now?

I think a similar question applies to other methods, e.g., from_file and to_file (defined for PALS, BeamLine, Lattice).

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments