-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #119 from blink1073/test-upgrade-script
Upgrade extensions for JupyterLab 3.0
- Loading branch information
Showing
115 changed files
with
2,772 additions
and
411 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
**/node_modules | ||
**/lib | ||
**/package.json | ||
**/static |
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,22 @@ | ||
include LICENSE | ||
include README.md | ||
include pyproject.toml | ||
include jupyter-config/jupyterlab_examples_kernel_messaging.json | ||
|
||
include package.json | ||
include ts*.json | ||
|
||
graft jupyterlab_examples_kernel_messaging/static | ||
|
||
# Javascript files | ||
graft src | ||
graft style | ||
prune **/node_modules | ||
prune lib | ||
|
||
# Patterns to exclude from any directory | ||
global-exclude *~ | ||
global-exclude *.pyc | ||
global-exclude *.pyo | ||
global-exclude .git | ||
global-exclude .ipynb_checkpoints |
19 changes: 19 additions & 0 deletions
19
advanced/kernel-messaging/jupyterlab_examples_kernel_messaging/__init__.py
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 @@ | ||
|
||
import json | ||
import os.path as osp | ||
|
||
from ._version import __version__ | ||
|
||
HERE = osp.abspath(osp.dirname(__file__)) | ||
|
||
with open(osp.join(HERE, 'static', 'package.json')) as fid: | ||
data = json.load(fid) | ||
|
||
def _jupyter_labextension_paths(): | ||
return [{ | ||
'src': 'static', | ||
'dest': data['name'] | ||
}] | ||
|
||
|
||
|
2 changes: 2 additions & 0 deletions
2
advanced/kernel-messaging/jupyterlab_examples_kernel_messaging/_version.py
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,2 @@ | ||
version_info = (0, 1, 0) | ||
__version__ = ".".join(map(str, version_info)) |
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,3 @@ | ||
[build-system] | ||
requires = ["jupyter_packaging~=0.7.0", "jupyterlab~=3.0.0b4", "setuptools>=40.8.0", "wheel"] | ||
build-backend = "setuptools.build_meta" |
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,85 @@ | ||
""" | ||
jupyterlab_examples_kernel_messaging setup | ||
""" | ||
import os | ||
|
||
from jupyter_packaging import ( | ||
create_cmdclass, install_npm, ensure_targets, | ||
combine_commands, get_version, | ||
) | ||
import setuptools | ||
|
||
HERE = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
# The name of the project | ||
name="jupyterlab_examples_kernel_messaging" | ||
|
||
# Get our version | ||
version = get_version(os.path.join(name, "_version.py")) | ||
|
||
lab_path = os.path.join(HERE, name, "static") | ||
|
||
# Representative files that should exist after a successful build | ||
jstargets = [ | ||
os.path.join(HERE, "lib", "index.js"), | ||
os.path.join(HERE, name, "static", "package.json"), | ||
] | ||
|
||
package_data_spec = { | ||
name: [ | ||
"*" | ||
] | ||
} | ||
|
||
labext_name = "@jupyterlab-examples/kernel-messaging" | ||
|
||
data_files_spec = [ | ||
("share/jupyter/labextensions/%s" % labext_name, lab_path, "*.*"), | ||
] | ||
|
||
cmdclass = create_cmdclass("jsdeps", | ||
package_data_spec=package_data_spec, | ||
data_files_spec=data_files_spec | ||
) | ||
|
||
cmdclass["jsdeps"] = combine_commands( | ||
install_npm(HERE, build_cmd="build:all", npm=["jlpm"]), | ||
ensure_targets(jstargets), | ||
) | ||
|
||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
setup_args = dict( | ||
name=name, | ||
version=version, | ||
url="https://github.com/jupyterlab/extension-examples.git", | ||
author="Project Jupyter Contributors", | ||
description="minimal lab example", | ||
long_description= long_description, | ||
long_description_content_type="text/markdown", | ||
cmdclass= cmdclass, | ||
packages=setuptools.find_packages(), | ||
install_requires=[ | ||
"jupyterlab~=3.0.0b4", | ||
], | ||
zip_safe=False, | ||
include_package_data=True, | ||
python_requires=">=3.6", | ||
license="BSD-3-Clause", | ||
platforms="Linux, Mac OS X, Windows", | ||
keywords=["Jupyter", "JupyterLab"], | ||
classifiers=[ | ||
"License :: OSI Approved :: BSD License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Programming Language :: Python :: 3.8", | ||
"Framework :: Jupyter", | ||
], | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
setuptools.setup(**setup_args) |
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,22 @@ | ||
include LICENSE | ||
include README.md | ||
include pyproject.toml | ||
include jupyter-config/jupyterlab_examples_kernel_output.json | ||
|
||
include package.json | ||
include ts*.json | ||
|
||
graft jupyterlab_examples_kernel_output/static | ||
|
||
# Javascript files | ||
graft src | ||
graft style | ||
prune **/node_modules | ||
prune lib | ||
|
||
# Patterns to exclude from any directory | ||
global-exclude *~ | ||
global-exclude *.pyc | ||
global-exclude *.pyo | ||
global-exclude .git | ||
global-exclude .ipynb_checkpoints |
19 changes: 19 additions & 0 deletions
19
advanced/kernel-output/jupyterlab_examples_kernel_output/__init__.py
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 @@ | ||
|
||
import json | ||
import os.path as osp | ||
|
||
from ._version import __version__ | ||
|
||
HERE = osp.abspath(osp.dirname(__file__)) | ||
|
||
with open(osp.join(HERE, 'static', 'package.json')) as fid: | ||
data = json.load(fid) | ||
|
||
def _jupyter_labextension_paths(): | ||
return [{ | ||
'src': 'static', | ||
'dest': data['name'] | ||
}] | ||
|
||
|
||
|
2 changes: 2 additions & 0 deletions
2
advanced/kernel-output/jupyterlab_examples_kernel_output/_version.py
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,2 @@ | ||
version_info = (0, 1, 0) | ||
__version__ = ".".join(map(str, version_info)) |
Oops, something went wrong.