Use uv consistently throughout the documentation#15302
Conversation
docs/faq.md
Outdated
| $ uv add --dev ruff # to add ruff to your project | ||
| $ uv tool install ruff # to install ruff globally | ||
| uv tool install ruff # Install Ruff globally. | ||
| uv add --dev ruff # Or add Ruff to your project. |
There was a problem hiding this comment.
I'm tempted to remove this line.
There was a problem hiding this comment.
Should we be grouping into two separate installation concepts: Installing Ruff globally and adding Ruff to your project?
There was a problem hiding this comment.
I'm not sure. It seems like a lot to try and introduce the concept of "projects" here. Are you suggesting that we'd have uv tool and pipx vs. uv add and pip?
There was a problem hiding this comment.
Yeah that's the thought.
I don't know if we need to go into details, just "project" and "globally" 🤷♀️
There was a problem hiding this comment.
I'm fine with an incremental improvement — just a thought on the grouping of the concepts instead of by tool.
da70fa4 to
00ee16e
Compare
docs/installation.md
Outdated
| # Installing Ruff | ||
|
|
||
| Ruff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI: | ||
| Ruff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI. We recommend installing Ruff with [uv](https://docs.astral.sh/uv/): |
There was a problem hiding this comment.
We could also include instructions for installing uv, but it feels like that shouldn't live here.
docs/installation.md
Outdated
|
|
||
| ```console | ||
| $ # With uv. | ||
| $ uv tool install ruff |
There was a problem hiding this comment.
Is it our recommended setup to install ruff globally vs as a project dependency? Having Ruff pinned seems like a big advantage to me and suggesting to install it globally feels like we're misguiding users to struggle with random CI failures etc. in the future
There was a problem hiding this comment.
I think we could recommend both which is to either install it globally or add it as a project dependency with a specific version. Rooster should take care of updating the versions in the documentation (
Lines 106 to 114 in d45c1ee
docs/installation.md
Outdated
| Ruff is available as [`ruff`](https://pypi.org/project/ruff/) on PyPI. We recommend installing Ruff with [uv](https://docs.astral.sh/uv/): | ||
|
|
||
| ```console | ||
| $ # With uv. |
There was a problem hiding this comment.
We should only use a leading $ in the documentation if we add the copy/paste fix javascript from uv.
There was a problem hiding this comment.
Okay thanks. We already use this in a few places, I think. I'll figure out what to do!
95b4079 to
af2a899
Compare
af2a899 to
fdfdc00
Compare
* main: Use uv consistently throughout the documentation (#15302) [red-knot] Eagerly normalize `type[]` types (#15272) [`pyupgrade`] Split `UP007` to two individual rules for `Union` and `Optional` (`UP007`, `UP045`) (#15313) [red-knot] Improve symbol-lookup tracing (#14907) [red-knot] improve type shrinking coverage in red-knot property tests (#15297) [`flake8-return`] Recognize functions returning `Never` as non-returning (`RET503`) (#15298) [`flake8-bugbear`] Implement `class-as-data-structure` (`B903`) (#9601) Avoid treating newline-separated sections as sub-sections (#15311) Remove call when removing final argument from `format` (#15309) Don't enforce `object-without-hash-method` in stubs (#15310) Don't special-case class instances in binary expression inference (#15161) Upgrade zizmor to the latest version in CI (#15300)
* main: [`pylint`] Fix `unreachable` infinite loop (`PLW0101`) (#15278) fix invalid syntax in workflow file (#15357) [`pycodestyle`] Avoid false positives related to type aliases (`E252`) (#15356) [`flake8-builtins`] Disapply `A005` to stub files (#15350) Improve logging system using `logLevel`, avoid trace value (#15232) [`flake8-builtins`] Rename `A005` and improve its error message (#15348) Spruce up docs for pydoclint rules (#15325) [`flake8-type-checking`] Apply `TC008` more eagerly in `TYPE_CHECKING` blocks and disapply it in stubs (#15180) [red-knot] `knot_extensions` Python API (#15103) Display Union of Literals as a Literal (#14993) [red-knot] all types are assignable to object (#15332) [`ruff`] Parenthesize arguments to `int` when removing `int` would change semantics in `unnecessary-cast-to-int` (`RUF046`) (#15277) [`eradicate`] Correctly handle metadata blocks directly followed by normal blocks (`ERA001`) (#15330) Narrowing for class patterns in match statements (#15223) [red-knot] add call checking (#15200) Spruce up docs for `slice-to-remove-prefix-or-suffix` (`FURB188`) (#15328) [`internal`] Return statements in finally block point to end block for `unreachable` (`PLW0101`) (#15276) [`ruff`] Treat `)` as a regex metacharacter (`RUF043`, `RUF055`) (#15318) Use uv consistently throughout the documentation (#15302)
Summary
Closes #15301 (comment).