-
Notifications
You must be signed in to change notification settings - Fork 1k
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 workspaces instead of pip #12622
Conversation
6e59a4f
to
ef63ee8
Compare
@@ -1,8 +1 @@ | |||
PyYAML==6.0.1 | |||
black==23.10.0 | |||
mkdocs==1.5.0 | |||
mkdocs-material @ git+ssh://git@github.com/astral-sh/mkdocs-material-insiders.git@38c0b8187325c3bab386b666daf3518ac036f2f4 |
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.
Why do we need to keep it?
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 use a custom version of mkdocs but external contributors don't have access to that repository. I don't know if there's a better way to support this?
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
a25be62
to
cfe301a
Compare
Can you clarify what's not working? |
I can't run the mkdocs script because the dependencies are missing (I checked, they're not in my venv) |
I'm not sure what you're running exactly but we need to mark Ruff as unmanaged. We don't want to be building Ruff to run scripts. |
I try to run |
It's because the workspace members aren't declared as dependencies of the project. |
|
If you add this to [tool.hatch.build.targets.wheel]
packages = ["src/ruff_docs"] I think we should re-add that to |
@@ -161,7 +161,7 @@ def main() -> None: | |||
# Format rules docs | |||
add_no_escape_text_plugin() | |||
for rule_doc in Path("docs/rules").glob("*.md"): | |||
mdformat.file(rule_doc, extensions=["mkdocs", "admonition", "no-escape-text"]) | |||
mdformat.file(rule_doc, extensions=["mkdocs", "admon", "no-escape-text"]) |
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.
This was a breaking change in mdformat-admon
, in the 2.0.3 release: KyleKing/mdformat-mkdocs@6a32997
@@ -294,28 +294,30 @@ Finally, regenerate the documentation and generated code with `cargo dev generat | |||
|
|||
To preview any changes to the documentation locally: | |||
|
|||
1. Install the [Rust toolchain](https://www.rust-lang.org/tools/install). | |||
1. Install the [Rust toolchain](https://www.rust-lang.org/tools/install).] |
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.
This seems off... Isn't that mismatched now?
Okay, I don't understand why I would have to declare |
|
Can you expand on your question? |
It's more of an observation. I understand that the That's why I think it odd that I have to add |
@MichaReiser - I think part of the problem is that diff --git a/pyproject.toml b/pyproject.toml
index eeba1c160..1ab117188 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -8,7 +8,7 @@ version = "0.5.6"
description = "An extremely fast Python linter and code formatter, written in Rust."
authors = [{ name = "Astral Software Inc.", email = "hey@astral.sh" }]
readme = "README.md"
-requires-python = ">=3.7"
+requires-python = ">=3.8"
license = { file = "LICENSE" }
keywords = [
"automation",
@@ -44,7 +44,18 @@ Documentation = "https://docs.astral.sh/ruff/"
Changelog = "https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md"
[tool.uv.workspace]
-members = ["docs", "python/ruff-ecosystem"]
+members = ["python/ruff-ecosystem"]
+
+[tool.uv]
+dev-dependencies = [
+ "PyYAML>=6.0.1",
+ "mkdocs>=1.5.0",
+ "mdformat>=0.7.17",
+ "mdformat-mkdocs>=2.0.4",
+ "mdformat-admon>=2.0.3",
+ "mkdocs-material>=9.1.18",
+ "mkdocs-redirects>=1.2.1",
+]
[tool.maturin]
bindings = "bin" Then (I initially didn't realize that the script you were running wasn't part of |
Can I work on this? |
@charliermarsh I see. But let's pretend that
Kind of. With
To me it seems uv only supports 1. or what's the recommended way to run @T-256 sure! Feel free to open a new PR. I then close this one |
@MichaReiser -- Genuinely trying to follow but I'm a little confused. For (2), you can add a |
Not what's described in the I think where the behavior of |
Oh I see, that running a script in the |
Fwiw we do |
Summary
I don't know what I'm doing and this doesn't work.
Test Plan
See contributing.md. I didn't get passed
uv sync