Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive pytest coverage for platform-specific dependencies, cleans up unused imports, and expands the pybind README with architecture and dependency details.
- Introduce
tests/test_000_dependencies.pyto validate platform detection, dependency files, extension loading, and runtime compatibility. - Remove unused
ddbc_bindingsimport fromtests/conftest.py. - Enhance
mssql_python/pybind/README.mdwith key architecture handling and a detailed dependency directory structure.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_000_dependencies.py | New end-to-end tests for dependency presence, sizes, and imports |
| tests/conftest.py | Removed unused ddbc_bindings import |
| mssql_python/pybind/README.md | Expanded with architecture normalization, build summaries, and dependency matrix |
Comments suppressed due to low confidence (3)
tests/test_000_dependencies.py:270
- This test only asserts the presence of the Linux distribution directory. To fully validate dependencies, extend it to check for the expected
.sofiles within thelibsubdirectory for each architecture.
distro_path = dependency_tester.module_dir / "libs" / "linux" / distro_name
mssql_python/pybind/README.md:85
- There's currently no section covering build instructions on Linux. Consider adding a "## Building on Linux" section with distribution-aware CMake commands and path setup to guide developers through Linux builds.
## Architecture Dependencies Summary
tests/test_000_dependencies.py:336
- The
pytest_runtest_setuphook comparesitem.namedirectly to"test_platform_detection", but pytest may include the class name or different naming conventions. Useitem.originalnameoritem.name.startswith("test_platform_detection")for a more reliable match.
if item.name == "test_platform_detection":
gargsaumya
approved these changes
Jul 17, 2025
jahnvi480
approved these changes
Jul 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADO Work Item Reference
Summary
This pull request introduces significant updates to the
mssql_pythonpackage, focusing on architecture-specific dependency handling, documentation improvements, and comprehensive testing. Key changes include enhancements to the README for better clarity on platform-specific builds, removal of unused imports, and the addition of a new test file to validate dependencies across platforms.Documentation Updates:
mssql_python/pybind/README.md: Expanded documentation to include platform-specific architecture handling, runtime loading mechanisms, and dependency summaries for Windows, macOS, and Linux. Added detailed directory structure and naming conventions for Python extension modules. [1] [2] [3]Code Cleanup:
tests/conftest.py: Removed unusedddbc_bindingsimport to streamline the test configuration file.Testing Enhancements:
tests/test_000_dependencies.py: Added a new test file to validate platform-specific dependencies, architecture normalization, and runtime compatibility. Includes helper functions for detecting Linux distributions and verifying dependency files and Python extension modules.