Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made cli fixes to make mac version work.: #147

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = zero-true
description = A collaborative notebook built for data scientists
long_description = file: README.md
long_description_content_type = text/markdown
version = 0.0.dev42
version = 0.0.dev43

[options]
include_package_data = true
Expand Down
2 changes: 1 addition & 1 deletion zt_backend/tests/test_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import time


notebook_str = '''notebookId = "08bdd530-3544-473b-af28-bb04f8646dbd"
notebook_str = '''notebookId = "08bdd530-3544-473b-af28-bb04f8646dba"

[cells.57fbbd59-8f30-415c-87bf-8caae0374070]
cellType = "code"
Expand Down
13 changes: 7 additions & 6 deletions zt_dev_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ def app(port: Annotated[Optional[int], typer.Argument(help="Port number to bind
log_path = os.path.normpath(pkg_resources.resource_filename('zt_dev_cli', 'log_config.yaml'))
os.environ['RUN_MODE'] = 'app'
frontend_cmd = ["yarn", "run", "app", str(port)]
backend_cmd = ["start", "uvicorn", "zt_backend.main:app", "--reload", f"--log-config={log_path}"]
backend_cmd = ["uvicorn", "zt_backend.main:app", "--reload", f"--log-config={log_path}"]

backend_process = subprocess.Popen(backend_cmd, shell=True)
backend_process = subprocess.Popen(backend_cmd, shell=(os.name == 'nt'))
os.chdir("zt_frontend")
frontend_process = subprocess.Popen(frontend_cmd, shell=True)
frontend_process = subprocess.Popen(frontend_cmd, shell=(os.name == 'nt'))

backend_process.wait()
frontend_process.wait()
Expand All @@ -82,11 +82,12 @@ def notebook(port: Annotated[Optional[int], typer.Argument(help="Port number to
log_path = os.path.normpath(pkg_resources.resource_filename('zt_dev_cli', 'log_config.yaml'))
os.environ['RUN_MODE'] = 'dev'
frontend_cmd = ["yarn", "run", "dev", str(port)]
backend_cmd = ["start", "uvicorn", "zt_backend.main:app", "--reload", f"--log-config={log_path}"]
backend_cmd = ["uvicorn", "zt_backend.main:app", "--reload", f"--log-config={log_path}"]

backend_process = subprocess.Popen(backend_cmd, shell=True)

backend_process = subprocess.Popen(backend_cmd, shell=(os.name == 'nt'))
os.chdir("zt_frontend")
frontend_process = subprocess.Popen(frontend_cmd, shell=True)
frontend_process = subprocess.Popen(frontend_cmd, shell=(os.name == 'nt'))

backend_process.wait()
frontend_process.wait()
Expand Down
Loading