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: upgraded all files to 310 plus format and removed from future #6353

Merged
merged 1 commit into from
May 21, 2024

Conversation

eavanvalkenburg
Copy link
Member

Motivation and Context

Now that we only support 310 and up, we could unify all files, to use the new style typing and annotations.

Description

Contribution Checklist

@eavanvalkenburg eavanvalkenburg requested a review from a team as a code owner May 21, 2024 14:12
@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel memory labels May 21, 2024
@markwallace-microsoft
Copy link
Member

Py3.10 Test Coverage

Python 3.10 Test Coverage Report •
FileStmtsMissCoverMissing
semantic_kernel
   kernel.py2625081%122, 124, 190, 197–206, 236, 246–254, 326–362, 432–433, 660, 681–683, 719, 721, 731
   kernel_pydantic.py9189%6
semantic_kernel/connectors/ai/google_palm
   gp_prompt_execution_settings.py29293%43–44
semantic_kernel/connectors/ai/google_palm/services
   gp_chat_completion.py701776%56–57, 148–153, 164–165, 214, 217, 220–221, 229, 233–234, 242
   gp_text_completion.py41783%38–39, 70–71, 77–78, 107
   gp_text_embedding.py34682%36–37, 63–64, 73–74
semantic_kernel/connectors/ai/hugging_face
   hf_prompt_execution_settings.py19190%1–36
semantic_kernel/connectors/ai/hugging_face/services
   hf_text_completion.py42420%3–149
   hf_text_embedding.py23230%3–62
semantic_kernel/connectors/ai/ollama/services
   ollama_chat_completion.py70691%57, 93, 113, 131, 164, 183
   ollama_text_completion.py42198%93
semantic_kernel/connectors/ai/open_ai/prompt_execution_settings
   azure_chat_prompt_execution_settings.py63198%96
semantic_kernel/connectors/ai/open_ai/services
   azure_chat_completion.py933463%148, 154–155, 164–165, 170–187, 191–198, 210–221
   azure_config_base.py34488%73–75, 90
   open_ai_chat_completion.py24292%58–59
   open_ai_chat_completion_base.py2119356%97, 117, 142–146, 170, 174, 190–195, 212–240, 243–254, 272–279, 290–298, 314–321, 342, 350, 356–362, 374–380, 411, 450, 452–453, 458–463, 467–474, 496, 505–514
   open_ai_handler.py46491%72–73, 85–86
   open_ai_text_completion.py25388%56–57, 86
   open_ai_text_completion_base.py592656%65–68, 91–108, 114–117, 136, 144
   open_ai_text_embedding.py24388%57–58, 87
   open_ai_text_embedding_base.py21195%47
semantic_kernel/connectors/openai_plugin
   openai_utils.py181044%20–31
semantic_kernel/connectors/openapi_plugin
   openapi_function_execution_parameters.py26196%36
   openapi_manager.py34514059%105–111, 114–131, 134–136, 139–152, 155–166, 169–181, 208, 224, 237, 271, 276, 280, 356, 379, 382, 411, 479, 482–483, 491–492, 518–520, 526–527, 533–547, 551–567, 570–572, 575–577, 585–628, 691–724
semantic_kernel/connectors/search_engine
   bing_connector.py41410%3–85
   connector.py330%3–7
   google_connector.py39390%3–77
semantic_kernel/connectors/utils
   document_loader.py16194%26
semantic_kernel/contents
   function_call_content.py69593%39, 46, 48, 95, 102
   function_result_content.py581279%51, 56, 66, 81, 93, 107, 112, 119–123
   streaming_chat_message_content.py84298%193–194
   text_content.py23291%41, 48
semantic_kernel/core_plugins
   conversation_summary_plugin.py20955%8, 47–48, 75–84
   http_plugin.py43491%12, 67, 90, 109
   math_plugin.py23196%7
   text_memory_plugin.py32875%12, 39, 69–79, 102
   wait_plugin.py18194%12
   web_search_engine_plugin.py13377%7, 32, 50
semantic_kernel/core_plugins/sessions_python_tool
   sessions_python_plugin.py1031486%57–59, 79, 82, 88–94, 134, 180, 184
   sessions_python_settings.py32197%59
semantic_kernel/functions
   function_result.py31971%46, 48–49, 59–64
   kernel_arguments.py14193%36
   kernel_function.py83298%146, 166
   kernel_function_decorator.py85594%56–57, 97–98, 123
   kernel_function_from_method.py85693%128, 147–148, 154, 157–158
   kernel_function_from_prompt.py157796%149–150, 171, 191, 216, 237, 317
   kernel_plugin.py190299%481, 484
semantic_kernel/memory
   memory_query_result.py26965%47–54, 70
   memory_record.py491765%49–57, 79, 111, 124, 128, 132, 136, 140, 144
   memory_store_base.py13377%15, 18, 22
   null_memory.py17571%21, 33, 37, 47, 51
   semantic_text_memory.py371949%32–34, 57–69, 94–106, 122–123, 146–155, 163
   volatile_memory_store.py1006337%34–37, 47, 58–59, 70, 82–87, 99–105, 118–130, 145–155, 167–173, 185–190, 210, 238–281
semantic_kernel/planners
   plan.py2344680%48, 151–155, 187, 202–212, 246, 250, 258–259, 269–272, 287, 292–295, 310, 313–318, 336, 341, 344, 346, 353, 366–368, 373–377
semantic_kernel/planners/function_calling_stepwise_planner
   function_calling_stepwise_planner.py1104262%126–213, 247–252
   function_calling_stepwise_planner_result.py16288%9, 29
semantic_kernel/planners/sequential_planner
   sequential_planner.py66691%70, 74, 105, 121, 130–131
   sequential_planner_extensions.py51982%28–29, 50, 101–115
   sequential_planner_parser.py771284%63–72, 92, 115–118
semantic_kernel/prompt_template
   prompt_template_config.py52688%46, 61, 69, 90, 93–94
semantic_kernel/prompt_template/utils
   handlebars_system_helpers.py93397%16, 43–44
   jinja2_system_helpers.py48394%15, 45, 50
   template_function_helpers.py31197%35
semantic_kernel/reliability
   pass_through_without_retry.py13562%26–30
semantic_kernel/schema
   kernel_json_schema_builder.py45296%32, 57
semantic_kernel/services
   ai_service_client_base.py20195%10
   ai_service_selector.py24196%51
semantic_kernel/template_engine/blocks
   code_block.py71199%131
   var_block.py37295%79–80
semantic_kernel/text
   text_chunker.py113496%208, 231, 248, 308
semantic_kernel/utils
   validation.py221245%30–34, 52–56, 74–78
TOTAL6288104183% 

Python 3.10 Unit Test Overview

Tests Skipped Failures Errors Time
1341 1 💤 0 ❌ 0 🔥 12.230s ⏱️

@moonbox3 moonbox3 added this pull request to the merge queue May 21, 2024
Merged via the queue into microsoft:main with commit 81cdde2 May 21, 2024
27 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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants