microsoft / microsoft/semantic-kernel
Add regression coverage for missing optional connector dependencies
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 28.6k
- Forks
- 4.8k
- Avg merge
- 14h 13m
- Merged PRs (30d)
- 18
Description
Summary
Add parameterized tests ensuring imports or construction of Python connectors with missing optional dependencies produce actionable errors naming the required install extra.
Current implementation facts
Python connectors rely on optional upstream packages and are installed through extras.
Problem
A missing SDK can currently surface as a generic ModuleNotFoundError without telling the user which Semantic Kernel extra to install. Even where messages exist, broad test coverage prevents them from drifting.
Scope
- Select representative connector modules using the established optional-import pattern.
- Simulate missing upstream packages.
- Assert the exception names the relevant install extra.
- Keep tests isolated from installed local extras.
Non-goals
- Do not eagerly import all connectors.
- Do not change dependency ranges.
Acceptance criteria
- Errors identify both the missing package and install extra.
- Tests require no provider credentials.
- Existing lazy-import behavior is preserved.
I searched Semantic Kernel issues and PRs for missing optional dependencies, connector import errors, and install-extra messages before filing this proposal.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Python connector modules that use the established optional-import pattern and any existing tests for missing dependencies. Parameterize representative cases, simulate absent upstream packages without relying on installed extras or credentials, and verify errors name both the missing package and required Semantic Kernel install extra while lazy imports remain intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100