-
Notifications
You must be signed in to change notification settings - Fork 36
CHORE: Create devcontainer for repo #147
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
Conversation
…n of virtual environment
|
@microsoft-github-policy-service agree company="Microsoft" |
There was a problem hiding this 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 pull request establishes a comprehensive Docker-based development environment for the MSSQL Python Driver project using VS Code devcontainer technology. The setup enables developers to quickly spin up a consistent development environment with all necessary dependencies pre-configured.
- Creates a complete devcontainer configuration with Python 3.10, Microsoft ODBC drivers, and development tools
- Implements automated environment setup through post-creation scripts and Docker configuration
- Adds Docker build optimization through comprehensive file exclusion patterns
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 13 comments.
| File | Description |
|---|---|
.dockerignore |
Excludes build artifacts, caches, and IDE files from Docker context |
.devcontainer/Dockerfile |
Defines container with Python 3.10, MSSQL drivers, and development tools |
.devcontainer/devcontainer.json |
Configures VS Code settings, extensions, and container features |
.devcontainer/post-create.sh |
Automates post-container setup including dependencies and virtual environment |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
bewithgaurav
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some refactoring & optimization comments
|
@saurabh500 bumping this because it would be nice to have. Are we close on this PR or is it better to start fresh since it has been a while? |
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo 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.pybind.ddbc_bindings.cpp: 69.3%
mssql_python.pybind.ddbc_bindings.h: 69.7%
mssql_python.pybind.connection.connection.cpp: 75.3%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.connection.py: 84.1%
mssql_python.cursor.py: 84.7%🔗 Quick Links
|
|
I've been using an ubuntu devcontainer for mssql-python since some time now, and have some more improvements to this that we can add here cc: @saurabh500 |
…, ARM64 support - Add unixodbc-dev package for ODBC headers (fixes sql.h not found) - Move Python package installation from Dockerfile to post-create.sh - Add ARM64 support: use Azure SQL Edge instead of SQL Server 2025 - Make SQL Server container startup non-fatal (optional) - Fix false success reporting when build fails - Disable CMake auto-configure to prevent duplicate builds - Generate random SA password and store connection string
|
@bewithgaurav all yours. I haven't had the bandwidth to pick this up. |
- Add aliases for both bash and zsh - Persist DB_CONNECTION_STRING to /etc/environment and shell rc files - Improve completion message with quick start commands
Devcontainer: Production-Ready Setup for mssql-python Development
Summary
Refactored the devcontainer with battle-tested improvements from local development use. This provides a complete, zero-config development environment for GitHub Codespaces and local devcontainers.
What's New
🏗️ Build & Setup
unixodbc-devpackage - fixessql.h not foundcompilation errors🖥️ ARM64 Support
🔌 SQL Server Auto-Setup
DB_CONNECTION_STRINGenvironment variable (persisted to/etc/environment,.bashrc,.zshrc)⚡ Developer Experience
build- Rebuild C++ extensiontest- Run pytestQuick Start
python main.py- test connectiontest- run all testsTesting
Fixes #146