Skip to content

FIX: grpc materials fixed#1966

Merged
svandenb-dev merged 14 commits intomainfrom
issue#1963-material-falls-error-logged-with-grpc
Apr 2, 2026
Merged

FIX: grpc materials fixed#1966
svandenb-dev merged 14 commits intomainfrom
issue#1963-material-falls-error-logged-with-grpc

Conversation

@svandenb-dev
Copy link
Copy Markdown
Collaborator

This PR is resolving internal material properties failure. These errors were harmless but could lead to confusion. This was also pointed by users and adressing issue #1963.
grpc material has now safe guards with:

  • checking dielectric model are defined before accessing parameters
  • all material properties are present in material definition before accessing

closes #1963

@svandenb-dev svandenb-dev self-assigned this Mar 26, 2026
@github-actions github-actions bot added the testing Anything related to testing label Mar 26, 2026
@svandenb-dev svandenb-dev enabled auto-merge (squash) March 26, 2026 12:51
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 91.74312% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.65%. Comparing base (5cbae21) to head (6194dde).
⚠️ Report is 61 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1966      +/-   ##
==========================================
+ Coverage   70.20%   70.65%   +0.44%     
==========================================
  Files         261      263       +2     
  Lines       42416    43031     +615     
==========================================
+ Hits        29779    30402     +623     
+ Misses      12637    12629       -8     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@SMoraisAnsys SMoraisAnsys left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, I added minor comments.
Could you also clarify why you are returning None in some cases and 0 in others? Would it make sense to align the "strategy" to always return None if no value /model was defined ?

Comment thread src/pyedb/grpc/database/definition/materials.py Outdated
Comment thread src/pyedb/grpc/database/definition/materials.py Outdated
Comment thread src/pyedb/grpc/database/definition/materials.py
Comment thread src/pyedb/grpc/database/definition/materials.py Outdated
Comment thread src/pyedb/workflows/utilities/physical_merge.py Outdated
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
maxcapodi78
maxcapodi78 previously approved these changes Apr 1, 2026
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
Co-authored-by: Sébastien Morais <146729917+SMoraisAnsys@users.noreply.github.com>
@codacy-production
Copy link
Copy Markdown

codacy-production bot commented Apr 1, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

@svandenb-dev
Copy link
Copy Markdown
Collaborator Author

Thanks for the changes, I added minor comments. Could you also clarify why you are returning None in some cases and 0 in others? Would it make sense to align the "strategy" to always return None if no value /model was defined ?

Returning 0.0 is made to preserve DotNet and Config file compatibility with providing default value. Few properties are returning None since they are optional, I mean by optional not necessarily defined. Like dc_conductivity assumes dielectric model is defined prio accessing this attribute.

auto-merge was automatically disabled April 1, 2026 12:46

Pull request was closed

@svandenb-dev svandenb-dev reopened this Apr 1, 2026
@svandenb-dev svandenb-dev enabled auto-merge (squash) April 2, 2026 11:00
@svandenb-dev svandenb-dev merged commit fc0dea0 into main Apr 2, 2026
58 of 68 checks passed
@svandenb-dev svandenb-dev deleted the issue#1963-material-falls-error-logged-with-grpc branch April 2, 2026 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Anything related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spurious InvalidArgumentException('Illegal operation on a null object') When Setting Material Conductivity

5 participants