| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| ruff check examples tests src utils scripts | ||
| ruff format examples tests src utils scripts --check | ||
| run: make quality |
There was a problem hiding this comment.
I think it makes more sense to just run the make quality command here instead of manually repeating the exact same commands we already have under the quality alias of our Makefile.
Sorry, something went wrong.
| quality: | ||
| ruff check $(check_dirs) setup.py | ||
| ruff format --check $(check_dirs) setup.py | ||
| doc-builder style src/diffusers tests docs/source --max_len 119 --check_only |
There was a problem hiding this comment.
Major change 1.
Sorry, something went wrong.
| style: | ||
| ruff check $(check_dirs) setup.py --fix | ||
| ruff format $(check_dirs) setup.py | ||
| doc-builder style src/diffusers tests docs/source --max_len 119 |
There was a problem hiding this comment.
Major change 2.
Sorry, something went wrong.
| "torchvision", | ||
| "transformers>=4.25.1", | ||
| "urllib3<=2.0.0", | ||
| "black", |
There was a problem hiding this comment.
Major change 3.
Sorry, something went wrong.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Sorry, something went wrong.
|
The failing tests should be fixed with #7329 |
Sorry, something went wrong.
There was a problem hiding this comment.
thanks for doing this! I left one question
I'm really not too familiar this so I cced @BenjaminBossan for help here
are we not able to use Ruff to format code examples?
Sorry, something went wrong.
Unfortunately not. We rely on doc-builder to format those and it inherently relies on black. I did an effort to migrate that to ruff but it isn't that trivial: huggingface/doc-builder#485. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks Sayak, the PR looks good. This makes the code much easier to read, so great addition.
Sorry, something went wrong.
* add: utility to format our docs too 馃摐 * debugging saga * fix: message * checking * should be fixed. * revert pipeline_fixture * remove empty line * make style * fix: setup.py * style.
* add: utility to format our docs too 馃摐 * debugging saga * fix: message * checking * should be fixed. * revert pipeline_fixture * remove empty line * make style * fix: setup.py * style.
| Back | FazBrowse Home | New Git URL |
What does this PR do?
TL;DR: We should be formatting our docs with hf-doc-builder utility so that the code examples and other content in our docs are formatted properly.
This PR enables this for both in make style && make quality and in the CI.
Most of the changes in this PR are a result of running make style && make quality with the doc-formatting added. hf-doc-builder needs black as an implicit dependency.