Skip to content

Conversation

@Hook25
Copy link
Collaborator

@Hook25 Hook25 commented Jul 25, 2025

Description

In many resource expression there is a duplicated array that is periodically updated to include new items as laptop like or dektop like. This adds a new key to the resource and uses that instead so that updates are way easier to maintain.

Resolved issues

N/A

Documentation

Added an explanation docstring to say why this is done

Tests

N/A

Please while reviewing this be very carefult that I actually succesfully moved desktops to non-portal and laptops to portable

@codecov
Copy link

codecov bot commented Jul 25, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.94%. Comparing base (881c0f3) to head (edacac1).
⚠️ Report is 107 commits behind head on main.

Files with missing lines Patch % Lines
providers/resource/bin/dmi_resource.py 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2046      +/-   ##
==========================================
+ Coverage   51.55%   51.94%   +0.39%     
==========================================
  Files         385      388       +3     
  Lines       41439    41766     +327     
  Branches     7697     7754      +57     
==========================================
+ Hits        21363    21697     +334     
+ Misses      19315    19300      -15     
- Partials      761      769       +8     
Flag Coverage Δ
provider-base 28.02% <ø> (+1.47%) ⬆️
provider-resource 39.38% <70.00%> (+1.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@fernando79513 fernando79513 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 change.
I checked in my laptop and seems to be detected correctly.
The change is simple enough that I don't think further on testing on real devices is required.
Nevertheless, I think you should add some unit tests for this parsing using the previous fields:
'Notebook','Laptop','Portable','All In One','All-In-One','AIO','Convertible', 'Tablet', 'Detachable' -> "portable"
'Desktop','Low Profile Desktop','Tower','Mini Tower','Space-saving', 'Mini PC' -> not-portable

Copy link
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

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

LGTM +1!

@fernando79513 fernando79513 merged commit a2dbffd into main Aug 8, 2025
31 of 32 checks passed
@fernando79513 fernando79513 deleted the dmi_decode_sanity branch August 8, 2025 14:08
stanley31huang pushed a commit that referenced this pull request Aug 14, 2025
* Add sane_product key

* Move all hardcoded consts to new sane_product

* Test sane_product translator

* Also test the unknown
bladernr pushed a commit that referenced this pull request Aug 28, 2025
* Add sane_product key

* Move all hardcoded consts to new sane_product

* Test sane_product translator

* Also test the unknown
stanley31huang pushed a commit that referenced this pull request Oct 3, 2025
* Add sane_product key

* Move all hardcoded consts to new sane_product

* Test sane_product translator

* Also test the unknown
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants