Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a6c6d99

Browse files
committedApr 24, 2021
Rename and rebase
1 parent 593672d commit a6c6d99

File tree

24 files changed

+16004
-7562
lines changed

24 files changed

+16004
-7562
lines changed
 

‎.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ doc/.ipynb_checkpoints
4949
tags
5050
doc/check-or-enforce-order.py
5151

52-
packages/javascript/plotlywidget/lib/
53-
packages/python/plotly/plotlywidget/labextension/
54-
packages/python/plotly/plotlywidget/nbextension/index.js*
52+
packages/javascript/jupyterlab-plotly/lib/
53+
packages/python/plotly/jupyterlab_plotly/labextension/
54+
packages/python/plotly/jupyterlab_plotly/nbextension/index.js*
File renamed without changes.

‎packages/javascript/jupyterlab-plotly/package-lock.json

Lines changed: 15960 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎packages/javascript/plotlywidget/package.json renamed to ‎packages/javascript/jupyterlab-plotly/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "plotlywidget",
2+
"name": "jupyterlab-plotly",
33
"version": "4.14.3",
44
"description": "The plotly Jupyter extension",
55
"author": "The plotly.py team",
@@ -30,8 +30,8 @@
3030
"build:nbextension": "webpack --mode=production",
3131
"clean": "npm run clean:lib && npm run clean:nbextension && npm run clean:labextension",
3232
"clean:lib": "rimraf lib",
33-
"clean:labextension": "rimraf ../../python/plotly/plotlywidget/labextension",
34-
"clean:nbextension": "rimraf ../../python/plotly/plotlywidget/nbextension/index.js*",
33+
"clean:labextension": "rimraf ../../python/plotly/jupyterlab_plotly/labextension",
34+
"clean:nbextension": "rimraf ../../python/plotly/jupyterlab_plotly/nbextension/index.js*",
3535
"lint": "eslint . --ext .ts,.tsx --fix",
3636
"lint:check": "eslint . --ext .ts,.tsx",
3737
"prepack": "npm run build:lib",
@@ -70,7 +70,7 @@
7070
"jupyterlab": {
7171
"extension": "lib/jupyterlab-plugin",
7272
"mimeExtension": "lib/plotly-renderer",
73-
"outputDir": "../../python/plotly/plotlywidget/labextension",
73+
"outputDir": "../../python/plotly/jupyterlab_plotly/labextension",
7474
"sharedPackages": {
7575
"@jupyter-widgets/base": {
7676
"bundled": false,

‎packages/javascript/plotlywidget/src/extension.ts renamed to ‎packages/javascript/jupyterlab-plotly/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
99
(window as any).__webpack_public_path__ =
1010
document.querySelector('body')!.getAttribute('data-base-url') +
11-
'nbextensions/plotlywidget';
11+
'nbextensions/jupyterlab-plotly';
1212

1313
export * from './index';

‎packages/javascript/plotlywidget/src/jupyterlab-plugin.ts renamed to ‎packages/javascript/jupyterlab-plotly/src/jupyterlab-plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function activateWidgetExtension(
2424
* The widget plugin.
2525
*/
2626
const widgetPlugin: IPlugin<Application<Widget>, void> = ({
27-
id: "plotlywidget",
27+
id: "jupyterlab-plotly",
2828
requires: [IJupyterWidgetRegistry],
2929
activate: activateWidgetExtension,
3030
autoStart: true,

‎packages/javascript/plotlywidget/webpack.config.js renamed to ‎packages/javascript/jupyterlab-plotly/webpack.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ module.exports = [
3131
"..",
3232
"python",
3333
"plotly",
34-
"plotlywidget",
34+
"jupyterlab_plotly",
3535
"nbextension"
3636
),
3737
libraryTarget: "amd",
@@ -45,7 +45,7 @@ module.exports = [
4545
},
4646

4747
/**
48-
* Embeddable plotlywidget bundle
48+
* Embeddable jupyterlab-plotly bundle
4949
*
5050
* This bundle is almost identical to the notebook extension bundle. The only
5151
* difference is in the configuration of the webpack public path for the
@@ -60,8 +60,8 @@ module.exports = [
6060
filename: "index.js",
6161
path: path.resolve(__dirname, "dist"),
6262
libraryTarget: "amd",
63-
library: "plotlywidget",
64-
publicPath: "https://unpkg.com/plotlywidget@" + version + "/dist/",
63+
library: "jupyterlab-plotly",
64+
publicPath: "https://unpkg.com/jupyterlab-plotly@" + version + "/dist/",
6565
},
6666
module: {
6767
rules: rules,

‎packages/javascript/plotlywidget/package-lock.json

Lines changed: 0 additions & 7518 deletions
This file was deleted.

‎packages/python/plotly/MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include LICENSE.txt
22
include README.md
3-
include plotlywidget.json
3+
include jupyterlab-plotly.json
44
include versioneer.py
55
include plotly/_version.py
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"load_extensions": {
3+
"jupyterlab-plotly/extension": true
4+
}
5+
}
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
def _jupyter_labextension_paths():
2-
return [{"src": "labextension", "dest": "plotlywidget"}]
2+
return [{"src": "labextension", "dest": "jupyterlab-plotly"}]
33

44

55
def _jupyter_nbextension_paths():
66
return [
77
{
88
"section": "notebook",
99
"src": "nbextension",
10-
"dest": "plotlywidget",
11-
"require": "plotlywidget/extension",
10+
"dest": "jupyterlab-plotly",
11+
"require": "jupyterlab-plotly/extension",
1212
}
1313
]

‎packages/python/plotly/plotlywidget/nbextension/extension.js renamed to ‎packages/python/plotly/jupyterlab_plotly/nbextension/extension.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ define(function() {
77
window['requirejs'].config({
88
map: {
99
'*': {
10-
'plotlywidget': 'nbextensions/plotlywidget/index',
10+
'jupyterlab-plotly': 'nbextensions/jupyterlab-plotly/index',
1111
},
1212
}
1313
});

‎packages/python/plotly/plotly/basewidget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ class BaseFigureWidget(BaseFigure, widgets.DOMWidget):
2828
# Widget traitlets are automatically synchronized with the FigureModel
2929
# JavaScript object
3030
_view_name = Unicode("FigureView").tag(sync=True)
31-
_view_module = Unicode("plotlywidget").tag(sync=True)
31+
_view_module = Unicode("jupyterlab-plotly").tag(sync=True)
3232
_view_module_version = Unicode(__frontend_version__).tag(sync=True)
3333

3434
_model_name = Unicode("FigureModel").tag(sync=True)
35-
_model_module = Unicode("plotlywidget").tag(sync=True)
35+
_model_module = Unicode("jupyterlab-plotly").tag(sync=True)
3636
_model_module_version = Unicode(__frontend_version__).tag(sync=True)
3737

3838
# ### _data and _layout ###

‎packages/python/plotly/plotly/tests/test_core/test_offline/test_offline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def get_html():
316316

317317
@pytest.mark.nodev
318318
def test_plotlyjs_version(self):
319-
path = os.path.join(packages_root, "javascript", "plotlywidget", "package.json")
319+
path = os.path.join(packages_root, "javascript", "jupyterlab-plotly", "package.json")
320320
with open(path, "rt") as f:
321321
package_json = json.load(f)
322322
expected_version = package_json["dependencies"]["plotly.js"]

‎packages/python/plotly/plotlywidget.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎packages/python/plotly/setup.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
here = os.path.dirname(os.path.abspath(__file__))
2020
project_root = os.path.dirname(os.path.dirname(os.path.dirname(here)))
21-
node_root = os.path.join(project_root, "packages", "javascript", "plotlywidget")
21+
node_root = os.path.join(project_root, "packages", "javascript", "jupyterlab-plotly")
2222
is_repo = os.path.exists(os.path.join(project_root, ".git"))
2323

2424
npm_path = os.pathsep.join(
@@ -28,7 +28,7 @@
2828
]
2929
)
3030

31-
labstatic = "plotlywidget/labextension/static"
31+
labstatic = "jupyterlab_plotly/labextension/static"
3232
if not os.path.exists(labstatic):
3333
# Ensure the folder exists when we will look for files in it
3434
os.makedirs(labstatic)
@@ -44,7 +44,7 @@
4444
# Load plotly.js version from js/package.json
4545
def plotly_js_version():
4646
path = os.path.join(
47-
project_root, "packages", "javascript", "plotlywidget", "package.json"
47+
project_root, "packages", "javascript", "jupyterlab-plotly", "package.json"
4848
)
4949
with open(path, "rt") as f:
5050
package_json = json.load(f)
@@ -97,19 +97,19 @@ def update_package_data(distribution):
9797
distribution.data_files.extend(
9898
[
9999
(
100-
"share/jupyter/labextensions/plotlywidget",
101-
["plotlywidget/labextension/package.json",],
100+
"share/jupyter/labextensions/jupyterlab-plotly",
101+
["jupyterlab_plotly/labextension/package.json",],
102102
),
103103
(
104-
"share/jupyter/labextensions/plotlywidget/static",
104+
"share/jupyter/labextensions/jupyterlab-plotly/static",
105105
[os.path.join(labstatic, f) for f in os.listdir(labstatic)],
106106
),
107107
(
108-
"share/jupyter/nbextensions/plotlywidget",
108+
"share/jupyter/nbextensions/jupyterlab-plotly",
109109
[
110-
"plotlywidget/nbextension/extension.js",
111-
"plotlywidget/nbextension/index.js",
112-
"plotlywidget/nbextension/index.js.LICENSE.txt",
110+
"jupyterlab_plotly/nbextension/extension.js",
111+
"jupyterlab_plotly/nbextension/index.js",
112+
"jupyterlab_plotly/nbextension/index.js.LICENSE.txt",
113113
],
114114
),
115115
]
@@ -127,9 +127,9 @@ class NPM(Command):
127127
node_modules = os.path.join(node_root, "node_modules")
128128

129129
targets = [
130-
os.path.join(here, "plotlywidget", "nbextension", "extension.js"),
131-
os.path.join(here, "plotlywidget", "nbextension", "index.js"),
132-
os.path.join(here, "plotlywidget", "labextension", "package.json"),
130+
os.path.join(here, "jupyterlab_plotly", "nbextension", "extension.js"),
131+
os.path.join(here, "jupyterlab_plotly", "nbextension", "index.js"),
132+
os.path.join(here, "jupyterlab_plotly", "labextension", "package.json"),
133133
]
134134

135135
def initialize_options(self):
@@ -195,7 +195,7 @@ def run(self):
195195
if not os.path.exists(t):
196196
msg = "Missing file: %s" % t
197197
if not has_npm:
198-
msg += "\nnpm is required to build a development version of plotlywidget"
198+
msg += "\nnpm is required to build a development version of jupyterlab-plotly"
199199
raise ValueError(msg)
200200

201201
# update package data in case this created new files
@@ -442,7 +442,7 @@ def run(self):
442442

443443

444444
class UpdatePlotlywidgetVersionCommand(Command):
445-
description = "Update package.json version of plotlywidget"
445+
description = "Update package.json version of jupyterlab-plotly"
446446

447447
user_options = []
448448

@@ -512,8 +512,8 @@ def run(self):
512512
python_requires=">=3.6",
513513
license="MIT",
514514
packages=[
515+
"jupyterlab_plotly",
515516
"plotly",
516-
"plotlywidget",
517517
"plotly.plotly",
518518
"plotly.offline",
519519
"plotly.io",
@@ -539,9 +539,9 @@ def run(self):
539539
"package_data/templates/*",
540540
"package_data/datasets/*",
541541
],
542-
"plotlywidget": ["nbextension/*", "labextension/*", "labextension/static/*"],
542+
"jupyterlab_plotly": ["nbextension/*", "labextension/*", "labextension/static/*"],
543543
},
544-
data_files=[("etc/jupyter/nbconfig/notebook.d", ["plotlywidget.json"]),],
544+
data_files=[("etc/jupyter/nbconfig/notebook.d", ["jupyterlab-plotly.json"]),],
545545
install_requires=["tenacity>=6.2.0", "six"],
546546
zip_safe=False,
547547
cmdclass=dict(

0 commit comments

Comments
 (0)
Please sign in to comment.