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

upgrade to gdsfactory9 #104

Merged
merged 3 commits into from
Feb 23, 2025
Merged

upgrade to gdsfactory9 #104

merged 3 commits into from
Feb 23, 2025

Conversation

MatthewMckee4
Copy link
Member

@MatthewMckee4 MatthewMckee4 commented Feb 23, 2025

Summary by Sourcery

Refactor the code to use column_pitch and row_pitch instead of spacing for placing references in arrays. Update the build system to use uv instead of pip for dependency management. Update the CI configuration to use uv for dependency management and to test the code on Python 3.11, 3.12 and 3.13.

Enhancements:

  • Refactor the code to use column_pitch and row_pitch instead of spacing for placing references in arrays, improving code readability and maintainability.
  • Update gdsfactory dependency to version 9.0.1.

Build:

  • Update the build system to use uv instead of pip for dependency management, improving build speed and reliability.

CI:

  • Update the CI configuration to use uv for dependency management, improving CI build speed and reliability.
  • Update the CI configuration to test the code on Python 3.11, 3.12 and 3.13.
  • Use pre-commit GitHub Action for running pre-commit hooks.

Copy link

sourcery-ai bot commented Feb 23, 2025

Reviewer's Guide by Sourcery

This pull request migrates the code to use column_pitch and row_pitch instead of spacing for component placement, updates the development dependencies and testing framework, and modifies the post_process argument in gf.import_gds to accept a list of functions.

Updated class diagram for component placement

classDiagram
    class Component {
        +add_ref(component, rows, columns, column_pitch, row_pitch)
    }
    note for Component "Replaced spacing with column_pitch and row_pitch"
Loading

Updated class diagram for gf.import_gds

classDiagram
    class gf.import_gds {
        +post_process: List[Callable]
    }
    note for gf.import_gds "post_process now accepts a list of functions"
Loading

File-Level Changes

Change Details Files
Replaced the spacing argument with column_pitch and row_pitch in multiple instances of c.add_ref calls. This change aims to provide more explicit control over the arrangement of referenced components, enhancing the precision of component placement.
  • Replaced spacing with column_pitch and row_pitch in nmos.py.
  • Replaced spacing with column_pitch and row_pitch in pmos.py.
  • Replaced spacing with column_pitch and row_pitch in nmos_5v.py.
  • Replaced spacing with column_pitch and row_pitch in pmos_5v.py.
  • Replaced spacing with column_pitch and row_pitch in npn_W1L1.py.
  • Replaced spacing with column_pitch and row_pitch in npn_W1L2.py.
  • Replaced spacing with column_pitch and row_pitch in pnp.py.
  • Replaced spacing with column_pitch and row_pitch in p_n_poly.py.
  • Replaced spacing with column_pitch and row_pitch in p_p_poly.py.
  • Replaced spacing with column_pitch and row_pitch in mimcap_1.py.
  • Replaced spacing with column_pitch and row_pitch in mimcap_2.py.
  • Replaced spacing with column_pitch and row_pitch in via_generator.py.
  • Replaced spacing with column_pitch and row_pitch in nmos.py.
sky130/pcells/nmos.py
sky130/pcells/pmos.py
sky130/pcells/nmos_5v.py
sky130/pcells/pmos_5v.py
sky130/pcells/npn_W1L1.py
sky130/pcells/npn_W1L2.py
sky130/pcells/pnp.py
sky130/pcells/p_n_poly.py
sky130/pcells/p_p_poly.py
sky130/pcells/mimcap_1.py
sky130/pcells/mimcap_2.py
sky130/pcells/via_generator.py
sky130/nmos.py
Updated the development dependencies and testing framework.
  • Replaced pip with uv for dependency management in Makefile.
  • Added pytest-randomly and pytest-xdist to the dev dependencies in pyproject.toml.
  • Updated gdsfactory dependency to version 9.0.1 in pyproject.toml.
  • Set requires-python to 3.11 in pyproject.toml.
  • Removed python-version from pre-commit job in .github/workflows/test_code.yml.
  • Added test job with a matrix strategy for different Python versions and operating systems in .github/workflows/test_code.yml.
  • Replaced make install with uv sync --all-extras in .github/workflows/test_code.yml.
  • Removed layers.py.
Makefile
pyproject.toml
.github/workflows/test_code.yml
sky130/layers.py
Modified the post_process argument in gf.import_gds to accept a list of functions.
  • Changed post_process=add_ports to post_process=[add_ports] in sky130/components.py.
sky130/components.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

@MatthewMckee4 MatthewMckee4 added the dependencies Pull requests that update a dependency file label Feb 23, 2025
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.

@joamatab joamatab merged commit 5b93d7a into main Feb 23, 2025
7 checks passed
@joamatab joamatab deleted the upgrade-gdsfactory9 branch February 23, 2025 04:13
@joamatab joamatab added the enhancement New feature or request label Feb 26, 2025
@joamatab joamatab changed the title Migrate code upgrade to gdsfactory9 Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants