From ca395cc9a8aa626596f33b3fec1ec69a9dc5709c Mon Sep 17 00:00:00 2001 From: daquintero Date: Thu, 31 Oct 2024 16:17:34 +0100 Subject: [PATCH 1/2] :wrench: Extend compatibility with recursive netlists --- README.md | 2 +- gdsfactory/get_netlist.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6e3a20324..ccbfd7104 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ![logo](https://i.imgur.com/cN1ZWq8.png) -> **⚠️ Deprecation Warning:** +> **⚠️ Deprecation Warning:** > This version of gdsfactory will only have bug fixes and minor updates. Please see [https://github.com/gdsfactory/gdsfactory](https://github.com/gdsfactory/gdsfactory) for the latest version. gdsfactory: An open source platform for end to-end chip design and validation. diff --git a/gdsfactory/get_netlist.py b/gdsfactory/get_netlist.py index d393267ff..b0a5d3924 100644 --- a/gdsfactory/get_netlist.py +++ b/gdsfactory/get_netlist.py @@ -112,6 +112,7 @@ def get_netlist( get_instance_name: Callable[..., str] = get_instance_name_from_alias, allow_multiple: bool = False, merge_info: bool = False, + extend_recursive_port_names: bool = False, ) -> dict[str, Any]: """Returns instances, connections and placements from :class:`Component` as a dict. @@ -144,6 +145,7 @@ def get_netlist( allow_multiple: False to raise an error if more than two ports share the same connection. \ if True, will return key: [value] pairs with [value] a list of all connected instances. merge_info: True to merge info and settings into the same dict. + extend_recursive_port_names: Compatibility with recursive get_netlist port name identifiers. Returns: Dictionary containing the following: @@ -236,7 +238,12 @@ def get_netlist( # a bit of a hack... get the top-level port for the # ComponentArray, by our known naming convention. I hope no one # renames these ports! - parent_port = component[top_name] + if extend_recursive_port_names: + parent_port = component[ + parent_port_name + ] # otherwise links to non existent component ports + else: + parent_port = component[top_name] name2port[lower_name] = parent_port top_ports_list.add(top_name) ports_by_type[parent_port.port_type].append(lower_name) From 196cca59211b4b0ae98980b7cd64ba0d99acd74c Mon Sep 17 00:00:00 2001 From: Joaquin Matres <4514346+joamatab@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:13:08 -0700 Subject: [PATCH 2/2] fix cicd --- .github/workflows/test_pdks.yml | 41 --------------------------------- README.md | 2 +- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 .github/workflows/test_pdks.yml diff --git a/.github/workflows/test_pdks.yml b/.github/workflows/test_pdks.yml deleted file mode 100644 index 036d139c1..000000000 --- a/.github/workflows/test_pdks.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Test PDKs - -on: - pull_request: - push: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - test: - runs-on: ubuntu-latest - container: ghcr.io/gdsfactory/gdsfactory7:main - strategy: - fail-fast: false - matrix: - repo: - - { owner: "gdsfactory", repo: "cspdk" } - - { owner: "gdsfactory", repo: "skywater130" } - - { owner: "gdsfactory", repo: "ubc" } - - steps: - - name: Checkout this repository - uses: actions/checkout@v4 - - - name: Checkout other repository - uses: actions/checkout@v4 - with: - repository: ${{ matrix.repo.owner }}/${{ matrix.repo.repo }} - path: other-repo - - - name: Run tests - run: | - ls other-repo - pip install -e other-repo - pip install -e . - cd other-repo - pytest diff --git a/README.md b/README.md index ccbfd7104..021a6aac9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# gdsfactory 7.27.1 +# gdsfactory 7.27.2 [![docs](https://github.com/gdsfactory/gdsfactory/actions/workflows/pages.yml/badge.svg)](https://gdsfactory.github.io/gdsfactory/) [![PyPI](https://img.shields.io/pypi/v/gdsfactory)](https://pypi.org/project/gdsfactory/)