ansys / pyacp

Python Client for Ansys Composite PrepPost
https://acp.docs.pyansys.com
MIT License
5 stars 1 forks source link

Improve errors on wrong type in LinkedObjectList #656

Closed greschd closed 2 weeks ago

greschd commented 2 weeks ago

Add explicit checks for the type of the objects being added to a LinkedObjectList, and raise a TypeError if the type is incorrect.

Previously the backend error message was raised as RuntimeError, which is difficult to understand for the user.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.54%. Comparing base (702df6c) to head (8ee9493). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #656 +/- ## ========================================== + Coverage 94.53% 94.54% +0.01% ========================================== Files 100 100 Lines 5451 5464 +13 ========================================== + Hits 5153 5166 +13 Misses 298 298 ``` | [Flag](https://app.codecov.io/gh/ansys/pyacp/pull/656/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansys) | Coverage Δ | | |---|---|---| | [python-3.10](https://app.codecov.io/gh/ansys/pyacp/pull/656/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansys) | `94.43% <100.00%> (+0.01%)` | :arrow_up: | | [python-3.11](https://app.codecov.io/gh/ansys/pyacp/pull/656/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansys) | `94.36% <100.00%> (+0.01%)` | :arrow_up: | | [python-3.12](https://app.codecov.io/gh/ansys/pyacp/pull/656/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansys) | `94.47% <100.00%> (+0.01%)` | :arrow_up: | | [server-2024R2](https://app.codecov.io/gh/ansys/pyacp/pull/656/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansys) | `91.14% <100.00%> (+0.02%)` | :arrow_up: | | [server-2025R1](https://app.codecov.io/gh/ansys/pyacp/pull/656/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansys) | `94.36% <100.00%> (+0.01%)` | :arrow_up: | | [server-latest](https://app.codecov.io/gh/ansys/pyacp/pull/656/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansys) | `94.43% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ansys#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.