Skip to content

Conversation

@moonbox3
Copy link
Collaborator

@moonbox3 moonbox3 commented Jul 8, 2024

Motivation and Context

We have mypy enabled on parts of the code base, but not all. The goal is to enable it across the entire SK python code. As part of this, we've broken up the work to tackle different sections. Additionally, we're working to improve the code coverage for these sections of code.

Description

This PR:

  • turns on mypy for the function choice behavior code. Code adjustments were made per mypy, with the exclusion of one place that contain a type: ignore as mypy claimed the function mapping couldn't execute properly, when it indeed can.
  • adds more unit test coverage for the function choice behavior and class and classmethods. There is 100% code coverage.
  • fixes a bug related to mapping the function call behavior required behavior to the new required behavior.
  • closes Python: CQ Spike: Function Choice Behavior #7137

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner July 8, 2024 18:22
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Jul 8, 2024
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jul 8, 2024

Py3.10 Test Coverage

Python 3.10 Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL666461491% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python 3.10 Unit Test Overview

Tests Skipped Failures Errors Time
1651 1 💤 0 ❌ 0 🔥 18.935s ⏱️

Copy link
Member

@eavanvalkenburg eavanvalkenburg left a comment

Choose a reason for hiding this comment

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

Another small note, and the rest looks good!

@moonbox3 moonbox3 added this pull request to the merge queue Jul 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Jul 9, 2024
@moonbox3 moonbox3 enabled auto-merge July 9, 2024 15:24
@moonbox3 moonbox3 added this pull request to the merge queue Jul 9, 2024
Merged via the queue into microsoft:main with commit 4e99b76 Jul 9, 2024
@moonbox3 moonbox3 deleted the fcb_code_quality branch July 9, 2024 15:48
LudoCorporateShark pushed a commit to LudoCorporateShark/semantic-kernel that referenced this pull request Aug 25, 2024
…age. (microsoft#7154)

### Motivation and Context

We have mypy enabled on parts of the code base, but not all. The goal is
to enable it across the entire SK python code. As part of this, we've
broken up the work to tackle different sections. Additionally, we're
working to improve the code coverage for these sections of code.

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->

### Description

This PR:
- turns on mypy for the function choice behavior code. Code adjustments
were made per mypy, with the exclusion of one place that contain a
`type: ignore` as mypy claimed the function mapping couldn't execute
properly, when it indeed can.
- adds more unit test coverage for the function choice behavior and
class and classmethods. There is 100% code coverage.
- fixes a bug related to mapping the function call behavior required
behavior to the new required behavior.
- closes microsoft#7137

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [X] The code builds clean without any errors or warnings
- [X] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [X] All unit tests pass, and I have added new tests where possible
- [X] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: CQ Spike: Function Choice Behavior

6 participants