mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-06 07:48:50 +08:00
Use github output format for ruff in CI (#2786)
* Use github output format for ruff in CI * Fix --------- Co-authored-by: Justin Kerr <justin.g.kerr@gmail.com>
This commit is contained in:
1 parent
99073eb187
commit
c27b5cb65f
2 files changed
+10
-7
No files matched your search
@@ -33,9 +33,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python ./nerfstudio/scripts/docs/add_nb_tags.py --check
|
python ./nerfstudio/scripts/docs/add_nb_tags.py --check
|
||||||
- name: Run Ruff Linter
|
- name: Run Ruff Linter
|
||||||
run: ruff check docs/ nerfstudio/ tests/
|
run: ruff check docs/ nerfstudio/ tests/ --output-format=github
|
||||||
- name: Run Ruff Formatter
|
- name: Run Ruff Formatter
|
||||||
run: ruff format docs/ nerfstudio/ tests/ --check
|
run: ruff format docs/ nerfstudio/ tests/ --diff
|
||||||
- name: Run Pyright
|
- name: Run Pyright
|
||||||
run: |
|
run: |
|
||||||
pyright
|
pyright
|
||||||
|
|||||||
@@ -56,11 +56,14 @@ def run_github_actions_file(filename: str, continue_on_fail: bool = False):
|
|||||||
|
|
||||||
for step in steps:
|
for step in steps:
|
||||||
if "name" in step and step["name"] in LOCAL_TESTS:
|
if "name" in step and step["name"] in LOCAL_TESTS:
|
||||||
compressed = step["run"].replace("\n", ";").replace("\\", "")
|
curr_command = step["run"].replace("\n", ";").replace("\\", "")
|
||||||
if "ruff check" in compressed:
|
if curr_command.startswith("ruff"):
|
||||||
curr_command = f"{compressed} --fix"
|
if "ruff check" in curr_command:
|
||||||
else:
|
curr_command = f"{curr_command} --fix"
|
||||||
curr_command = compressed.replace("--check", "")
|
|
||||||
|
curr_command = curr_command.replace(" --check", "")
|
||||||
|
curr_command = curr_command.replace(" --diff", "")
|
||||||
|
curr_command = curr_command.replace(" --output-format=github", "")
|
||||||
|
|
||||||
CONSOLE.line()
|
CONSOLE.line()
|
||||||
CONSOLE.rule(f"[bold green]Running: {curr_command}")
|
CONSOLE.rule(f"[bold green]Running: {curr_command}")
|
||||||
|
|||||||
Reference in new issue
Block a user