Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create help sections for build, install, resolve, and index #5693

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Aug 1, 2024

Part of #4454

e.g.

$ uv add --help
Add one or more packages to the project requirements

Usage: uv add [OPTIONS] <REQUIREMENTS>...

Arguments:
  <REQUIREMENTS>...  The packages to add, as PEP 508 requirements (e.g., `ruff==0.5.0`)

Options:
      --dev                  Add the requirements as development dependencies
      --optional <OPTIONAL>  Add the requirements to the specified optional dependency group
      --no-editable          Don't add the requirements as editables
      --raw-sources          Add source requirements to `project.dependencies`, rather than `tool.uv.sources`
      --rev <REV>            Specific commit to use when adding from Git
      --tag <TAG>            Tag to use when adding from git
      --branch <BRANCH>      Branch to use when adding from git
      --extra <EXTRA>        Extras to activate for the dependency; may be provided more than once
      --locked               Assert that the `uv.lock` will remain unchanged
      --frozen               Add the requirements without updating the `uv.lock` file
      --package <PACKAGE>    Add the dependency to a specific package in the workspace
  -p, --python <PYTHON>      The Python interpreter into which packages should be installed. [env: UV_PYTHON=]

Index options:
  -i, --index-url <INDEX_URL>                The URL of the Python package index (by default: <https://pypi.org/simple>) [env: UV_INDEX_URL=]
      --extra-index-url <EXTRA_INDEX_URL>    Extra URLs of package indexes to use, in addition to `--index-url` [env: UV_EXTRA_INDEX_URL=]
  -f, --find-links <FIND_LINKS>              Locations to search for candidate distributions, in addition to those found in the registry indexes
      --no-index                             Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via `--find-links`
      --index-strategy <INDEX_STRATEGY>      The strategy to use when resolving against multiple index URLs [env: UV_INDEX_STRATEGY=] [possible values: first-index, unsafe-first-match, unsafe-best-match]
      --keyring-provider <KEYRING_PROVIDER>  Attempt to use `keyring` for authentication for index URLs [env: UV_KEYRING_PROVIDER=] [possible values: disabled, subprocess]

Resolver options:
  -U, --upgrade                            Allow package upgrades, ignoring pinned versions in any existing output file
  -P, --upgrade-package <UPGRADE_PACKAGE>  Allow upgrades for a specific package, ignoring pinned versions in any existing output file
      --resolution <RESOLUTION>            The strategy to use when selecting between the different compatible versions for a given package requirement [env: UV_RESOLUTION=] [possible values: highest, lowest, lowest-direct]
      --prerelease <PRERELEASE>            The strategy to use when considering pre-release versions [env: UV_PRERELEASE=] [possible values: disallow, allow, if-necessary, explicit, if-necessary-or-explicit]
      --exclude-newer <EXCLUDE_NEWER>      Limit candidate packages to those that were uploaded prior to the given date [env: UV_EXCLUDE_NEWER=]

Installer options:
      --reinstall                              Reinstall all packages, regardless of whether they're already installed. Implies `--refresh`
      --reinstall-package <REINSTALL_PACKAGE>  Reinstall a specific package, regardless of whether it's already installed. Implies `--refresh-package`
      --link-mode <LINK_MODE>                  The method to use when installing packages from the global cache [env: UV_LINK_MODE=] [possible values: clone, copy, hardlink, symlink]
      --compile-bytecode                       Compile Python files to bytecode after installation

Build options:
  -C, --config-setting <CONFIG_SETTING>        Settings to pass to the PEP 517 build backend, specified as `KEY=VALUE` pairs
      --no-build                               Don't build source distributions
      --no-build-package <NO_BUILD_PACKAGE>    Don't build source distributions for a specific package
      --no-binary                              Don't install pre-built wheels
      --no-binary-package <NO_BINARY_PACKAGE>  Don't install pre-built wheels for a specific package

Cache options:
  -n, --no-cache                           Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation [env: UV_NO_CACHE=]
      --cache-dir <CACHE_DIR>              Path to the cache directory [env: UV_CACHE_DIR=]
      --refresh                            Refresh all cached data
      --refresh-package <REFRESH_PACKAGE>  Refresh cached data for a specific package

Python options:
      --python-preference <PYTHON_PREFERENCE>  Whether to prefer using Python installations that are already present on the system, or those that are downloaded and installed by uv [possible values: only-managed, managed, system, only-system]
      --python-fetch <PYTHON_FETCH>            Whether to automatically download Python when required [possible values: automatic, manual]

Global options:
  -q, --quiet                      Do not print any output
  -v, --verbose...                 Use verbose output
      --color <COLOR_CHOICE>       Control colors in output [default: auto] [possible values: auto, always, never]
      --native-tls                 Whether to load TLS certificates from the platform's native certificate store [env: UV_NATIVE_TLS=]
      --offline                    Disable network access, relying only on locally cached data and locally available files
      --no-progress                Hides all progress outputs when set
      --config-file <CONFIG_FILE>  The path to a `uv.toml` file to use for configuration [env: UV_CONFIG_FILE=]
      --no-config                  Avoid discovering configuration files (`pyproject.toml`, `uv.toml`) in the current directory, parent directories, or user configuration directories [env: UV_NO_CONFIG=]
  -h, --help                       Print help
  -V, --version                    Print version

Use `uv help add` for more details.

@zanieb zanieb added the cli Related to the command line interface label Aug 1, 2024
@zanieb
Copy link
Member Author

zanieb commented Aug 1, 2024

cc @eth3lbert

Copy link
Contributor

@eth3lbert eth3lbert left a comment

Choose a reason for hiding this comment

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

LGTM 👍
(I don't actually have a preference for how they should be categorized.)

@eth3lbert
Copy link
Contributor

I am curious why the CI only fails on Windows.

@zanieb
Copy link
Member Author

zanieb commented Aug 1, 2024

Some stack size BS 😬

@zanieb zanieb force-pushed the zb/help-sections branch 2 times, most recently from 8858b88 to 1b8af10 Compare August 5, 2024 20:16
@zanieb zanieb enabled auto-merge (squash) August 5, 2024 20:16
@zanieb zanieb merged commit dd20afd into main Aug 5, 2024
57 checks passed
@zanieb zanieb deleted the zb/help-sections branch August 5, 2024 21:28
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 10, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.2.33` -> `0.2.35` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.2.35`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0235)

[Compare Source](astral-sh/uv@0.2.34...0.2.35)

##### CLI

-   Deprecate `--system` and `--no-system` in `uv venv` ([#&#8203;5925](astral-sh/uv#5925))
-   Make `--upgrade` imply `--refresh` ([#&#8203;5943](astral-sh/uv#5943))
-   Warn when there are missing bounds on transitive dependencies with `--resolution-strategy lowest` ([#&#8203;5953](astral-sh/uv#5953))

##### Configuration

-   Add support for `no-build-isolation-package` ([#&#8203;5894](astral-sh/uv#5894))

##### Performance

-   Enable LTO optimizations in release builds to reduce binary size ([#&#8203;5904](astral-sh/uv#5904))
-   Prefetch metadata in `--no-deps` mode ([#&#8203;5918](astral-sh/uv#5918))

##### Bug fixes

-   Display portable paths in POSIX virtual environment activation commands ([#&#8203;5956](astral-sh/uv#5956))
-   Respect subdirectories when locating Git workspaces ([#&#8203;5944](astral-sh/uv#5944))

##### Documentation

-   Improve the `uv venv` CLI documentation ([#&#8203;5963](astral-sh/uv#5963))

### [`v0.2.34`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#0234)

[Compare Source](astral-sh/uv@0.2.33...0.2.34)

##### Enhancements

-   Always strip in release mode ([#&#8203;5745](astral-sh/uv#5745))
-   Assume `git+` prefix when URLs end in `.git` ([#&#8203;5868](astral-sh/uv#5868))
-   Support build constraints ([#&#8203;5639](astral-sh/uv#5639))

##### CLI

-   Create help sections for build, install, resolve, and index ([#&#8203;5693](astral-sh/uv#5693))
-   Improve CLI documentation for global options ([#&#8203;5834](astral-sh/uv#5834))
-   Improve `--python` CLI documentation ([#&#8203;5869](astral-sh/uv#5869))
-   Improve display order of top-level commands ([#&#8203;5830](astral-sh/uv#5830))

##### Bug fixes

-   Allow downloading wheels for metadata with `--no-binary` ([#&#8203;5707](astral-sh/uv#5707))
-   Reject `pyproject.toml` in `--config-file` ([#&#8203;5842](astral-sh/uv#5842))
-   Remove double-proxy nodes in error reporting ([#&#8203;5738](astral-sh/uv#5738))
-   Respect pre-release preferences from input files ([#&#8203;5736](astral-sh/uv#5736))
-   Support overlapping local and non-local requirements in forks ([#&#8203;5812](astral-sh/uv#5812))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants