Skip to content

Conversation

@joamatab
Copy link
Contributor

@joamatab joamatab commented Dec 18, 2024

why does route_width gets ignored here?

@sebastian-goeldi

Summary by Sourcery

Improve the sample component YAML file by adjusting placement coordinates and routing settings, and comment out the gdsfactory dependency in the project configuration.

Enhancements:

  • Update component placement coordinates in the sample YAML file for better layout configuration.
  • Modify routing settings in the sample YAML file, including route width and radius adjustments.

Chores:

  • Comment out the gdsfactory dependency in the pyproject.toml file.

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 18, 2024

Reviewer's Guide by Sourcery

This PR modifies a YAML-based component sample by updating pad placements, adjusting routing parameters, removing optical routes, and making PDK activation explicit. It also comments out a specific gdsfactory version dependency.

Sequence diagram for PDK activation and component display

sequenceDiagram
    participant User
    participant Script
    participant PDK
    participant GDSFactory

    User->>Script: Run component_from_yaml_sc.py
    Script->>PDK: Activate PDK
    PDK-->>Script: PDK activated
    Script->>GDSFactory: Read component from YAML
    GDSFactory-->>Script: Component created
    Script->>User: Display component
Loading

Class diagram for updated component_from_yaml_sc.py

classDiagram
    class ComponentFromYaml {
        -name: String
        -instances: List
        -placements: List
        -routes: List
    }

    class Placement {
        -x: Integer
        -y: Integer
    }

    class Route {
        -settings: Settings
        -links: List
    }

    class Settings {
        -cross_section: String
        -separation: Integer
        -route_width: Integer
        -end_straight_length: Integer
        -radius: Integer
    }

    ComponentFromYaml --> Placement
    ComponentFromYaml --> Route
    Route --> Settings

    note for Settings "Updated attributes: route_width, radius"
Loading

File-Level Changes

Change Details Files
Modified pad placements and routing configuration in the YAML sample
  • Removed explicit PDK specification from YAML
  • Updated pad placement coordinates for better spacing
  • Changed routing width parameter from 'width: 10' to 'route_width: 5'
  • Added radius parameter to routing settings
  • Removed optical routing section
cspdk/si220/samples/component_from_yaml_sc.py
Added explicit PDK activation in the sample script
  • Imported PDK from cspdk.si220
  • Added PDK.activate() call before component creation
cspdk/si220/samples/component_from_yaml_sc.py
Modified project dependencies
  • Commented out specific gdsfactory version requirement
pyproject.toml

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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

@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.

@sebastian-goeldi
Copy link

Did you try a debugger? My guess is somewhere in gdsfactory it's not properly passed. But I can check tomorrow.

@joamatab
Copy link
Contributor Author

I traced the issue all the way into kfactory

@sebastian-goeldi
Copy link

should be fixed with kfactory 0.22.0

route width was not correctly passed on

@joamatab joamatab merged commit a59ecfe into main Dec 25, 2024
4 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.

3 participants