ipymovehub 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. ipymovehub-0.1.0/.copier-answers.yml +17 -0
  2. ipymovehub-0.1.0/.gitignore +128 -0
  3. ipymovehub-0.1.0/.prettierignore +8 -0
  4. ipymovehub-0.1.0/.yarnrc.yml +2 -0
  5. ipymovehub-0.1.0/CHANGELOG.md +5 -0
  6. ipymovehub-0.1.0/CONTRIBUTING.md +80 -0
  7. ipymovehub-0.1.0/LICENSE +29 -0
  8. ipymovehub-0.1.0/PKG-INFO +57 -0
  9. ipymovehub-0.1.0/README.md +27 -0
  10. ipymovehub-0.1.0/RELEASE.md +88 -0
  11. ipymovehub-0.1.0/babel.config.js +1 -0
  12. ipymovehub-0.1.0/eslint.config.mjs +69 -0
  13. ipymovehub-0.1.0/examples/introduction.ipynb +437 -0
  14. ipymovehub-0.1.0/install.json +5 -0
  15. ipymovehub-0.1.0/ipymovehub/__init__.py +17 -0
  16. ipymovehub-0.1.0/ipymovehub/_frontend.py +12 -0
  17. ipymovehub-0.1.0/ipymovehub/_version.py +4 -0
  18. ipymovehub-0.1.0/ipymovehub/ipymovehub.py +297 -0
  19. ipymovehub-0.1.0/ipymovehub/labextension/build_log.json +749 -0
  20. ipymovehub-0.1.0/ipymovehub/labextension/package.json +155 -0
  21. ipymovehub-0.1.0/ipymovehub/labextension/schemas/jupyter-movehub/package.json.orig +150 -0
  22. ipymovehub-0.1.0/ipymovehub/labextension/schemas/jupyter-movehub/plugin.json +8 -0
  23. ipymovehub-0.1.0/ipymovehub/labextension/static/lib_index_js.3fe9d1ec185d47d2.js +5459 -0
  24. ipymovehub-0.1.0/ipymovehub/labextension/static/lib_index_js.3fe9d1ec185d47d2.js.map +1 -0
  25. ipymovehub-0.1.0/ipymovehub/labextension/static/node_modules_base64-js_index_js.4822a4d8b1a3a873.js +159 -0
  26. ipymovehub-0.1.0/ipymovehub/labextension/static/node_modules_base64-js_index_js.4822a4d8b1a3a873.js.map +1 -0
  27. ipymovehub-0.1.0/ipymovehub/labextension/static/node_modules_ieee754_index_js.575f3862a63aafc8.js +93 -0
  28. ipymovehub-0.1.0/ipymovehub/labextension/static/node_modules_ieee754_index_js.575f3862a63aafc8.js.map +1 -0
  29. ipymovehub-0.1.0/ipymovehub/labextension/static/remoteEntry.e829ad46710a5d78.js +1016 -0
  30. ipymovehub-0.1.0/ipymovehub/labextension/static/remoteEntry.e829ad46710a5d78.js.map +1 -0
  31. ipymovehub-0.1.0/ipymovehub/labextension/static/style.js +4 -0
  32. ipymovehub-0.1.0/ipymovehub/labextension/static/style_index_js.1a322f420fae289e.js +771 -0
  33. ipymovehub-0.1.0/ipymovehub/labextension/static/style_index_js.1a322f420fae289e.js.map +1 -0
  34. ipymovehub-0.1.0/ipymovehub/labextension/static/vendors-node_modules_jupyter-bluetooth-manager_bluetooth_lib_index_js.c0e83a69058c5f80.js +368 -0
  35. ipymovehub-0.1.0/ipymovehub/labextension/static/vendors-node_modules_jupyter-bluetooth-manager_bluetooth_lib_index_js.c0e83a69058c5f80.js.map +1 -0
  36. ipymovehub-0.1.0/ipymovehub/labextension/static/vendors-node_modules_jupyter-widgets_base_lib_index_js.f1d0ef8a6334ebc4.js +22345 -0
  37. ipymovehub-0.1.0/ipymovehub/labextension/static/vendors-node_modules_jupyter-widgets_base_lib_index_js.f1d0ef8a6334ebc4.js.map +1 -0
  38. ipymovehub-0.1.0/ipymovehub/labextension/static/vendors-node_modules_react-battery-gauge_dist_react-battery-gauge_esm_js.ded8dad0ee13fca1.js +619 -0
  39. ipymovehub-0.1.0/ipymovehub/labextension/static/vendors-node_modules_react-battery-gauge_dist_react-battery-gauge_esm_js.ded8dad0ee13fca1.js.map +1 -0
  40. ipymovehub-0.1.0/jest.config.js +28 -0
  41. ipymovehub-0.1.0/package-lock.json +16492 -0
  42. ipymovehub-0.1.0/package.json +150 -0
  43. ipymovehub-0.1.0/pyproject.toml +81 -0
  44. ipymovehub-0.1.0/schema/plugin.json +8 -0
  45. ipymovehub-0.1.0/src/__tests__/jupyter_movehub.spec.ts +9 -0
  46. ipymovehub-0.1.0/src/index.ts +36 -0
  47. ipymovehub-0.1.0/src/movehub/components/BatteryGauge.tsx +159 -0
  48. ipymovehub-0.1.0/src/movehub/components/ColorSelector.tsx +91 -0
  49. ipymovehub-0.1.0/src/movehub/components/ColoredCircleWithText.tsx +26 -0
  50. ipymovehub-0.1.0/src/movehub/components/ConnectionStatus.tsx +85 -0
  51. ipymovehub-0.1.0/src/movehub/components/CopyToClipboard.tsx +43 -0
  52. ipymovehub-0.1.0/src/movehub/components/DeviceIdentifier.tsx +53 -0
  53. ipymovehub-0.1.0/src/movehub/components/DeviceInfoTable.tsx +196 -0
  54. ipymovehub-0.1.0/src/movehub/components/DeviceInfoTableComplete.tsx +246 -0
  55. ipymovehub-0.1.0/src/movehub/components/Frankie.tsx +34 -0
  56. ipymovehub-0.1.0/src/movehub/components/FrankieComponent.tsx +87 -0
  57. ipymovehub-0.1.0/src/movehub/components/InputField.tsx +33 -0
  58. ipymovehub-0.1.0/src/movehub/components/LegoBuildSelector.tsx +46 -0
  59. ipymovehub-0.1.0/src/movehub/components/LegoBuildSpecific.tsx +37 -0
  60. ipymovehub-0.1.0/src/movehub/components/ManualControl.tsx +326 -0
  61. ipymovehub-0.1.0/src/movehub/components/MoveForm.tsx +96 -0
  62. ipymovehub-0.1.0/src/movehub/components/MoveHub.tsx +34 -0
  63. ipymovehub-0.1.0/src/movehub/components/MoveHubComponent.tsx +91 -0
  64. ipymovehub-0.1.0/src/movehub/components/MoveHubList.tsx +31 -0
  65. ipymovehub-0.1.0/src/movehub/components/MoveHubPanel.tsx +57 -0
  66. ipymovehub-0.1.0/src/movehub/components/MoveHubView.tsx +49 -0
  67. ipymovehub-0.1.0/src/movehub/components/Vernie.tsx +34 -0
  68. ipymovehub-0.1.0/src/movehub/components/VernieComponent.tsx +91 -0
  69. ipymovehub-0.1.0/src/movehub/icon.ts +18 -0
  70. ipymovehub-0.1.0/src/movehub/moveHub/helpers/buffer.ts +2327 -0
  71. ipymovehub-0.1.0/src/movehub/moveHub/helpers/eventEmitter.ts +82 -0
  72. ipymovehub-0.1.0/src/movehub/moveHub/hub/hub.ts +818 -0
  73. ipymovehub-0.1.0/src/movehub/moveHub/hub/hubAsync.ts +461 -0
  74. ipymovehub-0.1.0/src/movehub/moveHub/hub-control.ts +141 -0
  75. ipymovehub-0.1.0/src/movehub/moveHub/types.ts +98 -0
  76. ipymovehub-0.1.0/src/movehub/moveHub.ts +441 -0
  77. ipymovehub-0.1.0/src/movehub/svg.d.ts +4 -0
  78. ipymovehub-0.1.0/src/movehub-extension/extension.ts +16 -0
  79. ipymovehub-0.1.0/src/movehub-extension/index.ts +186 -0
  80. ipymovehub-0.1.0/src/movehub-extension/plugin.ts +58 -0
  81. ipymovehub-0.1.0/src/movehub-extension/version.ts +15 -0
  82. ipymovehub-0.1.0/src/movehub-extension/widget.tsx +322 -0
  83. ipymovehub-0.1.0/src/request.ts +51 -0
  84. ipymovehub-0.1.0/style/base.css +355 -0
  85. ipymovehub-0.1.0/style/icons/LegoBrick.svg +137 -0
  86. ipymovehub-0.1.0/style/icons/arrow-down.svg +97 -0
  87. ipymovehub-0.1.0/style/icons/arrow-up.svg +97 -0
  88. ipymovehub-0.1.0/style/icons/copy.svg +3 -0
  89. ipymovehub-0.1.0/style/icons/emptyDark.svg +43 -0
  90. ipymovehub-0.1.0/style/icons/emptyLight.svg +20 -0
  91. ipymovehub-0.1.0/style/icons/green-circle.svg +24 -0
  92. ipymovehub-0.1.0/style/icons/red-circle.svg +24 -0
  93. ipymovehub-0.1.0/style/icons/stop.svg +58 -0
  94. ipymovehub-0.1.0/style/icons/turn-left.svg +178 -0
  95. ipymovehub-0.1.0/style/icons/turn-right.svg +123 -0
  96. ipymovehub-0.1.0/style/images/FrankieSchematicDark.svg +100 -0
  97. ipymovehub-0.1.0/style/images/FrankieSchematicLight.svg +100 -0
  98. ipymovehub-0.1.0/style/images/MoveHubDark.svg +201 -0
  99. ipymovehub-0.1.0/style/images/MoveHubLight.svg +200 -0
  100. ipymovehub-0.1.0/style/images/VernieSchematicDark.svg +115 -0
  101. ipymovehub-0.1.0/style/images/VernieSchematicLight.svg +115 -0
  102. ipymovehub-0.1.0/style/index.css +1 -0
  103. ipymovehub-0.1.0/style/index.js +1 -0
  104. ipymovehub-0.1.0/tsconfig.json +28 -0
  105. ipymovehub-0.1.0/tsconfig.test.json +3 -0
  106. ipymovehub-0.1.0/ui-tests/README.md +167 -0
  107. ipymovehub-0.1.0/ui-tests/jupyter_server_test_config.py +12 -0
  108. ipymovehub-0.1.0/ui-tests/package-lock.json +5483 -0
  109. ipymovehub-0.1.0/ui-tests/package.json +15 -0
  110. ipymovehub-0.1.0/ui-tests/playwright.config.js +14 -0
  111. ipymovehub-0.1.0/ui-tests/tests/jupyter_movehub.spec.ts +21 -0
  112. ipymovehub-0.1.0/ui-tests/yarn.lock +3451 -0
  113. ipymovehub-0.1.0/yarn.lock +10438 -0
@@ -0,0 +1,17 @@
1
+ # Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
2
+ _commit: v4.6.4
3
+ _src_path: https://github.com/jupyterlab/extension-template
4
+ advanced: false
5
+ author_email: haudin.florence@gmail.com
6
+ author_name: Florence Haudin
7
+ has_ai_rules: false
8
+ has_binder: false
9
+ has_settings: true
10
+ kind: frontend
11
+ labextension_name: jupyter-movehub
12
+ project_short_description: A JupyterLab extension to connect to a Lego Move Hub and
13
+ drive Legoboost robots.
14
+ python_name: ipymovehub
15
+ repository: https://github.com/QuantStack/jupyter-movehub
16
+ test: true
17
+
@@ -0,0 +1,128 @@
1
+ *.bundle.*
2
+ lib/
3
+ node_modules/
4
+ *.log
5
+ .eslintcache
6
+ .stylelintcache
7
+ *.egg-info/
8
+ .ipynb_checkpoints
9
+ *.tsbuildinfo
10
+ ipymovehub/labextension
11
+ # Version file is handled by hatchling
12
+ ipymovehub/_version.py
13
+
14
+ # Integration tests
15
+ ui-tests/test-results/
16
+ ui-tests/playwright-report/
17
+
18
+ # Created by https://www.gitignore.io/api/python
19
+ # Edit at https://www.gitignore.io/?templates=python
20
+
21
+ ### Python ###
22
+ # Virtual environments
23
+ .venv
24
+
25
+ # Byte-compiled / optimized / DLL files
26
+ __pycache__/
27
+ *.py[cod]
28
+ *$py.class
29
+
30
+ # C extensions
31
+ *.so
32
+
33
+ # Distribution / packaging
34
+ .Python
35
+ build/
36
+ develop-eggs/
37
+ dist/
38
+ downloads/
39
+ eggs/
40
+ .eggs/
41
+ lib/
42
+ lib64/
43
+ parts/
44
+ sdist/
45
+ var/
46
+ wheels/
47
+ pip-wheel-metadata/
48
+ share/python-wheels/
49
+ .installed.cfg
50
+ *.egg
51
+ MANIFEST
52
+
53
+ # PyInstaller
54
+ # Usually these files are written by a python script from a template
55
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
56
+ *.manifest
57
+ *.spec
58
+
59
+ # Installer logs
60
+ pip-log.txt
61
+ pip-delete-this-directory.txt
62
+
63
+ # Unit test / coverage reports
64
+ htmlcov/
65
+ .tox/
66
+ .nox/
67
+ .coverage
68
+ .coverage.*
69
+ .cache
70
+ nosetests.xml
71
+ coverage/
72
+ coverage.xml
73
+ *.cover
74
+ .hypothesis/
75
+ .pytest_cache/
76
+
77
+ # Translations
78
+ *.mo
79
+ *.pot
80
+
81
+ # Scrapy stuff:
82
+ .scrapy
83
+
84
+ # Sphinx documentation
85
+ docs/_build/
86
+
87
+ # PyBuilder
88
+ target/
89
+
90
+ # pyenv
91
+ .python-version
92
+
93
+ # celery beat schedule file
94
+ celerybeat-schedule
95
+
96
+ # SageMath parsed files
97
+ *.sage.py
98
+
99
+ # Spyder project settings
100
+ .spyderproject
101
+ .spyproject
102
+
103
+ # Rope project settings
104
+ .ropeproject
105
+
106
+ # Mr Developer
107
+ .mr.developer.cfg
108
+ .project
109
+ .pydevproject
110
+
111
+ # mkdocs documentation
112
+ /site
113
+
114
+ # mypy
115
+ .mypy_cache/
116
+ .dmypy.json
117
+ dmypy.json
118
+
119
+ # Pyre type checker
120
+ .pyre/
121
+
122
+ # End of https://www.gitignore.io/api/python
123
+
124
+ # OSX files
125
+ .DS_Store
126
+
127
+ # Yarn cache
128
+ .yarn/
@@ -0,0 +1,8 @@
1
+ node_modules
2
+ **/node_modules
3
+ **/lib
4
+ **/package.json
5
+ !/package.json
6
+ ipymovehub
7
+ eslint.config.mjs
8
+ .venv
@@ -0,0 +1,2 @@
1
+ nodeLinker: node-modules
2
+ enableScripts: false
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ <!-- <START NEW CHANGELOG ENTRY> -->
4
+
5
+ <!-- <END NEW CHANGELOG ENTRY> -->
@@ -0,0 +1,80 @@
1
+ # Contributing
2
+
3
+ ## Development install
4
+
5
+ Note: You will need Node.js to build the extension package.
6
+ You may install it from [nodejs.org](https://nodejs.org/en/download). We
7
+ recommend using the latest LTS version of Node.js.
8
+
9
+ The `jlpm` command is JupyterLab's pinned version of
10
+ [yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
11
+ `yarn` or `npm` in lieu of `jlpm` below.
12
+
13
+ ```bash
14
+ # Clone the repo to your local environment
15
+ # Change directory to the ipymovehub directory
16
+
17
+ # Set up a virtual environment and install package in development mode
18
+ python -m venv .venv
19
+ source .venv/bin/activate
20
+ pip install --editable "."
21
+
22
+ # Link your development version of the extension with JupyterLab
23
+ jupyter-builder develop . --overwrite
24
+
25
+ # Rebuild extension Typescript source after making changes
26
+ # IMPORTANT: Unlike the steps above which are performed only once, do this step
27
+ # every time you make a change.
28
+ jlpm build
29
+ ```
30
+
31
+ You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.
32
+
33
+ ```bash
34
+ # Watch the source directory in one terminal, automatically rebuilding when needed
35
+ jlpm watch
36
+ # Run JupyterLab in another terminal
37
+ jupyter lab
38
+ ```
39
+
40
+ With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).
41
+
42
+ By default, the `jlpm build` command generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:
43
+
44
+ ```bash
45
+ jupyter lab build --minimize=False
46
+ ```
47
+
48
+ ## Development uninstall
49
+
50
+ ```bash
51
+ pip uninstall ipymovehub
52
+ ```
53
+
54
+ In development mode, you will also need to remove the symlink created by `jupyter-builder develop`
55
+ command. To find its location, you can run `jupyter labextension list` to figure out where the `labextensions`
56
+ folder is located. Then you can remove the symlink named `jupyter-movehub` within that folder.
57
+
58
+ ## Testing the extension
59
+
60
+ #### Frontend tests
61
+
62
+ This extension is using [Jest](https://jestjs.io/) for JavaScript code testing.
63
+
64
+ To execute them, execute:
65
+
66
+ ```sh
67
+ jlpm
68
+ jlpm test
69
+ ```
70
+
71
+ ### Integration tests
72
+
73
+ This extension uses [Playwright](https://playwright.dev/docs/intro) for the integration tests (aka user level tests).
74
+ More precisely, the JupyterLab helper [Galata](https://github.com/jupyterlab/jupyterlab/tree/master/galata) is used to handle testing the extension in JupyterLab.
75
+
76
+ More information is provided within the [ui-tests](./ui-tests/README.md) README.
77
+
78
+ ## Packaging the extension
79
+
80
+ See [RELEASE](RELEASE.md)
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Florence Haudin
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.5
2
+ Name: ipymovehub
3
+ Version: 0.1.0
4
+ Summary: A JupyterLab extension to connect to a Lego Move Hub and drive Legoboost robots.
5
+ Project-URL: Homepage, https://github.com/QuantStack/jupyter-movehub
6
+ Project-URL: Bug Tracker, https://github.com/QuantStack/jupyter-movehub/issues
7
+ Project-URL: Repository, https://github.com/QuantStack/jupyter-movehub.git
8
+ Author-email: Florence Haudin <haudin.florence@gmail.com>
9
+ License-Expression: BSD-3-Clause
10
+ License-File: LICENSE
11
+ Keywords: jupyter,jupyterlab,jupyterlab-extension
12
+ Classifier: Framework :: Jupyter
13
+ Classifier: Framework :: Jupyter :: JupyterLab
14
+ Classifier: Framework :: Jupyter :: JupyterLab :: 4
15
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions
16
+ Classifier: Framework :: Jupyter :: JupyterLab :: Extensions :: Prebuilt
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Requires-Python: >=3.10
25
+ Requires-Dist: jupyter-bluetooth-manager>=0.2.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: jupyter-builder>=1.2.0; extra == 'dev'
28
+ Requires-Dist: jupyterlab>=4; extra == 'dev'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # ipymovehub
32
+
33
+ A JupyterLab extension to connect to a Lego Move Hub and drive Legoboost robots.
34
+
35
+ ## Requirements
36
+
37
+ - JupyterLab >= 4.0.0
38
+
39
+ ## Install
40
+
41
+ To install the extension, execute:
42
+
43
+ ```bash
44
+ pip install ipymovehub
45
+ ```
46
+
47
+ ## Uninstall
48
+
49
+ To remove the extension, execute:
50
+
51
+ ```bash
52
+ pip uninstall ipymovehub
53
+ ```
54
+
55
+ ## Contributing
56
+
57
+ If you would like to contribute to this extension, please refer to the [Contributing Guide](CONTRIBUTING.md).
@@ -0,0 +1,27 @@
1
+ # ipymovehub
2
+
3
+ A JupyterLab extension to connect to a Lego Move Hub and drive Legoboost robots.
4
+
5
+ ## Requirements
6
+
7
+ - JupyterLab >= 4.0.0
8
+
9
+ ## Install
10
+
11
+ To install the extension, execute:
12
+
13
+ ```bash
14
+ pip install ipymovehub
15
+ ```
16
+
17
+ ## Uninstall
18
+
19
+ To remove the extension, execute:
20
+
21
+ ```bash
22
+ pip uninstall ipymovehub
23
+ ```
24
+
25
+ ## Contributing
26
+
27
+ If you would like to contribute to this extension, please refer to the [Contributing Guide](CONTRIBUTING.md).
@@ -0,0 +1,88 @@
1
+ # Making a new release of ipymovehub
2
+
3
+ The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).
4
+
5
+ ## Manual release
6
+
7
+ ### Python package
8
+
9
+ This extension can be distributed as Python packages. All of the Python
10
+ packaging instructions are in the `pyproject.toml` file to wrap your extension in a
11
+ Python package. Before generating a package, you first need to install some tools:
12
+
13
+ ```bash
14
+ pip install build twine hatch
15
+ ```
16
+
17
+ Bump the version using `hatch`. By default this will create a tag.
18
+ See the docs on [hatch-nodejs-version](https://github.com/agoose77/hatch-nodejs-version#semver) for details.
19
+
20
+ ```bash
21
+ hatch version <new-version>
22
+ ```
23
+
24
+ Make sure to clean up all the development files before building the package:
25
+
26
+ ```bash
27
+ jlpm clean:all
28
+ ```
29
+
30
+ You could also clean up the local git repository:
31
+
32
+ ```bash
33
+ git clean -dfX
34
+ ```
35
+
36
+ To create a Python source package (`.tar.gz`) and the binary package (`.whl`) in the `dist/` directory, do:
37
+
38
+ ```bash
39
+ python -m build
40
+ ```
41
+
42
+ > `python setup.py sdist bdist_wheel` is deprecated and will not work for this package.
43
+
44
+ Then to upload the package to PyPI, do:
45
+
46
+ ```bash
47
+ twine upload dist/*
48
+ ```
49
+
50
+ ### NPM package
51
+
52
+ To publish the frontend part of the extension as a NPM package, do:
53
+
54
+ ```bash
55
+ npm login
56
+ npm publish --access public
57
+ ```
58
+
59
+ ## Automated releases with the Jupyter Releaser
60
+
61
+ The extension repository should already be compatible with the Jupyter Releaser. But
62
+ the GitHub repository and the package managers need to be properly set up. Please
63
+ follow the instructions of the Jupyter Releaser [checklist](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo.html).
64
+
65
+ For the release workflows in this repository, make sure GitHub is configured with:
66
+
67
+ - a `release` environment
68
+ - an `APP_PRIVATE_KEY` secret
69
+ - an `APP_ID` repository variable
70
+
71
+ When using [npm trusted publishing](https://docs.npmjs.com/trusted-publishers), `NPM_TOKEN` is not required (and trusted publishing is recommended). Configure `NPM_TOKEN` only if you are publishing without trusted publishers.
72
+
73
+ Here is a summary of the steps to cut a new release:
74
+
75
+ - Go to the Actions panel
76
+ - Run the "Step 1: Prep Release" workflow
77
+ - Check the draft changelog
78
+ - Run the "Step 2: Publish Release" workflow
79
+
80
+ > [!NOTE]
81
+ > Check out the [workflow documentation](https://jupyter-releaser.readthedocs.io/en/latest/get_started/making_release_from_repo.html)
82
+ > for more information.
83
+
84
+ ## Publishing to `conda-forge`
85
+
86
+ If the package is not on conda forge yet, check the documentation to learn how to add it: https://conda-forge.org/docs/maintainer/adding_pkgs.html
87
+
88
+ Otherwise a bot should pick up the new version publish to PyPI, and open a new PR on the feedstock repository automatically.
@@ -0,0 +1 @@
1
+ module.exports = require('@jupyterlab/testutils/lib/babel.config');
@@ -0,0 +1,69 @@
1
+ import js from '@eslint/js';
2
+ import { defineConfig } from 'eslint/config';
3
+ import tseslint from 'typescript-eslint';
4
+ import prettierRecommended from 'eslint-plugin-prettier/recommended';
5
+ import globals from 'globals';
6
+ import jupyterPlugin from '@jupyter/eslint-plugin';
7
+
8
+ export default defineConfig([
9
+ {
10
+ ignores: [
11
+ 'node_modules',
12
+ 'dist',
13
+ 'coverage',
14
+ '**/*.js',
15
+ '**/*.d.ts',
16
+ '.venv',
17
+ 'tests',
18
+ '**/__tests__',
19
+ 'ui-tests'
20
+ ]
21
+ },
22
+ js.configs.recommended,
23
+ tseslint.configs.recommended,
24
+ jupyterPlugin.configs.recommended,
25
+ {
26
+ files: ['**/*.ts', '**/*.tsx'],
27
+ plugins: {
28
+ jupyter: jupyterPlugin
29
+ },
30
+ languageOptions: {
31
+ globals: {
32
+ ...globals.browser,
33
+ ...globals.es2015,
34
+ ...globals.node
35
+ },
36
+ parserOptions: {
37
+ project: 'tsconfig.json',
38
+ sourceType: 'module'
39
+ }
40
+ },
41
+ rules: {
42
+ '@typescript-eslint/naming-convention': [
43
+ 'error',
44
+ {
45
+ selector: 'interface',
46
+ format: ['PascalCase'],
47
+ custom: {
48
+ regex: '^I[A-Z]',
49
+ match: true
50
+ }
51
+ }
52
+ ],
53
+ '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
54
+ '@typescript-eslint/no-explicit-any': 'off',
55
+ '@typescript-eslint/no-namespace': 'off',
56
+ '@typescript-eslint/no-use-before-define': 'off',
57
+ '@typescript-eslint/quotes': [
58
+ 'error',
59
+ 'single',
60
+ { avoidEscape: true, allowTemplateLiterals: false }
61
+ ],
62
+ curly: ['error', 'all'],
63
+ eqeqeq: 'error',
64
+ 'prefer-arrow-callback': 'error',
65
+ 'jupyter/plugin-activation-args': 'off'
66
+ }
67
+ },
68
+ prettierRecommended
69
+ ]);