Skip to content
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

Move GDS metadata into its own model #2626

Closed
wants to merge 1 commit into from

Conversation

thomasdorch
Copy link
Contributor

Related to #2623.

Creates a new model for the metadata intended to be written to the GDS file.

@joamatab
Copy link
Contributor

Hi Thomas,

i think this won't be supported by kfactory, and it's a bit confusing to have two separate Objects for metadata

something you can do is

c = gf.Component()
c.my_info = dict(key=value, message='whatever')

def save_gds_with_custom_info(c, gdspath)
    c.write(gds)
    json.dumps(c.my_info)

What do you think?

@sebastian-goeldi

@sebastian-goeldi
Copy link
Collaborator

I think Thomas's request is reasonable. There should be a place where you can store info why is not kfactory/klayout serializable. I just haven't come across a use case for this. Hence kfactory doesn't have it.

If you are already making an exception for schematic, it might be time to either split info or split it in a smart way. I agree though, it's not good to have a generic dict which has some fields with dedicated type restrictions (be it schematic or any other exception).

If you want something like that, I think a protocol or similar would be in order to describe the static attributes. This makes info a lot more complex though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants