Skip to content

New test class for chroma/utils.py and update tests for ollama_chat_completion.py#3

Closed
gaudyb wants to merge 10 commits into
mainfrom
new_tests_classes
Closed

New test class for chroma/utils.py and update tests for ollama_chat_completion.py#3
gaudyb wants to merge 10 commits into
mainfrom
new_tests_classes

Conversation

@gaudyb

@gaudyb gaudyb commented Apr 29, 2025

Copy link
Copy Markdown
Owner

Motivation and Context

Improve code coverage for classes chroma/utils.py and ollama_chat_completion.py

Description

New tests added to ollama_chat_completion.py.
New test class called test_chroma_utils.py to test utils code.

Contribution Checklist

gaudyb and others added 10 commits April 28, 2025 17:27
…ep (microsoft#11518)

### Motivation and Context

Improve coverage for azure_cosmos_db_mongodb_collection and local_step
classes.

### Description

New test files:
- test_azure_cosmos_db_mongodb_collection.py
- test_local_step.py

### Contribution Checklist

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Co-authored-by: Gaudy Blanco <gaudy-microsoft@MacBook-Pro-m4-Gaudy-For-Work.local>
…icrosoft#11772)

### Motivation and Context

Core is very close to the code coverage threshold so excluding some
functions from code coverage

1. CaptureUsageDetails
2. CreatePluginFromPromptDirectory no longer a recommended pattern
3. MemoryBuilder and SemanticTextMemory are being deprecated

### Description

Before

![image](https://github.com/user-attachments/assets/49780beb-33b5-404e-95ec-cd4b6c52dab6)

After

![image](https://github.com/user-attachments/assets/d131ce1c-f91d-4600-b2be-5889f3b54234)

### Contribution Checklist

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

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄
### Motivation and Context

SK Python processes have been missing support to be able to serialize
and deserialize JSON state for a process and its steps. This PR brings
in the functionality to allow the developer to do so. The
`getting_started_with_processes` step03 has been update to reflect this
latest functionality. It is possible to dump a JSON state to a file, and
reload the state to continue running the process.

State metadata that handles the version for steps is managed via a
decorator:

```python
@kernel_process_step_metadata("CutFoodStep.V1")
class CutFoodStep(KernelProcessStep):
    class Functions(Enum):
        ChopFood = "ChopFood"
        SliceFood = "SliceFood"
```

If no decorator/state is supplied the step will be built with a default
state version of "v1" which aligns with .Net.

<!-- 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

Support state and versioning management for Python processes.
- Update samples to reflect changes.
- Closes microsoft#9584

<!-- 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
- [ ] I didn't break anyone 😄
### Motivation and Context

Bump Python version to 1.29.0 for a release.

<!-- 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

Bump Python version to 1.29.0 for a release.

<!-- 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 😄
### Motivation and Context

<!-- 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

<!-- 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: -->

- [ ] The code builds clean without any errors or warnings
- [ ] 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
- [ ] All unit tests pass, and I have added new tests where possible
- [ ] I didn't break anyone 😄

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: Shay Rojansky <roji@roji.org>
Co-authored-by: Evan Mattson <35585003+moonbox3@users.noreply.github.com>
Co-authored-by: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com>
Co-authored-by: Chris <66376200+crickman@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tao Chen <taochen@microsoft.com>
Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
Co-authored-by: Mark Wallace <127216156+markwallace-microsoft@users.noreply.github.com>
Co-authored-by: Estefanía Tenorio <8483207+esttenorio@users.noreply.github.com>
Co-authored-by: davidpene <d.c.pene@gmail.com>
Co-authored-by: ThDuquennoy <tduquennoy@chapsvision.com>
Co-authored-by: Thomas DUQUENNOY <Thomas.DUQUENNOY@sinequa.com>
Co-authored-by: Eduard van Valkenburg <eavanvalkenburg@users.noreply.github.com>
Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
Co-authored-by: Rob Emanuele <rdemanuele@gmail.com>
Co-authored-by: K. Andrew Parker <andrew+github@rationarium.org>
Co-authored-by: SergeyMenshykh <68852919+SergeyMenshykh@users.noreply.github.com>
Co-authored-by: jenfoxbot <jen.fox@microsoft.com>
Co-authored-by: Ben Thomas <ben.thomas@microsoft.com>
Co-authored-by: Ben Thomas <bentho@microsoft.com>
Co-authored-by: Adit Sheth <shethaadit@gmail.com>
Co-authored-by: Adit Sheth <adsheth@microsoft.com>
Co-authored-by: ふぁー <47295014+ymuichiro@users.noreply.github.com>
Co-authored-by: Vincent Biret <vibiret@microsoft.com>
Co-authored-by: David A. Torres <10944960+davidatorres@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: Atiqur Rahman Foyshal <113086917+atiq-bs23@users.noreply.github.com>
Co-authored-by: Md. Atiqur Rahman Foyshal <atiqur.foyshal@brainstation-23.com>
Co-authored-by: Fabian Williams <92543063+fabianwilliams@users.noreply.github.com>
Co-authored-by: fabian.williams@microsoft.com <fabianwilliams@users.noreply.github.com>
Co-authored-by: Ram.Type-0 <39725073+RamType0@users.noreply.github.com>
Co-authored-by: Tommy Falgout <tommy@lastcoolnameleft.com>
Co-authored-by: Gary Tang <113477176+gtang31-te@users.noreply.github.com>
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
Co-authored-by: Tommaso Stocchi <tstocchi@microsoft.com>
Co-authored-by: Chris Rickman <crickman@microsoft.com>
Co-authored-by: Devis Lucato <dluc@users.noreply.github.com>
Co-authored-by: K. Andrew Parker <kparker@citytech.cuny.edu>
Co-authored-by: Jose Luis Latorre Millas <joslat@gmail.com>
Co-authored-by: Carsten Lemm <clemm@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Musale Martin <martinmshale@gmail.com>
Co-authored-by: Ross Smith <ross-p-smith@users.noreply.github.com>
Co-authored-by: Adam Sitnik <adam.sitnik@gmail.com>
Co-authored-by: Rodrigo Martins Racanicci <59115712+rracanicci@users.noreply.github.com>
Co-authored-by: unsafecode <r.chiodaroli@live.com>
Co-authored-by: QuocDatHoang <dathq.vn@gmail.com>
Co-authored-by: Dat Hoang Quoc <DAT@jsworldmedia.com>
Co-authored-by: Damien Guard <damien@envytech.co.uk>
…I 3.0 (microsoft#11751)

### Motivation and Context

Similar to the StructuredOutput solution, this fix will now also cover
the Tool generation when the StructuredOutput feature is not used.

This change also brings a new Integration test to ensure the compatible
behavior as well as a sample inspired in the reproduction code in the
issue below.

- Fixes microsoft#11675
@gaudyb gaudyb requested a review from rracanicci April 29, 2025 20:14
@gaudyb gaudyb deployed to integration April 29, 2025 20:14 — with GitHub Actions Active
@gaudyb gaudyb closed this Apr 29, 2025
@gaudyb gaudyb deleted the new_tests_classes branch April 29, 2025 20:32
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