Repository navigation
Conversation
See astral-sh/ty#4315 Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
AlexWaygood
left a comment
There was a problem hiding this comment.
not totally sure about tool.uv.sources.ruff = {workspace = true}. LGTM otherwise.
| run: uv pip install -r docs/requirements.txt | ||
| - name: "Update README File" | ||
| run: python scripts/transform_readme.py --target mkdocs | ||
| run: uv run --only-group=docs python scripts/transform_readme.py --target mkdocs |
There was a problem hiding this comment.
does this also work?
| run: uv run --only-group=docs python scripts/transform_readme.py --target mkdocs | |
| run: uv run --only-group=docs scripts/transform_readme.py --target mkdocs |
(and etc. for the other script invocations)
There was a problem hiding this comment.
That actually produces a surprising error:
uv run --only-group=docs scripts/transform_readme.py --target mkdocs
error: Group `docs` is not defined in the project's `dependency-groups` table
I would have expected that to work though, maybe @zanieb understands why not?
There was a problem hiding this comment.
Also, doing uv run python <script> absolutely indicates a problem lol we should not do that
There was a problem hiding this comment.
I think basically every single-file script in scripts should be modernised as a PEP-723 script and we should delete scripts/pyproject.toml, the whole structure predates uv support for PEP-723
There was a problem hiding this comment.
Also, doing
uv run python <script>absolutely indicates a problem lol we should not do that
It might make sense to have a warning for that? I wasn't aware we had an idiom around it.
Signed-off-by: William Woodruff <[email protected]>
|
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Typing conformance resultsNo changes detected ✅Current numbersThe percentage of diagnostics emitted that were expected errors held steady at 97.68%. The percentage of expected errors that received a diagnostic held steady at 93.44%. The number of fully passing files held steady at 109/136. |
Memory usage reportMemory usage unchanged ✅ |
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
|
I think |
Signed-off-by: William Woodruff <[email protected]>
|
|
We might also just want to delete the |
|
(I'll preserve it for now but can remove.) |
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
I think it has been literally years since I tried to build Ruff's docs since I work almost exclusively on ty now, but I can see this potentially being useful if you're running the script locally? I'd defer to @ntBre and/or @dhruvmanila, but would lean towards keeping it for now |
AlexWaygood
left a comment
There was a problem hiding this comment.
Thanks so much for doing this!
| run: uv run --script scripts/transform_readme.py --target mkdocs | ||
| - name: "Generate docs" | ||
| run: python scripts/generate_mkdocs.py | ||
| run: uv run --script scripts/generate_mkdocs.py | ||
| - name: "Check docs formatting" | ||
| run: python scripts/check_docs_formatted.py | ||
| run: uv run --script scripts/check_docs_formatted.py |
There was a problem hiding this comment.
I think --script is unnecessary if the file you're passing as a positional argument has PEP-723 metadata in it (but it doesn't really matter much)
There was a problem hiding this comment.
This would be another good one for us to maybe warn on, if there's an idiom we have (I wasn't aware)
There was a problem hiding this comment.
Our repo AGENTS.md also has this in it:
- Avoid running
uv runfor any scripts from the repository root unless you use--no-project,--scriptor similar. Usinguv runfrom the Ruff repo root without these flags will build Ruff from source, which is very slow and usually unnecessary.
There was a problem hiding this comment.
Yeah that's just wrong, we should use PEP 723 scripts throughout instead
There was a problem hiding this comment.
I think that was added to AGENTS.md by an earlier, confused version of me
There was a problem hiding this comment.
kk, I'll do a follow on PR for that.
|
I have apparently used this |
Thx, removing! |
Co-authored-by: Alex Waygood <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Release workflows can restore shared GitHub caches through the docs Rust cache, automatic tool caching, and Docker builds. Remove the docs Rust cache and Docker GitHub cache configuration, and explicitly disable the known cache clients in binary builds and publishing jobs. Unrelated test and benchmark caches are unchanged. Port of astral-sh/uv#21168. This preserves the docs dependency-group migration from #27843 and disables caching on its replacement `setup-uv` step. Co-authored-by: Zanie Blue <[email protected]>
Python tooling can currently build third-party source distributions. Set `no-build` in the maintained Python projects and PEP 723 scripts, retaining named exceptions for Git-pinned tooling and the local ecosystem runner. Pin the isolated build dependencies for those exceptions, including their transitive requirements. Follows merged #27856, which gives the legacy `ruff-lsp` suite a dedicated, locked Python 3.12 test environment. Follow-up to #27843. Replaces #27840, which closed when the merged docs branch was deleted. Co-authored-by: zaniebot <[email protected]>
Summary
Like astral-sh/ty#4315
Test Plan
NFC, tested locally.