Skip to content

Implement desktop environment detector (New)#1343

Merged
Hook25 merged 8 commits intomainfrom
detect-desktop-img
Jul 22, 2024
Merged

Implement desktop environment detector (New)#1343
Hook25 merged 8 commits intomainfrom
detect-desktop-img

Conversation

@tomli380576
Copy link
Copy Markdown
Contributor

Description

This PR adds a quick utility function to check if the machine has a desktop environment. It works by checking dpkg's existence and looking for the ubuntu-desktop and ubuntu-desktop-minial packages.

Resolved issues

Documentation

Tests

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 44.19%. Comparing base (9409c50) to head (f811fa8).
Report is 142 commits behind head on main.

Files with missing lines Patch % Lines
...-support/checkbox_support/scripts/image_checker.py 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1343      +/-   ##
==========================================
+ Coverage   44.18%   44.19%   +0.01%     
==========================================
  Files         359      359              
  Lines       38813    38826      +13     
  Branches     6581     6585       +4     
==========================================
+ Hits        17148    17161      +13     
+ Misses      21003    21002       -1     
- Partials      662      663       +1     
Flag Coverage Δ
checkbox-support 52.69% <93.33%> (+0.12%) ⬆️

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.

@tomli380576 tomli380576 requested review from LiaoU3, baconYao and seankingyang and removed request for LiaoU3 and seankingyang July 18, 2024 05:14
@tomli380576 tomli380576 marked this pull request as ready for review July 18, 2024 05:15
Copy link
Copy Markdown
Contributor

@baconYao baconYao left a comment

Choose a reason for hiding this comment

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

Please see my suggestions.

Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

See below, major is the resource one, is this intended?

@Hook25 Hook25 added the waiting-for-changes The review has been completed but the PR is waiting for changes from the author label Jul 18, 2024
@Hook25 Hook25 self-assigned this Jul 18, 2024
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 left a comment

Choose a reason for hiding this comment

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

+1, ty. well done!

@Hook25 Hook25 merged commit 56fe93b into main Jul 22, 2024
@Hook25 Hook25 deleted the detect-desktop-img branch July 22, 2024 08:35
pedro-avalos pushed a commit that referenced this pull request Jul 29, 2024
* feat: implement desktop environment detector

* fix: remove annotations that are not available in 3.5

* test: add unit tests for has_desktop_env

* fix: incorrect patch syntax

* test: increase test coverage

* fix: apply Patrick's suggestions

* fix: accept Massimiliano's suggestions

* test: update image_checker tests to reflect changes in source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-changes The review has been completed but the PR is waiting for changes from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants