Skip to content

Conversation

@dlevy-msft-sql
Copy link
Contributor

@dlevy-msft-sql dlevy-msft-sql commented Jan 19, 2026

GitHub Issue: #247

Summary

This PR adds comprehensive documentation to help LLMs work effectively with the mssql-python driver, both for suggesting usage examples to end users and for contributing to the repository.

Changes

New Files:

  1. llms.txt (243 lines) - Usage guide for LLMs suggesting code to users

    • Quick start examples
    • All connection string formats (Windows auth, SQL auth, Azure Entra ID variants)
    • Context manager patterns (recommended usage)
    • Parameterized queries (both ? and %(name)s styles)
    • CRUD operations with transactions
    • Error handling with exception hierarchy
    • Comparison to pyodbc with migration example
  2. .github/copilot-instructions.md (283 lines) - Instructions for AI coding agents contributing to the repo

    • Repository overview and architecture
    • Usage examples section (for context when helping users)
    • Build system for all platforms (Windows, macOS, Linux)
    • Testing procedures and coverage
    • CI/CD pipeline details
    • Common build issues and workarounds
    • Contributing guidelines (PR title format, issue linking)

Related Issues

Supersedes #247 - This PR includes a corrected and expanded version of the copilot-instructions.md file with:

  • Fixed file references (logging.py instead of logging_config.py)
  • Fixed architecture detection reference (__init__.py instead of ddbc_bindings.py)
  • Added usage examples section
  • Added Black formatter version (26.1.0)
  • Complete file listing in architecture section
  • Added pyproject.toml reference

Testing

No code changes - documentation only. Verified:

  • File paths and names are accurate
  • Code examples are syntactically correct
  • Build commands match actual scripts
  • Connection string formats match driver API

- Add llms.txt with comprehensive usage examples for LLMs to suggest to users
- Add .github/copilot-instructions.md for AI coding agents contributing to repo
- Includes connection patterns, query examples, error handling, Azure Entra ID
- Covers build system, project architecture, CI/CD, and contributing guidelines
Copilot AI review requested due to automatic review settings January 19, 2026 22:34
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

76%


📈 Total Lines Covered: 5442 out of 7117
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.logger_bridge.hpp: 58.8%
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.row.py: 66.2%
mssql_python.helpers.py: 67.5%
mssql_python.pybind.ddbc_bindings.cpp: 69.4%
mssql_python.pybind.ddbc_bindings.h: 71.7%
mssql_python.pybind.connection.connection.cpp: 73.6%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.connection.py: 84.1%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive LLM guidance documentation to help AI coding assistants work effectively with the mssql-python driver. It includes two new documentation files: llms.txt for end-user code suggestions and .github/copilot-instructions.md for repository contributors.

Changes:

  • Added llms.txt (269 lines) with usage examples, connection patterns, query syntax, error handling, and migration guidance
  • Added .github/copilot-instructions.md (257 lines) with build instructions, architecture overview, CI/CD details, and contributing guidelines

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
llms.txt Provides comprehensive usage documentation for LLMs suggesting mssql-python code to end users, including connection strings, CRUD operations, and error handling
.github/copilot-instructions.md Guides AI coding agents contributing to the repository with build system details, testing procedures, and architecture information

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Fix architecture detection reference: ddbc_bindings.py not __init__.py
- Fix stored procedure syntax: use positional params without named param mixing
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 135 to 136
# Python formatting (use black 26.1.0 to match CI)
pip install black==26.1.0
Copy link

Copilot AI Jan 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment suggests using Black version 26.1.0 to "match CI", but the GitHub Actions workflow (lint-check.yml) and Azure DevOps pipelines don't pin a specific Black version - they just install the latest version with pip install black. This could be misleading for developers. Consider either removing the version pin or updating the CI to actually use a specific version for consistency.

Suggested change
# Python formatting (use black 26.1.0 to match CI)
pip install black==26.1.0
# Python formatting (black)
pip install black

Copilot uses AI. Check for mistakes.
CI uses unpinned black, not 26.1.0. Also add --line-length=100 to match CI command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant