Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 28, 2025

Work Item / Issue Reference

GitHub Issue: #145


Summary

This pull request adds a comprehensive build guide for contributors to the mssql-python project. The guide provides detailed instructions for setting up the development environment, building native bindings, packaging the project as a Python wheel, and running tests.

Documentation Enhancements:

  • New BUILDGUIDE.md file that includes:
    • Getting Started section with both command-line and Visual Studio Code approaches for forking and cloning
      • Command-line instructions for traditional Git workflows
      • VS Code-specific instructions including GitHub extension installation and integrated Git workflows
    • Prerequisites for development, including Python 3.10+, pybind11, and CMake
    • Platform-specific setup instructions for Windows, macOS, and Linux
      • Windows setup includes alternative VS Code configuration option
    • Steps for building native bindings using platform-specific scripts with correct directory paths
    • Instructions for building Python wheel packages after compiling native bindings
    • Enhanced test running guidance with proper directory navigation and environment variable setup
    • Comprehensive database setup section with detailed platform-specific commands for Windows, macOS, and Linux using go-sqlcmd for containerized SQL Server instances
    • Overview of project directory structure
    • Comprehensive troubleshooting section

Key Fixes Applied:

  • Corrected all directory paths from pybind/ to mssql_python/pybind/ to match actual repository structure
  • Fixed broken internal links, particularly the reference to the pybind README
  • Added clear navigation instructions for running tests from the correct directory
  • Enhanced Windows setup with VS Code alternative configuration
  • Added comprehensive VS Code workflow instructions for contributors who prefer IDE-based development
  • Added complete platform-specific database setup commands for all three major platforms (Windows, macOS, Linux) with detailed installation steps for Docker and sqlcmd

The guide now provides a complete contributor onboarding experience with accurate paths, comprehensive setup options, support for both command-line and VS Code workflows, and detailed database setup instructions for all platforms.


This pull request was created and enhanced based on feedback to ensure all links work correctly, paths match the actual repository structure, includes modern development workflows using Visual Studio Code, and provides complete database setup instructions for Windows, macOS, and Linux.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ment instructions

Co-authored-by: bewithgaurav <8655500+bewithgaurav@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Add BUILDGUIDE.md with contributor build and test instructions DOC: Add comprehensive BUILDGUIDE.md with cross-platform build and development instructions Jul 28, 2025
@Copilot Copilot AI requested a review from bewithgaurav July 28, 2025 05:41
Copilot finished work on behalf of bewithgaurav July 28, 2025 05:41
@github-actions github-actions bot added the pr-size: medium Moderate update size label Jul 28, 2025
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Jul 28, 2025
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Jul 28, 2025
@bewithgaurav bewithgaurav changed the title DOC: Add comprehensive BUILDGUIDE.md with cross-platform build and development instructions DOC: Add BUILDGUIDE.md with cross-platform build and development instructions Jul 28, 2025
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Jul 28, 2025
@bewithgaurav bewithgaurav marked this pull request as ready for review July 28, 2025 06:03
@Copilot Copilot AI review requested due to automatic review settings July 28, 2025 06:03
Copy link
Contributor

@Copilot 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 build and development documentation for the mssql-python project. The new BUILDGUIDE.md provides structured instructions for contributors to set up their development environment, build native bindings, and create Python wheel packages across Windows, macOS, and Linux platforms.

  • Adds detailed cross-platform setup instructions with platform-specific requirements
  • Provides clear steps for building native pybind11 bindings using existing build scripts
  • Includes instructions for creating Python wheels and running tests with proper environment configuration

@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Jul 28, 2025
jahnvi480
jahnvi480 previously approved these changes Jul 28, 2025
Copy link

@dlevy-msft-sql dlevy-msft-sql left a comment

Choose a reason for hiding this comment

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

We need to fix the broken links before this goes out. The other things seem like nice to haves.

BUILDGUIDE.md Outdated
Open a **Developer Command Prompt for VS** and run:

```bash
cd pybind

Choose a reason for hiding this comment

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

This is cd .\mssql-python\pybind on my machine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected the directory path in commit d9a7ef7. The path is now correctly shown as cd mssql_python/pybind instead of cd pybind. All references to the pybind directory throughout the guide have been updated to use the correct path.

BUILDGUIDE.md Outdated

---

For more details on the native bindings, see [`pybind/README.md`](pybind/README.md).

Choose a reason for hiding this comment

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

This looks like we might have used pybind's doc for inspiration and missed updating a few links.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the broken link in commit d9a7ef7. The reference to pybind/README.md has been corrected to mssql_python/pybind/README.md to match the actual directory structure. I also updated all other pybind directory references throughout the guide to use the correct paths.

Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jul 28, 2025

We need to fix the broken links before this goes out. The other things seem like nice to haves.

Fixed the broken links in commit d9a7ef7. The main issue was the incorrect path to pybind/README.md which has been corrected to mssql_python/pybind/README.md. All pybind directory references throughout the guide have been updated to use the correct path.

@Copilot Copilot AI changed the title DOC: Add BUILDGUIDE.md with cross-platform build and development instructions DOC: Add comprehensive BUILDGUIDE.md with cross-platform build instructions and contributor setup Jul 28, 2025
@Copilot Copilot AI requested a review from dlevy-msft-sql July 28, 2025 19:13
Copilot finished work on behalf of dlevy-msft-sql July 28, 2025 19:13
…n setup

Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>
@Copilot Copilot AI changed the title DOC: Add comprehensive BUILDGUIDE.md with cross-platform build instructions and contributor setup DOC: Add comprehensive BUILDGUIDE.md with cross-platform build instructions and VS Code setup Jul 28, 2025
Copilot finished work on behalf of dlevy-msft-sql July 28, 2025 19:21
@Copilot Copilot AI requested a review from dlevy-msft-sql July 28, 2025 19:21
Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>
Copilot finished work on behalf of dlevy-msft-sql July 28, 2025 19:25
Adding tip on environment variables
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: medium Moderate update size labels Aug 4, 2025
dlevy-msft-sql
dlevy-msft-sql previously approved these changes Aug 4, 2025
---

## Running Tests

Choose a reason for hiding this comment

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

Please add a note that in IDEs, like VS Code, you may have to close all open instances of the IDE to get it to pick up the new environment variable. If they are still getting errors about invalid connection strings, they may have to reboot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the reboot note in commit ed0ecc8. The tip now includes information about closing IDE instances and rebooting if connection string errors persist.

## Running Tests

Tests require a database connection string and must be run from the project root directory.
Set the `DB_CONNECTION_STRING` environment variable before running tests:

Choose a reason for hiding this comment

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

Please add a note that in IDEs, like VS Code, you may have to close all open instances of the IDE to get it to pick up the new environment variable. If they are still getting errors about invalid connection strings, they may have to reboot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the reboot note in commit ed0ecc8. The tip now includes information about closing IDE instances and rebooting if connection string errors persist.

…E.md

Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>
Copilot finished work on behalf of dlevy-msft-sql August 4, 2025 15:57
@Copilot Copilot AI requested a review from dlevy-msft-sql August 4, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-size: medium Moderate update size
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants