Open
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: