Skip to content

Conversation

@HaohanTsao
Copy link
Contributor

@HaohanTsao HaohanTsao commented Mar 24, 2025

Fix incorrect uv installation instructions in documentation

Description

I encountered an issue with the development setup instructions in both CONTRIBUTING.md and README.md. The current instructions use uv add -e ".[dev]", which fails with the following error:

error: unexpected argument '-e' found
tip: to pass '-e' as a value, use '-- -e'

This happens because uv add doesn't support the -e flag for editable installs, making it impossible for new contributors to set up their development environment following the current instructions.

Changes Made

  • Updated the installation command in CONTRIBUTING.md from uv add -e ".[dev]" to uv sync --extra dev
  • Updated the corresponding instructions in README.md with the same correction
  • Ensured the rest of the documentation remains consistent with this change

How I Fixed It

I researched the correct uv command for installing a project with extra dependencies in editable mode. According to the official uv documentation, uv sync --extra dev is the proper command to install a project with its development dependencies. The sync command automatically installs the project in editable mode by default, which is exactly what we need for development.

Verification Steps

To verify this fix works correctly:

  1. Clone the repository:

    git clone https://github.com/tadata-org/fastapi_mcp.git
    cd fastapi-mcp
  2. Create a virtual environment with uv:

    uv venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Try the new command to install development dependencies:

    uv sync --extra dev
  4. Verify the installation was successful by checking the installed packages:

    uv pip list
  5. Further verify that the development environment is working by running the project's development tools:

    uv run mypy .
    uv run pytest

    All tools run successfully, confirming the development dependencies were properly installed.

  6. Verify that the examples run correctly:

    uv run examples/simple_integration.py

    The example application starts successfully, confirming that the main package and its dependencies are properly installed and functioning.

  7. For comparison, if you try the old command:

    uv add -e ".[dev]"

    You'll see the error mentioned above, demonstrating why this documentation update is necessary.

Related Issues

Fixes #20

@HaohanTsao
Copy link
Contributor Author

@shahar4499 I’d really appreciate your feedback. Let me know if you have any questions!

@shira-ayal shira-ayal self-requested a review March 25, 2025 08:11
Copy link

@shira-ayal shira-ayal left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for this fix :)

@shira-ayal shira-ayal merged commit 2ff9309 into tadata-org:main Mar 25, 2025
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.

Documentation error in CONTRIBUTING.md: incorrect uv command for installing dev dependencies

2 participants