mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-21 23:25:39 +08:00
Fix ns-install-cli (#1754)
* Make ns-dev-sync-viser-message-defs a tyro CLI to fix ns-install-cli error * Fix pylint
This commit is contained in:
1 parent
2f18e323cd
commit
c1c7a3b283
2 files changed
+9
-2
No files matched your search
@@ -1,14 +1,14 @@
|
||||
"""Generate viser message definitions for TypeScript, by parsing Python dataclasses."""
|
||||
|
||||
import pathlib
|
||||
import subprocess
|
||||
|
||||
import tyro
|
||||
from viser.infra import generate_typescript_interfaces
|
||||
|
||||
from nerfstudio.viewer.viser import NerfstudioMessage
|
||||
|
||||
|
||||
def entrypoint() -> None:
|
||||
def main() -> None:
|
||||
"""Generate viser message definitions for TypeScript, by parsing Python dataclasses."""
|
||||
|
||||
# Generate typescript source.
|
||||
@@ -32,5 +32,11 @@ def entrypoint() -> None:
|
||||
subprocess.run(args=["prettier", "-w", str(target_path)], check=False)
|
||||
|
||||
|
||||
def entrypoint() -> None:
|
||||
"""Entrypoint for use with pyproject scripts."""
|
||||
# All entrypoints must currently be tyro CLIs.
|
||||
tyro.cli(main)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
entrypoint()
|
||||
Reference in new issue
Block a user