astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
26.61k stars 772 forks source link

Improve help for `--requirement` in `uv pip install` #7236

Open AdrianB-sovo opened 2 months ago

AdrianB-sovo commented 2 months ago

Using uv v0.4.8, when I do uv pip install --help, I see the following:

Options:
  -r, --requirement <REQUIREMENT>            Install all packages listed in the given `requirements.txt` files
  ...

The complete description for the option is:

    /// Install all packages listed in the given `requirements.txt` files.
    ///
    /// If a `pyproject.toml`, `setup.py`, or `setup.cfg` file is provided, uv will
    /// extract the requirements for the relevant project.
    ///
    /// If `-` is provided, then requirements will be read from stdin.
    #[arg(long, short, group = "sources", value_parser = parse_file_path)]
    pub requirement: Vec<PathBuf>,

With just the short description, it's difficult to know that it also supports other types of files (which I was looking for).

Maybe the short description could be updated to the following?

Options:
  -r, --requirement <REQUIREMENT>            Install packages listed in the given file(s) (`requirements.txt`, `pyproject.toml`, `setup.py`, or `setup.cfg`)
  ...
zanieb commented 2 months ago

Well the idea is that short description is short so I'm not sure I want to list all the formats there but yeah we should update this since we support more file formats here now.

zanieb commented 2 months ago

Thanks for filing an issue!