Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reviewer's GuideAnnotates all @gf.cell component decorators with a per-file "type" tag derived from the source filename to enable component categorization and filtering, without changing cell implementations or signatures. Sequence diagram for cell instantiation with type tagssequenceDiagram
actor Designer
participant cspdk_cells as cspdk_cell_function
participant gf_cell as gf_cell_decorator
participant Component as gf_Component
Designer->>cspdk_cells: call straight(...)
activate cspdk_cells
cspdk_cells->>gf_cell: decorator wraps function with tags={type: filename}
activate gf_cell
gf_cell-->>cspdk_cells: return wrapped_cell
deactivate gf_cell
cspdk_cells->>wrapped_cell: execute wrapped_cell(...)
activate wrapped_cell
wrapped_cell->>Component: create Component
activate Component
Component-->>wrapped_cell: Component instance
deactivate Component
wrapped_cell-->>Designer: Component (metadata.tags.type = waveguides|couplers|...)
deactivate wrapped_cell
deactivate cspdk_cells
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- To reduce repetition and make future updates easier, consider defining a module-level constant for the tag (e.g.
TAGS = {"type": "waveguides"}) and reusing it across all@gf.celldecorators in each file instead of inlining the same dict literal many times.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- To reduce repetition and make future updates easier, consider defining a module-level constant for the tag (e.g. `TAGS = {"type": "waveguides"}`) and reusing it across all `@gf.cell` decorators in each file instead of inlining the same dict literal many times.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Alex-l-r
left a comment
There was a problem hiding this comment.
LGTM - fixed cells update
Alex-l-r
left a comment
There was a problem hiding this comment.
DO NOT MERGE - Wrong tags format.
The current format uses a dictionary:
@gf.cell(tags={"type": "couplers"})The correct format should be a list:
@gf.cell(tags=["couplers"])Please update all tags={...} to tags=[...] across all files in this PR.
Alex-l-r
left a comment
There was a problem hiding this comment.
Tags format needs updating - currently uses a dictionary but should be a list.
Current:
@gf.cell(tags={"type": "couplers"})Should be:
@gf.cell(tags=["couplers"])Working on a fix commit now.
Change tags={"type": "..."} to tags=["..."] across all cell files.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
tags={"type": "<filename>"}to all@gf.celland@gf.cell_with_module_namedecoratorswaveguides.py→"waveguides",couplers.py→"couplers")Mirrors the change in gdsfactory: gdsfactory/gdsfactory@4c216c5ef
Test plan
make test🤖 Generated with Claude Code
Summary by Sourcery
New Features: