-
-
Notifications
You must be signed in to change notification settings - Fork 3
Watch feature and tests #18
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
17b03b4
watch working
cronan03 b348a0b
watch test working
cronan03 13a585f
Update jupyter_builder/extension_commands/watch.py
cronan03 2ee307d
Update jupyter_builder/federated_extensions.py
cronan03 c107a38
sleep time increased in test
cronan03 eae28e7
Automatic application of license header
github-actions[bot] 2dd592c
Delete jupyter_builder/yarn.js
cronan03 6064dbf
ran precommit
cronan03 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,43 @@ | ||
| """A Jupyter-aware wrapper for the yarn package manager""" | ||
cronan03 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| import os | ||
|
|
||
| # Copyright (c) Jupyter Development Team. | ||
| # Distributed under the terms of the Modified BSD License. | ||
| import sys | ||
|
|
||
| from jupyterlab_server.process import subprocess, which | ||
|
|
||
| HERE = os.path.dirname(os.path.abspath(__file__)) | ||
| YARN_PATH = os.path.join(HERE, "staging", "yarn.js") | ||
|
|
||
|
|
||
| def execvp(cmd, argv): | ||
| """Execvp, except on Windows where it uses Popen. | ||
| The first argument, by convention, should point to the filename | ||
| associated with the file being executed. | ||
| Python provides execvp on Windows, but its behavior is problematic | ||
| (Python bug#9148). | ||
| """ | ||
| cmd = which(cmd) | ||
| if os.name == "nt": | ||
| import signal | ||
| import sys | ||
|
|
||
| p = subprocess.Popen([cmd] + argv[1:]) | ||
| # Don't raise KeyboardInterrupt in the parent process. | ||
| # Set this after spawning, to avoid subprocess inheriting handler. | ||
| signal.signal(signal.SIGINT, signal.SIG_IGN) | ||
| p.wait() | ||
| sys.exit(p.returncode) | ||
| else: | ||
| os.execvp(cmd, argv) # noqa S606 | ||
|
|
||
|
|
||
| def main(argv=None): | ||
| """Run node and return the result.""" | ||
| # Make sure node is available. | ||
| argv = argv or sys.argv[1:] | ||
| execvp("node", ["node", YARN_PATH, *argv]) | ||
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.