-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm tempted to remove this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -1,9 +1,16 @@ | |||
# 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
version_files = [ | |
"README.md", | |
"docs/integrations.md", | |
"docs/tutorial.md", | |
"crates/ruff/Cargo.toml", | |
"crates/ruff_linter/Cargo.toml", | |
"crates/ruff_wasm/Cargo.toml", | |
"scripts/benchmarks/pyproject.toml", | |
] |
docs/installation.md
Outdated
|
||
```console | ||
$ # With uv. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
Summary
Closes #15301 (comment).