Skip to content

Conversation

@joamatab
Copy link
Contributor

@joamatab joamatab commented Feb 10, 2026

  • add gdsfactoryplus
  • add_version
  • add_code_owners
  • update_gdsfactory9.34
  • update_gdsfactory_9.34
  • remove_required_label
  • remove_dependabot
  • add_agents
  • add_ports_for_tests

Summary by Sourcery

Add validation for optical port geometry in si220 cband tests and update repository code ownership configuration.

Tests:

  • Add a parametrized test ensuring optical ports align with corresponding waveguide edges and match the expected width across all si220 cband cells.

Chores:

  • Add or update CODEOWNERS configuration for repository code ownership.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 10, 2026

Reviewer's Guide

Adds a new regression test to validate optical port placement against drawn geometry for all parametrized cells, and updates repository ownership metadata in CODEOWNERS.

File-Level Changes

Change Details Files
Add regression test that verifies optical ports align with corresponding optical edges in cell geometry.
  • Introduce test_optical_port_positions parametrized over existing cell_names.
  • Normalize ComponentAllAngle instances into a flat Component and reattach ports before geometric checks.
  • Compute a small marker polygon at each optical port location, convert to database units, and intersect with the region of optical layer shapes.
  • Assert that at least one interacting edge exists for each optical port and that edge length matches the port width within a tight tolerance.
tests/test_si220_cband.py
Adjust repository code ownership configuration.
  • Update or add entries in CODEOWNERS to reflect new or changed code owners for the project.
.github/CODEOWNERS

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

Copy link
Contributor

@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 - I've left some high level feedback:

  • The conversion from edge length to microns uses a hard-coded 0.001 factor; consider computing the physical length using dbu_in_um (e.g. edge_length_um = port_edge.length() * dbu_in_um) to avoid assuming a specific database unit.
  • Within test_optical_port_positions, you are manually raising AssertionError instead of using plain assert statements; switching to assert will make the tests more idiomatic and produce clearer diffs/output in pytest.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The conversion from edge length to microns uses a hard-coded `0.001` factor; consider computing the physical length using `dbu_in_um` (e.g. `edge_length_um = port_edge.length() * dbu_in_um`) to avoid assuming a specific database unit.
- Within `test_optical_port_positions`, you are manually raising `AssertionError` instead of using plain `assert` statements; switching to `assert` will make the tests more idiomatic and produce clearer diffs/output in pytest.

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.

@ThomasPluck
Copy link
Contributor

Going to leave these alone until tests pass and ports are actually fixed

Copy link
Contributor

@ThomasPluck ThomasPluck left a comment

Choose a reason for hiding this comment

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

Fix ports

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