Skip to content

Improvement for Codespace VSCode Setup: uv run via file menu#18

Merged
pamelafox merged 3 commits intoAzure-Samples:mainfrom
bmerkle:fixRunPythonViaVSCodeMenu
Feb 26, 2026
Merged

Improvement for Codespace VSCode Setup: uv run via file menu#18
pamelafox merged 3 commits intoAzure-Samples:mainfrom
bmerkle:fixRunPythonViaVSCodeMenu

Conversation

@bmerkle
Copy link
Copy Markdown
Contributor

@bmerkle bmerkle commented Feb 25, 2026

with this setting:

  • uv sync is run automatically
  • we can run python files via VSCode current file menu and do not have to switch to terminal/console

Purpose

  • ...

Does this introduce a breaking change?

[ ] Yes
[x ] No

Pull Request Type

What kind of change does this Pull Request introduce?
Improvement

[x] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code

startup codespace

git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

- uv sync is run automatically
- we can run python files via VSCode current file menu and do not have to switch to terminal/console
Copilot AI review requested due to automatic review settings February 25, 2026 19:05
Copy link
Copy Markdown
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 updates the devcontainer VS Code configuration to use a uv-managed virtual environment by default and to auto-sync dependencies when a Codespace/devcontainer is created, so running/debugging the “current file” uses the project environment without manual terminal steps.

Changes:

  • Point VS Code’s Python interpreter to a workspace virtual environment (.venv).
  • Enable automatic terminal environment activation.
  • Add a postCreateCommand intended to install uv and run uv sync.

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

Comment thread .devcontainer/devcontainer.json Outdated
Comment thread .devcontainer/devcontainer.json Outdated
bmerkle and others added 2 commits February 25, 2026 20:15
makes sense

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
makes sense

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@pamelafox
Copy link
Copy Markdown
Contributor

Thanks, will merge now. Our Codespace pre-builds havent been working but fingers crossed they'll start working overnight! I'll test in morning and see.

@pamelafox pamelafox merged commit d18fca5 into Azure-Samples:main Feb 26, 2026
1 check passed
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.

3 participants