Google Colab support with viewer (#747)

* allows bridge server to run on a different machine

* added script

* update version

* starting docs

* update docs and scripts

* ngrok support

* use tcp

* moving webrtc outside bridge server. wop

* lazy commit

* lazy commit

* running code. webrtc not working

* lazy commit

* better logic for webrtc connection

* cleanup

* todo comment

* working webrtc

* removed logging

* fixing black

* fix eslint

* fix python version

* fix readme

* misc cleanup

* small docs fix

Co-authored-by: Ethan Weber <ethanweber@Ethans-MacBook-Pro.local>
This commit is contained in:
Ethan WeberandEthan Weber authored and GitHub committed 2022-10-14 15:05:28 -07:00
1 parent a4755a1349
commit d71c05f256
37 files changed
+324 -329

No files matched your search

+4 -4
View File
@@ -7,7 +7,7 @@ import nbformat as nbf
import tyro
from rich.console import Console
console = Console(width=120)
CONSOLE = Console(width=120)
def main(check: bool = False):
@@ -47,7 +47,7 @@ def main(check: bool = False):
found_tags.append(val)
if len(found_keys) > 1:
console.print(f"[bold yellow]Found multiple tags {found_keys} for {ipath}")
CONSOLE.print(f"[bold yellow]Found multiple tags {found_keys} for {ipath}")
sys.exit(1)
if len(cell_tags) != len(found_tags):
@@ -59,7 +59,7 @@ def main(check: bool = False):
cell["metadata"]["tags"] = found_tags
if incorrect_metadata:
if check:
console.print(
CONSOLE.print(
f"[bold yellow]{ipath} has incorrect metadata. Call `python scripts.docs.add_nb_tags.py` to add it."
)
any_missing = True
@@ -68,7 +68,7 @@ def main(check: bool = False):
nbf.write(ntbk, ipath)
if not any_missing:
console.print("[green]All notebooks have correct metadata.")
CONSOLE.print("[green]All notebooks have correct metadata.")
if check and any_missing:
sys.exit(1)
+8 -8
View File
@@ -7,7 +7,7 @@ import tyro
from rich.console import Console
from rich.style import Style
console = Console(width=120)
CONSOLE = Console(width=120)
LOCAL_TESTS = ["Run license checks", "Run Black", "Python Pylint", "Test with pytest"]
@@ -20,7 +20,7 @@ def run_command(command: str) -> None:
"""
ret_code = subprocess.call(command, shell=True)
if ret_code != 0:
console.print(f"[bold red]Error: `{command}` failed. Exiting...")
CONSOLE.print(f"[bold red]Error: `{command}` failed. Exiting...")
sys.exit(1)
@@ -31,20 +31,20 @@ def main(clean_cache: bool = False):
clean_cache: whether to clean the cache before building docs.
"""
console.print("[green]Adding notebook documentation metadata")
CONSOLE.print("[green]Adding notebook documentation metadata")
run_command("python scripts/docs/add_nb_tags.py")
# Add checks for building documentation
console.print("[green]Building Documentation")
CONSOLE.print("[green]Building Documentation")
if clean_cache:
run_command("cd docs/; make clean; make html SPHINXOPTS='-W;'")
else:
run_command("cd docs/; make html SPHINXOPTS='-W;'")
console.line()
console.rule(characters="=", style=Style(color="green"))
console.print("[bold green]Done")
console.rule(characters="=", style=Style(color="green"))
CONSOLE.line()
CONSOLE.rule(characters="=", style=Style(color="green"))
CONSOLE.print("[bold green]Done")
CONSOLE.rule(characters="=", style=Style(color="green"))
if __name__ == "__main__":