-
Notifications
You must be signed in to change notification settings - Fork 188
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
Improve layer stack #2726
Improve layer stack #2726
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: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
@@ -65,7 +69,7 @@ def to_3d( | |||
# print(layer, height, zmin, opacity, layer_view.visible) | |||
|
|||
if zmin is not None and layer_view.visible: | |||
for polygon in polygons: | |||
for polygon in layer_to_polygon[layer]: |
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.
issue (edge_case_not_handled): Check if 'layer_to_polygon' dictionary always contains all layers as keys to avoid KeyError.
@@ -94,6 +96,21 @@ def model_copy(self) -> LayerStack: | |||
"""Returns a copy of the LayerStack.""" | |||
return LayerStack.model_validate_json(self.model_dump_json()) | |||
|
|||
def pprint(self) -> None: |
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 'pprint' to a more descriptive method name indicating its specific functionality.
def pprint(self) -> None: | |
def print_layer_stack_table(self) -> None: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2726 +/- ##
==========================================
- Coverage 71.64% 71.60% -0.05%
==========================================
Files 367 367
Lines 23857 23875 +18
Branches 3889 3893 +4
==========================================
+ Hits 17092 17095 +3
- Misses 5638 5656 +18
+ Partials 1127 1124 -3 ☔ View full report in Codecov by Sentry. |
@doddgray