-
Notifications
You must be signed in to change notification settings - Fork 35
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
tcad scripts #382
tcad scripts #382
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 @simbilod - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 4 issues found
- 🟢 Security: all looks good
- 🟡 Testing: 6 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.
def cleanup_component_layermap(component, layermap, round_tol=2, simplify_tol=1e-2): | ||
"""Process component polygons before processing. | ||
|
||
Uses layermap (design layers) names. | ||
""" | ||
layer_dict = vars(layermap) | ||
|
||
return { | ||
layer: fuse_polygons( | ||
component, | ||
layername, | ||
layer, | ||
round_tol=round_tol, | ||
simplify_tol=simplify_tol, | ||
) | ||
for layername, layer in layer_dict.items() | ||
} |
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 (code_refinement): Consider renaming cleanup_component_layermap
to reflect its specific functionality.
The function name could be more descriptive regarding its operation on layer maps specifically, which might help in distinguishing it from other cleanup functions.
import math | ||
import pathlib |
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.
nitpick (code_refinement): Review the necessity of importing pathlib
directly if Path
is already imported.
Since Path
is imported from pathlib
, ensure that the direct import of pathlib
is necessary, or consider removing it if not used.
import pathlib | ||
from pathlib import Path |
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.
nitpick (code_refinement): Redundant import of pathlib
when Path
is used.
Consider removing the import of pathlib
since Path
is specifically imported and used.
@@ -0,0 +1,646 @@ | |||
import math |
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): Missing test cases for the initialize_sprocess
function.
Please add unit tests to verify the correct initialization of the sprocess file, including checks for correct handling of default values and boundary conditions.
@@ -0,0 +1,646 @@ | |||
import math |
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): Missing test cases for the write_sprocess
function.
Please ensure there are tests to validate the output of the write_sprocess
function, including the correct generation of the command file and handling of different process steps.
@@ -0,0 +1,468 @@ | |||
import math |
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): Missing test cases for the initialize_sde
function.
It's crucial to add tests that verify the geometry definitions and initial conditions set by the initialize_sde
function are correct.
@@ -0,0 +1,468 @@ | |||
import math |
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): Missing test cases for the write_sde
function.
Please add tests to ensure that the write_sde
function correctly writes the Scheme file based on the provided component and process parameters.
@@ -0,0 +1,297 @@ | |||
import pathlib |
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): Missing test cases for the write_sdevice_quasistationary_ramp_voltage_dd
function.
Tests should verify that the function correctly sets up the device simulation with the specified ramp voltage parameters.
import pathlib | |
import unittest | |
class TestDeviceSimulation(unittest.TestCase): | |
def test_ramp_voltage_parameters(self): | |
expected_final_voltage = 1.0 | |
ramp_voltage_simulation = write_sdevice_quasistationary_ramp_voltage_dd(ramp_final_voltage=expected_final_voltage) | |
self.assertEqual(ramp_voltage_simulation.ramp_final_voltage, expected_final_voltage) | |
if __name__ == '__main__': | |
unittest.main() |
@@ -0,0 +1,297 @@ | |||
import pathlib |
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): Missing test cases for the write_sdevice_ssac_ramp_voltage_dd
function.
Ensure there are tests to check the correct setup of the SSAC ramp voltage simulation, including the handling of different contacts and voltage settings.
import pathlib | |
import unittest | |
class TestSSACRampVoltageSimulation(unittest.TestCase): | |
def test_correct_setup(self): | |
# Setup test environment | |
# Execute the simulation with different contacts and voltage settings | |
# Assert the expected outcomes | |
if __name__ == '__main__': | |
unittest.main() |
import math | ||
import pathlib |
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.
nitpick (code_refinement): Check for potential redundancy in math
and pathlib
imports.
Verify if both math
and pathlib
are utilized within the module, or if any can be omitted to streamline the import statements.
generic scripts to generate Sentaurus simulation command files from gdsfactory primitives
writes:
There is no execution of the simulation, this only helps with writing input files. There will be no tests. Comes as-is with no guarantees :)