Skip to content

Conversation

@gpeairs
Copy link
Member

@gpeairs gpeairs commented Oct 8, 2025

This includes four related fixes giving users more control over what layers are rendered, especially in SolidModelTarget:

  • SolidModelTargets will now ignore NORENDER_META (the :norender layer) (closes SolidModelTarget should not render :norender layer #89)
  • SolidModelTargets now take ignored_layers, a list of layer symbols which are not rendered
  • LayoutTargets now allow overriding the mapping of GDSMeta by setting target.map_meta_dict[my_gdsmeta] = my_override, allowing changes to different GDSMeta or nothing rather than always mapping a GDSMeta to itself
  • Changed remove_group! SolidModel postrendering operation to use remove_entities=true by default, fixing the unexpected and undesired default behavior that only removed the record of the group and not its entities (grouped with these fixes because this is how users were previously 'ignoring' layers in SolidModel) (closes Postrender operation remove_group! doesn't remove entities by default #90)

@codecov
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@parrangoiz parrangoiz left a comment

Choose a reason for hiding this comment

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

Looks good, just one minor comment.

map_layer(::Target, m::GDSMeta) = m # No need to warn

# For GDSMeta, return as-is (pass through)
_map_layer(target, meta::GDSMeta) = meta
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the change of signature?

Copy link
Member Author

Choose a reason for hiding this comment

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

I try to default to not using type annotations when they're not necessary for dispatch or correctness. In this case there's not much risk of calling it with a "wrong" type and getting an answer anyway. However I didn't actually think about it that much here. Mainly I removed ::Target to match the other internal _map_layer method below it, but I don't think it matters either way.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see why it's convenient to drop the type when it's meant to be a fallback, but in this case why not just keep it? Seems to me that we're just creating chances for future failures, for example if more _map_layer methods are defined, and then someone intending to call those methods accidentally ends up calling this one because of the more relaxed signature.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair enough, the SchematicDrivenLayout namespace is pretty big and this is a lighter way to protect against that than a submodule. I've added the annotation to both _map_layer methods.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

@parrangoiz
Copy link
Contributor

All good to merge on my end.

@gpeairs gpeairs merged commit fde4846 into main Oct 15, 2025
9 checks passed
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.

Postrender operation remove_group! doesn't remove entities by default SolidModelTarget should not render :norender layer

2 participants