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

Update gdsfactory to latest version 7.23 #370

Merged
merged 4 commits into from
Apr 12, 2024
Merged

Conversation

joamatab
Copy link
Contributor

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 @joamatab - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟡 Testing: 2 issues found
  • 🟢 Complexity: all looks good
  • 🟢 Docstrings: all looks good

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 to tell me if it was helpful.

@@ -635,7 +611,7 @@ def dbr(

@gf.cell(post_process=(tech.add_pins_bbox_siepic,))
def coupler(**kwargs) -> gf.Component:
return gf.components.coupler(**kwargs)
return gf.components.coupler(**kwargs).flatten()
Copy link
Contributor

Choose a reason for hiding this comment

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

question (code_refinement): Use of .flatten() in component creation.

Confirm that flattening the component here is necessary, as it may impact the ability to edit or parameterize the component later.

@@ -648,12 +624,13 @@
return gf.components.mmi1x2(**kwargs)


@gf.cell
@cache
Copy link
Contributor

Choose a reason for hiding this comment

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

question (performance): Introduction of @cache decorator.

Verify that caching these components does not introduce state issues, especially in a multi-threaded environment.

@@ -167,17 +167,20 @@ def add_ports_from_siepic_pins(
)


@gf.cell(autoname=False, post_process=(add_ports_from_siepic_pins,))
@cache
Copy link
Contributor

Choose a reason for hiding this comment

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

question (performance): Use of @cache decorator in import_gds function.

Ensure caching is appropriate for the import_gds function, considering the potential for large GDS files and memory usage.

@@ -19,8 +19,10 @@
"dbr",
"dbg",
"import_gds",
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (testing): Consider adding a test case for import_gc.

Given the changes in import_gc function, it would be beneficial to ensure its behavior is correctly validated, especially considering the new error handling and port addition logic.

Suggested change
"import_gds",
def test_import_gc_behavior(data_regression, check, component_factory):
c = component_factory["import_gc"]()
n = c.get_netlist()
if check:
data_regression.check(n)

@@ -19,6 +19,7 @@
"add_pads",
"add_pins_bbox_siepic_remove_layers",
"import_gds",
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (testing): Please add a test case for import_gc.

The modifications to import_gc suggest new functionality has been added. Testing this directly would help ensure its reliability and correctness.

Suggested change
"import_gds",
"import_gds",
"import_gc",
"mzi",
}
# Assuming `import_gc` is the new functionality to be tested
if "import_gc" in cell_names:
test_import_gc() # This is a placeholder for the actual test function for import_gc
cell_names = set(cells.keys()) - set(skip_test)

@joamatab joamatab added the enhancement New feature or request label Apr 12, 2024
Copy link

codecov bot commented Apr 12, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 68.80%. Comparing base (9759b34) to head (d538231).
Report is 6 commits behind head on main.

Files Patch % Lines
ubcpdk/import_gds.py 54.54% 5 Missing ⚠️
ubcpdk/__init__.py 62.50% 3 Missing ⚠️
ubcpdk/components.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
- Coverage   68.83%   68.80%   -0.03%     
==========================================
  Files          19       19              
  Lines         770      763       -7     
==========================================
- Hits          530      525       -5     
+ Misses        240      238       -2     

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

@joamatab joamatab merged commit 64575f5 into main Apr 12, 2024
8 of 9 checks passed
@joamatab joamatab deleted the update_gdsfactory723 branch April 12, 2024 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant