Skip to content

Commit 0bfa4a8

Browse files
committed
remove more unneeded stuff
1 parent a066362 commit 0bfa4a8

File tree

4 files changed

+46
-81
lines changed

4 files changed

+46
-81
lines changed

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
1-
# py5jupyter_ts = $(shell find src/ -name "*.ts")
21
py5jupyter_py = $(shell find py5jupyter/ -name "*.py")
32
py5jupyter_build = dist/
43
py5jupyter_installed = .install_py5jupyter.nogit
54

65
all: install
76

8-
# # YOU MUST INITIALIZE NPM BEFORE ATTEMPTING TO RUN THE BUILD
9-
# init:
10-
# npm install
11-
127
build: $(py5jupyter_build)
138
$(py5jupyter_build): $(py5jupyter_py)
149
hatch build

py5jupyter/__init__.py

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,48 +20,47 @@
2020
from . import widgets # noqa
2121
from ._version import __version__, version_info # noqa
2222

23+
# def _jupyter_labextension_paths():
24+
# """Called by Jupyter Lab Server to detect if it is a valid labextension and
25+
# to install the widget
26+
# Returns
27+
# =======
28+
# src: Source directory name to copy files from. Webpack outputs generated files
29+
# into this directory and Jupyter Lab copies from this directory during
30+
# widget installation
31+
# dest: Destination directory name to install widget files to. Jupyter Lab copies
32+
# from `src` directory into <jupyter path>/labextensions/<dest> directory
33+
# during widget installation
34+
# """
35+
# return [
36+
# {
37+
# "src": "labextension",
38+
# "dest": "jupyter-py5",
39+
# }
40+
# ]
2341

24-
def _jupyter_labextension_paths():
25-
"""Called by Jupyter Lab Server to detect if it is a valid labextension and
26-
to install the widget
27-
Returns
28-
=======
29-
src: Source directory name to copy files from. Webpack outputs generated files
30-
into this directory and Jupyter Lab copies from this directory during
31-
widget installation
32-
dest: Destination directory name to install widget files to. Jupyter Lab copies
33-
from `src` directory into <jupyter path>/labextensions/<dest> directory
34-
during widget installation
35-
"""
36-
return [
37-
{
38-
"src": "labextension",
39-
"dest": "jupyter-py5",
40-
}
41-
]
4242

43-
44-
def _jupyter_nbextension_paths():
45-
"""Called by Jupyter Notebook Server to detect if it is a valid nbextension and
46-
to install the widget
47-
Returns
48-
=======
49-
section: The section of the Jupyter Notebook Server to change.
50-
Must be 'notebook' for widget extensions
51-
src: Source directory name to copy files from. Webpack outputs generated files
52-
into this directory and Jupyter Notebook copies from this directory during
53-
widget installation
54-
dest: Destination directory name to install widget files to. Jupyter Notebook copies
55-
from `src` directory into <jupyter path>/nbextensions/<dest> directory
56-
during widget installation
57-
require: Path to importable AMD Javascript module inside the
58-
<jupyter path>/nbextensions/<dest> directory
59-
"""
60-
return [
61-
{
62-
"section": "notebook",
63-
"src": "nbextension",
64-
"dest": "py5jupyter",
65-
"require": "py5jupyter/extension",
66-
}
67-
]
43+
# def _jupyter_nbextension_paths():
44+
# """Called by Jupyter Notebook Server to detect if it is a valid nbextension and
45+
# to install the widget
46+
# Returns
47+
# =======
48+
# section: The section of the Jupyter Notebook Server to change.
49+
# Must be 'notebook' for widget extensions
50+
# src: Source directory name to copy files from. Webpack outputs generated files
51+
# into this directory and Jupyter Notebook copies from this directory during
52+
# widget installation
53+
# dest: Destination directory name to install widget files to. Jupyter Notebook copies
54+
# from `src` directory into <jupyter path>/nbextensions/<dest> directory
55+
# during widget installation
56+
# require: Path to importable AMD Javascript module inside the
57+
# <jupyter path>/nbextensions/<dest> directory
58+
# """
59+
# return [
60+
# {
61+
# "section": "notebook",
62+
# "src": "nbextension",
63+
# "dest": "py5jupyter",
64+
# "require": "py5jupyter/extension",
65+
# }
66+
# ]

py5jupyter/widgets/sketchportal.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@
2222
import numpy as np
2323

2424
# from ipywidgets import DOMWidget
25-
from traitlets import Unicode, CUnicode, Bytes
25+
from traitlets import Bytes, CUnicode, Unicode
26+
2627
from ._frontend import module_name, module_version
2728

2829

2930
class Py5SketchPortal:
3031
pass
3132

33+
3234
class Py5SketchPortalArchived: # (DOMWidget):
3335
_model_module = Unicode(module_name).tag(sync=True)
3436
_model_module_version = Unicode(module_version).tag(sync=True)
@@ -62,7 +64,7 @@ def __init__(self, sketch, w, h, *args, **kwargs):
6264
# # Events
6365
def _handle_frontend_event(self, _, content, buffers):
6466
import py5
65-
from py5 import Py5MouseEvent, Py5KeyEvent
67+
from py5 import Py5KeyEvent, Py5MouseEvent
6668

6769
event_type = content.get("event", "")
6870
event_x = int(content.get("x", 0))

pyproject.toml

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -69,38 +69,7 @@ Download = "https://pypi.org/project/py5jupyter"
6969
Homepage = "https://py5coding.org/"
7070
"Source Code" = "https://github.com/py5coding/py5jupyter"
7171

72-
# [tool.hatch.build]
73-
# artifacts = [
74-
# "py5jupyter/nbextension/index.*",
75-
# "py5jupyter/labextension/*.tgz",
76-
# "py5jupyter/labextension",
77-
# ]
78-
79-
# [tool.hatch.build.targets.wheel.shared-data]
80-
# "py5jupyter/nbextension" = "share/jupyter/nbextensions/py5jupyter"
81-
# "py5jupyter/labextension" = "share/jupyter/labextensions/jupyter-py5"
82-
# "./install.json" = "share/jupyter/labextensions/jupyter-py5/install.json"
83-
# "./py5jupyter.json" = "etc/jupyter/nbconfig/notebook.d/py5jupyter.json"
84-
8572
[tool.hatch.build.targets.sdist]
8673
exclude = [
8774
".github",
8875
]
89-
90-
# [tool.hatch.build.hooks.jupyter-builder]
91-
# ensured-targets = [
92-
# "py5jupyter/nbextension/index.js",
93-
# "py5jupyter/labextension/package.json",
94-
# ]
95-
# skip-if-exists = [
96-
# "py5jupyter/nbextension/index.js",
97-
# "py5jupyter/labextension/package.json",
98-
# ]
99-
# dependencies = [
100-
# "hatch-jupyter-builder>=0.8.2",
101-
# ]
102-
# build-function = "hatch_jupyter_builder.npm_builder"
103-
104-
# [tool.hatch.build.hooks.jupyter-builder.build-kwargs]
105-
# path = "."
106-
# build_cmd = "build:prod"

0 commit comments

Comments
 (0)