Repository navigation
Specify R as ohms - #12065
Specify R as ohms#12065
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
There was a problem hiding this comment.
Pull request overview
This PR addresses incorrect parsing of RKM-style resistor values (e.g. 10R, 4R7) by ensuring R is interpreted as resistance (ohms) rather than being misinterpreted by the underlying Pint parser.
Changes:
- Adds a custom unit mapping so
Ris treated as ohms in the unit registry. - Extends conversion unit tests to cover common
R-delimiter resistance inputs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/backend/InvenTree/InvenTree/conversion.py |
Updates Pint unit registry setup to interpret R as ohms for RKM resistance parsing. |
src/backend/InvenTree/InvenTree/tests.py |
Adds regression tests ensuring R-based resistance strings convert correctly to ohm. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (88.25%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #12065 +/- ##
==========================================
- Coverage 91.43% 88.84% -2.60%
==========================================
Files 975 975
Lines 52154 54490 +2336
==========================================
+ Hits 47688 48409 +721
- Misses 4466 6081 +1615
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
@matmair LMK if you are happy with this change |
|
certainly is more in line with user expectations |
* Specify R as ohms * Adjust comments
* Specify R as ohms * Adjust comments
Uh oh!
There was an error while loading. Please reload this page.