-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Port to JupyterLab 3 * Fix federated packaging * Load styles from nbdime * Fix linter * fixes after merge * re-remove pyproject.toml, some py sanity checks * appease coverage with tiny smoke tests * update test deps * resolve yarn lock * use enzyme-adapter-react-17 * Update yarn.lock * Update requirements Co-authored-by: Nicholas Bollweg <nick.bollweg@gmail.com> Co-authored-by: Frédéric Collonval <frederic.collonval@ariadnext.com>
- Loading branch information
1 parent
d2e66e6
commit 776fef8
Showing
28 changed files
with
3,685 additions
and
2,274 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
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
**/node_modules | ||
**/lib | ||
**/package.json | ||
jupyterlab_pullrequests |
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,3 +1,5 @@ | ||
{ | ||
"singleQuote": true | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"arrowParens": "avoid" | ||
} |
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
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,5 @@ | ||
{ | ||
"packageManager": "python", | ||
"packageName": "jupyterlab-pullrequests", | ||
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyterlab-pullrequests" | ||
} |
File renamed without changes.
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,7 @@ | ||
{ | ||
"ServerApp": { | ||
"jpserver_extensions": { | ||
"jupyterlab_pullrequests": true | ||
} | ||
} | ||
} |
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,21 +1,24 @@ | ||
from ._version import __version__ | ||
from ._version import __version__, __js__ | ||
|
||
def _jupyter_labextension_paths(): | ||
return [{"src": "labextension", "dest": __js__["name"]}] | ||
|
||
def _jupyter_server_extension_paths(): | ||
|
||
def _jupyter_server_extension_points(): | ||
return [{"module": "jupyterlab_pullrequests"}] | ||
|
||
|
||
def load_jupyter_server_extension(lab_app): | ||
def _load_jupyter_server_extension(server_app): | ||
"""Registers the API handler to receive HTTP requests from the frontend extension. | ||
Parameters | ||
---------- | ||
lab_app: jupyterlab.labapp.LabApp | ||
server_app: jupyterlab.labapp.LabApp | ||
JupyterLab application instance | ||
""" | ||
from .base import PRConfig | ||
from .handlers import setup_handlers | ||
|
||
config = PRConfig(config=lab_app.config) | ||
setup_handlers(lab_app.web_app, config) | ||
lab_app.log.info("Registered jupyterlab_pullrequests extension") | ||
config = PRConfig(config=server_app.config) | ||
setup_handlers(server_app.web_app, config) | ||
server_app.log.info("Registered jupyterlab_pullrequests extension") |
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 +1,7 @@ | ||
__version__ = "2.1.0" | ||
""" read single source of truth from shipped labextension's package.json | ||
""" | ||
import json | ||
from pathlib import Path | ||
|
||
__js__ = json.loads((Path(__file__).parent / "labextension/package.json").read_text()) | ||
__version__ = __js__["version"] |
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 @@ | ||
pytest_plugins = ["jupyter_server.pytest_plugin"] |
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,19 @@ | ||
from tornado.web import Application | ||
|
||
from .. import ( | ||
_jupyter_labextension_paths, | ||
_jupyter_server_extension_points, | ||
_load_jupyter_server_extension, | ||
) | ||
|
||
|
||
def test_labextension(): | ||
assert len(_jupyter_labextension_paths()) == 1 | ||
|
||
|
||
def test_server_extension(): | ||
assert len(_jupyter_server_extension_points()) == 1 | ||
|
||
|
||
def test_load_extension(jp_serverapp): | ||
_load_jupyter_server_extension(jp_serverapp) |
Oops, something went wrong.