uv icon indicating copy to clipboard operation
uv copied to clipboard

Compatibility with Briefcase Projects: Support for New Configuration File

Open NADOOITChristophBa opened this issue 5 months ago • 0 comments

Title: Compatibility with Briefcase Projects: Support for New Configuration File

Issue Description:

I am working on a project using Briefcase and encountered compatibility issues when trying to integrate uv. The main problem arises from the different configurations expected by uv and Briefcase, specifically in the pyproject.toml file.

Problem Description

  • Project Structure: Briefcase projects have a specific structure where the pyproject.toml file is located in the root directory. Here's a simplified version of the structure:

    .
    ├── pyproject.toml
    ├── src
    │   └── project_name
    │       ├── __init__.py
    │       ├── app.py
    │       └── ...
    └── tests
    
  • Configuration Differences:

    • Briefcase uses a [tool.briefcase] section in the pyproject.toml file.
    • uv expects a [project] section and a [tool.uv] section for dependencies.

Steps to Reproduce

  1. Create a Briefcase project with the structure mentioned above.
  2. Navigate to the project directory and try to run a uv command, e.g., uv add ruff.
  3. Observe the error indicating that the pyproject.toml file does not have the expected [project] table.

Error Messages

When running uv add ruff in the project root:

error: No `pyproject.toml` found in current directory or any parent directory

When running uv add ruff in the project_name subdirectory:

error: No `project` table found in: `/path/to/project/pyproject.toml`

Proposed Solution

To resolve this compatibility issue, I propose the following:

  • Introduce a New Configuration File: Allow uv to recognize a new configuration file in the base folder that can be used to specify the [project] and [tool.uv] sections. This file could be named uv.toml or similar.
  • Configuration Flexibility: Provide an option to configure the location and name of this file, so it can coexist with the Briefcase pyproject.toml without conflicts.

Additional Information

  • Command Used: uv add ruff
  • uv Platform: macOS
  • uv Version: 0.3.3 (deea6025a 2024-08-23)
  • macOS Version: [Please specify your macOS version, e.g., macOS Sonoma 14.6.1]

Thank you for considering this feature request. This enhancement would greatly improve the integration of uv with projects managed by Briefcase, allowing for more seamless development workflows.

NADOOITChristophBa avatar Aug 25 '24 13:08 NADOOITChristophBa