Skip to content

Conversation

adrianlasota
Copy link
Contributor

This pull request adds a new utility function to map Windows system information to a Windows version and introduces comprehensive unit tests for this functionality. The changes also include a minor import update to support the new logic.

New functionality for Windows version mapping:

  • Added a new function get_windows_version_from_system_info in utils.py to map a SystemInfo object (containing kernel version and OS name) to a WindowsFlavour enum, with error handling for unknown or invalid kernel versions.
  • Updated imports in utils.py to include SystemInfo for the new functionality.

Testing improvements:

  • Added unit tests in test_utils.py to cover all major code paths of get_windows_version_from_system_info, including successful mappings, invalid kernel versions, and unknown kernel versions.
  • Minor import addition in test_utils.py to support new tests.

@Copilot Copilot AI review requested due to automatic review settings September 11, 2025 14:00
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds a new utility function to map Windows system information to Windows flavors, extending the existing kernel-only mapping functionality to handle cases where multiple Windows flavors share the same kernel version.

  • Added get_windows_version_from_system_info function that uses both kernel version and OS name to determine Windows flavor
  • Updated imports to include SystemInfo class
  • Added comprehensive unit tests covering all code paths including success cases, invalid kernels, and unknown versions

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
mfd_typing/utils.py Added new function for system info mapping and updated imports
tests/unit/test_mfd_typing/test_utils.py Added unit tests for the new function covering all scenarios

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@adrianlasota adrianlasota force-pushed the windows_azure branch 2 times, most recently from 5306582 to 941e31a Compare September 11, 2025 14:11
mchromin
mchromin previously approved these changes Sep 15, 2025
… tests

Signed-off-by: Lasota, Adrian <adrian.lasota@intel.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Lasota, Adrian <adrian.lasota@intel.com>
@mfd-intel-bot
Copy link
Contributor

We don't publish DEVs .whl.
To build .whl, run 'pip install git+https://intel/mfd-typing@windows_azure'

@hcymerys hcymerys merged commit b5c58a9 into main Sep 16, 2025
23 checks passed
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.

6 participants