Skip to content

Set up environment for copilot agent with Python and uv support#27

Merged
simone-viozzi merged 5 commits intomainfrom
copilot/fix-26
Aug 10, 2025
Merged

Set up environment for copilot agent with Python and uv support#27
simone-viozzi merged 5 commits intomainfrom
copilot/fix-26

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 27, 2025

This PR adds uv (fast Python package manager) to the Nix development environment to support copilot agent development workflows.

Changes Made

Environment Setup

  • Added uv package to buildInputs in shell.nix for fast Python package management
  • Enhanced shell hook to display both Python and uv availability when entering the environment
  • Maintained all existing functionality - all 22 tests continue to pass

Documentation

  • Updated README.md with a new "Development Environment" section
  • Documented uv usage including virtual environment creation and package installation
  • Clarified installation instructions to use pyproject.toml instead of non-existent requirements.txt

Environment Now Provides

  • Python 3.11 (via Nix) for development
  • uv 0.7.15 for fast package management and virtual environments
  • All existing tools (pytest, ruff, pre-commit, etc.)
  • Seamless integration between traditional pip and modern uv workflows

Usage Examples

# Enter development environment
nix-shell

# Use uv for package management
uv venv                    # Create virtual environment
uv pip install -e .       # Install project in development mode
uv add click              # Add dependencies quickly

The environment is now ready for copilot agent development with both Python and uv available as requested.

Fixes #26.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] set up environment for copilot agent Set up environment for copilot agent with Python and uv support Jun 27, 2025
Copilot AI requested a review from simone-viozzi June 27, 2025 19:04
@simone-viozzi
Copy link
Copy Markdown
Owner

ok but you did not write the required copilot agent configuration

please create a .github/workflows/copilot-setup-steps.yml that add the firewall to astral.sh an install uv and the other required things

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 27, 2025

ok but you did not write the required copilot agent configuration

Created .github/workflows/copilot-setup-steps.yml with firewall configuration for astral.sh and automated uv installation. The workflow configures the Copilot environment before the firewall is enabled, allowing access to required dependencies. Commit: 02c1a52

- name: Install Python dependencies
run: |
# Install Python if not available
if ! command -v python3 &> /dev/null; then
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

not needed, use uv to install python

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed apt-get Python installation and now using uv python install instead. Commit: afb296f

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 27, 2025

@simone-viozzi Thanks for sending me some feedback. Unfortunately, I hit an error while trying to use the custom Copilot setup steps configured for this repository. The error I am seeing is:

No `copilot-setup-steps` job found in your `copilot-setup-steps.yml` workflow file. Please ensure you have a single job named `copilot-setup-steps`. For more details, see https://gh.io/copilot/actions-setup-steps.

Once you or someone with the necessary access fixes the problem, please let me know in a comment and I'll try again. Thanks!

@simone-viozzi
Copy link
Copy Markdown
Owner

edit the copilot-setup-steps.yml to fix the error

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 27, 2025

@simone-viozzi Thanks for sending me some feedback. Unfortunately, I hit an error while trying to use the custom Copilot setup steps configured for this repository. The error I am seeing is:

No `copilot-setup-steps` job found in your `copilot-setup-steps.yml` workflow file. Please ensure you have a single job named `copilot-setup-steps`. For more details, see https://gh.io/copilot/actions-setup-steps.

Once you or someone with the necessary access fixes the problem, please let me know in a comment and I'll try again. Thanks!

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jun 27, 2025

edit the copilot-setup-steps.yml to fix the error

Fixed the job name from setup to copilot-setup-steps in the workflow file to meet GitHub requirements. Commit: 79216c9

Copilot AI and others added 4 commits August 10, 2025 15:47
…figuration and uv installation

Co-authored-by: simone-viozzi <19674168+simone-viozzi@users.noreply.github.com>
Co-authored-by: simone-viozzi <19674168+simone-viozzi@users.noreply.github.com>
Co-authored-by: simone-viozzi <19674168+simone-viozzi@users.noreply.github.com>
@simone-viozzi simone-viozzi marked this pull request as ready for review August 10, 2025 17:48
@simone-viozzi simone-viozzi merged commit 3d67d82 into main Aug 10, 2025
2 checks passed
@simone-viozzi simone-viozzi deleted the copilot/fix-26 branch August 10, 2025 17:49
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.

set up environment for copilot agent

2 participants