Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Fix pydantic alias issue #10027

Merged
merged 5 commits into from
Jan 5, 2025

Conversation

john0isaac
Copy link
Contributor

Motivation and Context

fix #10026

Description

This PR removes the alias as pydantic requires the usage of the alias when initializing the class not the original name which prevents this code from working.

cosmosdb_settings = AzureCosmosDBSettings.create(
                env_file_path=env_file_path,
                connection_string=cosmos_connstr,
            )

Contribution Checklist

This PR removes the alias as pydantic requires the usage of the alias when initializing the class not the original name which prevents this code from working.

```py
cosmosdb_settings = AzureCosmosDBSettings.create(
                env_file_path=env_file_path,
                connection_string=cosmos_connstr,
            )
```
@john0isaac john0isaac requested a review from a team as a code owner December 22, 2024 17:54
@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel memory labels Dec 22, 2024
@github-actions github-actions bot changed the title Fix pydantic alias issue Python: Fix pydantic alias issue Dec 22, 2024
@john0isaac
Copy link
Contributor Author

@eavanvalkenburg done, i tested it with my sample and it's working.

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.

Looks clean, thanks!

@eavanvalkenburg
Copy link
Member

There is a bug in a dependency, I've raised an issue for it: milvus-io/milvus-lite#242

@eavanvalkenburg
Copy link
Member

and also created a seperate PR for it, now just need to find some approvers!

@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jan 3, 2025

Python Test Coverage

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

Python Unit Test Overview

Tests Skipped Failures Errors Time
2995 4 💤 0 ❌ 0 🔥 1m 8s ⏱️

auto-merge was automatically disabled January 4, 2025 14:26

Head branch was pushed to by a user without write access

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jan 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 5, 2025
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jan 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 5, 2025
@john0isaac
Copy link
Contributor Author

@eavanvalkenburg I will debug it and let you know the issue.

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jan 5, 2025
@eavanvalkenburg
Copy link
Member

no need, we have some intergration tests that just fail randomly, so sometimes takes one or two attempts

@john0isaac
Copy link
Contributor Author

john0isaac commented Jan 5, 2025

I just noticed that it's a different test that fails each time 😆

Merged via the queue into microsoft:main with commit 6200d81 Jan 5, 2025
25 checks passed
@eavanvalkenburg
Copy link
Member

merged now! thanks!

@john0isaac john0isaac deleted the fix-mongo-settings branch January 5, 2025 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
memory python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python: Bug: Azure MongoDB Connector Assigning Pydantic Fields not by alias
4 participants