mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 18:44:21 +08:00
Fixing nerfw and adding to GH Actions (#167)
* added beta_min to nerfw, which I think is needed * added camera interpolation path and restructured run_eval code * adding to gitignore * addressing github comments. mostly documentation * fixing nerfw dataset for test cases
This commit is contained in:
1 parent
f77d1fc110
commit
05b92e228b
13 files changed
+197
-67
No files matched your search
@@ -1,25 +1,31 @@
|
||||
"""Simple yaml debugger"""
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import Optional
|
||||
|
||||
import yaml
|
||||
|
||||
LOCAL_TESTS = ["Run license checks", "Run Black", "Python Pylint", "Test with pytest"]
|
||||
|
||||
|
||||
def run_command(command) -> None:
|
||||
def run_command(command: str, continue_on_fail: bool = False) -> None:
|
||||
"""Run a command kill actions if it fails
|
||||
|
||||
Args:
|
||||
command (str): command to run
|
||||
command: command to run
|
||||
"""
|
||||
ret_code = subprocess.call(command, shell=True)
|
||||
if ret_code != 0:
|
||||
if not continue_on_fail and ret_code != 0:
|
||||
print(f"\033[31mError: `{command}` failed. Exiting...\033[0m")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
def main(continue_on_fail: Optional[bool] = False):
|
||||
"""Run the github actions locally.
|
||||
|
||||
Args:
|
||||
continue_on_fail: Whether to continue running actions commands if the current one fails. Defaults to False.
|
||||
"""
|
||||
with open(".github/workflows/code_checks.yml", "rb") as f:
|
||||
my_dict = yaml.safe_load(f)
|
||||
steps = my_dict["jobs"]["build"]["steps"]
|
||||
@@ -34,7 +40,7 @@ if __name__ == "__main__":
|
||||
|
||||
print("*" * 100)
|
||||
print_green(f"Running: {curr_command}")
|
||||
run_command(curr_command)
|
||||
run_command(curr_command, continue_on_fail=continue_on_fail)
|
||||
else:
|
||||
print("*" * 100)
|
||||
print(f"Skipping {step}")
|
||||
@@ -47,3 +53,7 @@ if __name__ == "__main__":
|
||||
print_green("=" * 100)
|
||||
print_green("ALL CHECKS PASSED")
|
||||
print_green("=" * 100)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(continue_on_fail=False)
|
||||
Reference in new issue
Block a user