-
Notifications
You must be signed in to change notification settings - Fork 24
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
Conversation
There was a problem hiding this 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
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() |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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.
"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", |
There was a problem hiding this comment.
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.
"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) |
Codecov ReportAttention: Patch coverage is
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. |
@tvt173