mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-13 11:24:00 +08:00
adding scripts for easy local run (#59)
This commit is contained in:
1 parent
0b82c1188c
commit
3a35bcda91
3 files changed
+86
-1
No files matched your search
@@ -0,0 +1,26 @@
|
||||
"""Simple yaml debugger"""
|
||||
import subprocess
|
||||
|
||||
import yaml
|
||||
|
||||
LOCAL_TESTS = ["Run Black", "Python Pylint", "Test with pytest"]
|
||||
|
||||
if __name__ == "__main__":
|
||||
with open(".github/workflows/code_checks.yml", "rb") as f:
|
||||
my_dict = yaml.safe_load(f)
|
||||
steps = my_dict["jobs"]["build"]["steps"]
|
||||
|
||||
for step in steps:
|
||||
if "name" in step and step["name"] in LOCAL_TESTS:
|
||||
if step["name"] == "Run Black":
|
||||
curr_command = f"black mattport/ {step['with']['options']};"
|
||||
else:
|
||||
compressed = step["run"].replace("\n", "").replace("\\", "")
|
||||
curr_command = f"{compressed};"
|
||||
|
||||
print("*" * 100)
|
||||
print(f"Running {curr_command}")
|
||||
subprocess.call(curr_command, shell=True)
|
||||
else:
|
||||
print("*" * 100)
|
||||
print(f"Skipping {step}")
|
||||
Reference in new issue
Block a user