-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5880397
commit 5af0af4
Showing
7 changed files
with
887 additions
and
1,212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
nodeLinker: node-modules | ||
enableImmutableInstalls: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import subprocess | ||
from pathlib import Path | ||
from typing import Optional | ||
|
||
|
||
def execute(cmd: str, cwd: Optional[Path] = None) -> None: | ||
subprocess.run(cmd.split(" "), check=True, cwd=cwd) | ||
|
||
|
||
def install_dev() -> None: | ||
install_build_deps = "python -m pip install jupyterlab>=4,<5" | ||
install_js_deps = "jlpm install" | ||
|
||
python_package_prefix = "projects" | ||
python_packages = ["jupyter-collaboration-ui", "jupyter-docprovider", "jupyter-server-ydoc"] | ||
|
||
execute(install_build_deps) | ||
execute(install_js_deps) | ||
|
||
for py_package in python_packages: | ||
real_package_name = py_package.replace("-", "_") | ||
execute(f"pip uninstall {real_package_name} -y") | ||
execute(f"pip install -e {python_package_prefix}/{py_package}[test]") | ||
|
||
# List of server extensions | ||
if py_package in ["jupyter-server-ydoc"]: | ||
execute(f"jupyter server extension enable {real_package_name}") | ||
|
||
# List of jupyterlab extensions | ||
if py_package in ["jupyter-collaboration-ui", "jupyter-docprovider"]: | ||
execute( | ||
f"jupyter labextension develop --overwrite {python_package_prefix}/{py_package} --overwrite" | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
install_dev() |
Oops, something went wrong.