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: Updates to user agent. Add unit tests. #6824

Merged
merged 6 commits into from
Jun 20, 2024

Conversation

moonbox3
Copy link
Contributor

@moonbox3 moonbox3 commented Jun 19, 2024

Motivation and Context

Updates to the User-Agent are required so that we can align with all three SK languages. Examples:

User agent

  • semantic-kernel-csharp/1.1.1 [existing user agent]
  • semantic-kernel-java/1.1.1 [existing user agent]
  • semantic-kernel-python/1.1.1 [existing user agent]

semantic-kernel-version header

  • csharp/1.1.1
  • java/1.1.1
  • python/1.1.1

Description

Updates to the user agent to reflect the desired changes/standardization across all SK languages. Adding unit tests.

  • Closes Python: Update User-Agent to align with other SK languages #6827
  • Moves the USER_AGENT const from its previous home in the openai const file to a more generic const file.
  • Updates unit tests to be able to run properly when a valid .env file exists in the current working directory. The unit tests patch the env vars and our current implementation of Pydantic Settings loads the .env file if not specified.

Contribution Checklist

@moonbox3 moonbox3 requested a review from a team as a code owner June 19, 2024 14:39
@markwallace-microsoft markwallace-microsoft added the python Pull requests for the Python Semantic Kernel label Jun 19, 2024
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Jun 19, 2024

Py3.10 Test Coverage

Python 3.10 Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel/connectors
   telemetry.py15287%17–18
semantic_kernel/connectors/ai/open_ai/services
   azure_config_base.py34488%75–77, 92
   open_ai_config_base.py32197%58
semantic_kernel/connectors/openapi_plugin
   openapi_runner.py996435%51–53, 59–60, 66–80, 84–100, 104–106, 110–112, 115–118, 127–169
TOTAL653275688% 

Python 3.10 Unit Test Overview

Tests Skipped Failures Errors Time
1526 1 💤 0 ❌ 0 🔥 25.468s ⏱️

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Jun 20, 2024
Merged via the queue into microsoft:main with commit 148e8de Jun 20, 2024
23 checks passed
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
Archived in project
Development

Successfully merging this pull request may close these issues.

Python: Update User-Agent to align with other SK languages
4 participants