Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the straight dbu factory in the optical bundle routing #604

Closed
wants to merge 1 commit into from

Conversation

sebastian-goeldi
Copy link
Collaborator

@sebastian-goeldi sebastian-goeldi commented Feb 9, 2025

Summary by Sourcery

Bug Fixes:

  • Fixed a bug in the straight factory where the width and length were specified in DBUs instead of microns.

Copy link
Contributor

sourcery-ai bot commented Feb 9, 2025

Reviewer's Guide by Sourcery

This pull request modifies the optical bundle routing module by updating the straight_factory function to use a different unit conversion and adding explicit type casting for better type safety.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Updated the _straight_factory function to use micrometer conversion instead of DBU units and added explicit type casting.
  • Replaced the use of c.kcl.to_dbu with c.kcl.to_um for width and length conversions.
  • Applied a cast to the straight_factory method to ensure it conforms to the expected StraightFactoryUM type.
src/kfactory/routing/optical.py

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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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 github-actions bot added bug Something isn't working routing labels Feb 9, 2025
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.

We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.

Copy link

codecov bot commented Feb 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 65.94%. Comparing base (65696b7) to head (bc3dd8b).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
src/kfactory/routing/optical.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #604   +/-   ##
=======================================
  Coverage   65.94%   65.94%           
=======================================
  Files          64       64           
  Lines        9644     9644           
  Branches     1786     1786           
=======================================
  Hits         6360     6360           
  Misses       2761     2761           
  Partials      523      523           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working routing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant