-
Notifications
You must be signed in to change notification settings - Fork 880
Description
Issue Description
I met an error in the CONTRIBUTING.md and README.md file regarding the command to install development dependencies using uv. The current instructions suggest using uv add -e ".[dev]", but this command fails with an error because uv add does not support the -e flag for editable installs.
Steps to Reproduce
-
Clone the repository
git clone https://github.com/tadata-org/fastapi_mcp.git cd fastapi-mcp -
Create a virtual environment with uv
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Try to install development dependencies following the instructions in CONTRIBUTING.md
uv add -e ".[dev]" -
The command fails with the following error:
error: unexpected argument '-e' found tip: to pass '-e' as a value, use '-- -e'
Expected Behavior
The command should successfully install the project in development mode with all development dependencies.
Actual Behavior
The command fails because uv add is designed to add external dependencies to a project, not to install the current project in editable mode with extras.
Environment Information
- uv version: 0.6.9
- OS: macOS 14.6.1
- Python version: 3.12.5
Suggested Fix
The CONTRIBUTING.md file should be updated to use the correct command:
Replace:
# Install development dependencies with uv
uv add -e ".[dev]"With:
# Install development dependencies with uv
uv sync --extra devThis command correctly installs the project in editable mode with all development dependencies.
Verification
I've verified that uv sync --extra dev successfully installs all development dependencies, and the development environment works correctly. After running this command, I was able to run uv run pytest and other development tools without issues.
Documentation Reference
According to the [official uv documentation]:
uv reads optional dependencies from the
[project.optional-dependencies]table. These are frequently referred to as "extras".
uv does not sync extras by default. Use the--extraoption to include an extra.$ uv sync --extra foo
The documentation also notes that syncing the environment will install the project as an editable package by default, which is the desired behavior for development.
Question for Maintainers
Would this solution be acceptable for you? If so, I'd be happy to submit a PR to update the CONTRIBUTING.md file with the correct command.
I hope this helps improve the onboarding experience for new contributors. Thank you for maintaining this useful project!