Skip to content

Conversation

@joamatab
Copy link
Contributor

@joamatab joamatab commented Nov 22, 2025

Summary by Sourcery

Simplify container utilities by reusing existing packing helpers and tightening type hints.

Enhancements:

  • Expose pack_doe and pack_doe_grid directly from the generic component library instead of maintaining local wrapper cells.
  • Clarify the add_pads_top route_width parameter typing by disallowing None values.

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 22, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Refactors DOE packing helpers to reuse the standard gdsfactory implementations instead of local wrappers, and slightly tightens the type signature for routing width parameters in pad-connection helpers.

Class diagram for DOE packing helpers and pad connection in containers module

classDiagram
class ContainersModule {
  +add_pads_top()
  +pack_doe
  +pack_doe_grid
}

class GdsfactoryCells {
  +pack_doe()
  +pack_doe_grid()
}

ContainersModule ..> GdsfactoryCells
Loading

File-Level Changes

Change Details Files
Expose gdsfactory DOE packing utilities directly and remove redundant local cell wrappers.
  • Introduce module-level aliases pack_doe and pack_doe_grid that reference gf.c.pack_doe and gf.c.pack_doe_grid respectively
  • Delete the local @gf.cell implementations of pack_doe and pack_doe_grid that proxied to gf.components.pack_doe and gf.components.pack_doe_grid
  • Rely on the imported gdsfactory cell implementations for DOE packing behavior and documentation instead of maintaining parallel code here
cspdk/si220/cband/cells/containers.py
Tighten the route_width parameter typing for top pad fanout helper to disallow None.
  • Change the type annotation of route_width in add_pads_top from float
list[float]

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions
Copy link

Label error. Requires at least 1 of: breaking, bug, github_actions, documentation, dependencies, enhancement, feature, maintenance, security, typing. Found:

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Changing route_width from float | list[float] | None to float | list[float] with default 0 alters the accepted types and may break callers that pass None, so consider either keeping None in the type or adding explicit handling for legacy None usage.
  • Replacing the local pack_doe/pack_doe_grid @gf.cell wrappers with direct aliases to gf.c.pack_doe/gf.c.pack_doe_grid may change cell naming/metadata and break code that relied on the previous cell definitions, so it’s worth verifying any existing call sites and, if needed, providing a deprecation layer.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Changing `route_width` from `float | list[float] | None` to `float | list[float]` with default `0` alters the accepted types and may break callers that pass `None`, so consider either keeping `None` in the type or adding explicit handling for legacy `None` usage.
- Replacing the local `pack_doe`/`pack_doe_grid` @gf.cell wrappers with direct aliases to `gf.c.pack_doe`/`gf.c.pack_doe_grid` may change cell naming/metadata and break code that relied on the previous cell definitions, so it’s worth verifying any existing call sites and, if needed, providing a deprecation layer.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@joamatab joamatab merged commit 4bf6b66 into main Nov 26, 2025
6 of 8 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.

2 participants