Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ author_name: Florence Haudin
has_binder: false
has_settings: true
kind: frontend
labextension_name: bluetooth-manager
labextension_name: jupyter-bluetooth-manager
project_short_description: A JupyterLab extension to manage to connect to devices
with web bluetooth.
python_name: bluetooth_manager
python_name: jupyter-bluetooth-manager
repository: https://github.com/QuantStack/bluetooth-manager
test: true

8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ jobs:

pip install build
python -m build
pip uninstall -y "bluetooth_manager" jupyterlab
pip uninstall -y "jupyter-bluetooth-manager" jupyterlab

- name: Upload extension packages
uses: actions/upload-artifact@v4
with:
name: extension-artifacts
path: dist/bluetooth_manager*
path: dist/jupyter_bluetooth_manager*
if-no-files-found: error

test_isolated:
Expand All @@ -79,7 +79,7 @@ jobs:
sudo rm -rf $(which node)
sudo rm -rf $(which node)

pip install "jupyterlab>=4.0.0,<5" bluetooth_manager*.whl
pip install "jupyterlab>=4.0.0,<5" jupyter_bluetooth_manager*.whl


jupyter labextension list
Expand Down Expand Up @@ -109,7 +109,7 @@ jobs:
- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab>=4.0.0,<5" bluetooth_manager*.whl
python -m pip install "jupyterlab>=4.0.0,<5" jupyter_bluetooth_manager*.whl

- name: Install dependencies
working-directory: ui-tests
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ node_modules/
*.egg-info/
.ipynb_checkpoints
*.tsbuildinfo
bluetooth_manager/labextension
jupyter_bluetooth_manager/labextension
# Version file is handled by hatchling
bluetooth_manager/_version.py
jupyter_bluetooth_manager/_version.py

# Integration tests
ui-tests/test-results/
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ node_modules
**/lib
**/package.json
!/package.json
bluetooth_manager
jupyter_bluetooth_manager
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bluetooth_manager
# jupyter-bluetooth-manager

A JupyterLab extension to manage to connect to devices with web bluetooth.

Expand All @@ -11,15 +11,15 @@ A JupyterLab extension to manage to connect to devices with web bluetooth.
To install the extension, execute:

```bash
pip install bluetooth_manager
pip install jupyter-bluetooth-manager
```

## Uninstall

To remove the extension, execute:

```bash
pip uninstall bluetooth_manager
pip uninstall jupyter-bluetooth-manager
```

## Contributing
Expand All @@ -34,7 +34,7 @@ The `jlpm` command is JupyterLab's pinned version of

```bash
# Clone the repo to your local environment
# Change directory to the bluetooth_manager directory
# Change directory to the jupyter-bluetooth-manager directory
# Install package in development mode
pip install -e "."
# Link your development version of the extension with JupyterLab
Expand Down Expand Up @@ -63,7 +63,7 @@ jupyter lab build --minimize=False
### Development uninstall

```bash
pip uninstall bluetooth_manager
pip uninstall jupyter-bluetooth-manager
```

In development mode, you will also need to remove the symlink created by `jupyter labextension develop`
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Making a new release of bluetooth_manager
# Making a new release of jupyter-bluetooth-manager

The extension can be published to `PyPI` and `npm` manually or using the [Jupyter Releaser](https://github.com/jupyter-server/jupyter_releaser).

Expand Down
16 changes: 8 additions & 8 deletions examples/test-widget-with-ipykernel.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "762d552a-dafd-4b4b-9b0c-8b6612d2415b",
"metadata": {
"scrolled": true
},
"outputs": [],
"source": [
"import asyncio \n",
"from bluetooth_manager import MoveHubWidget,LedColor,Port, Sensor\n",
"import asyncio\n",
"from jupyter_bluetooth_manager import MoveHubWidget,LedColor,Port, Sensor\n",
"from ipywidgets import Output\n",
"from IPython.display import display\n",
"\n",
"# the robot's LED supports the following colors\n",
"colors = [\n",
" \n",
"\n",
" LedColor.pink,\n",
" LedColor.purple,\n",
" LedColor.blue,\n",
Expand All @@ -53,7 +53,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "aae633ad-bbb2-45c2-a1ff-5fab18146172",
"metadata": {
"scrolled": true
Expand All @@ -76,7 +76,7 @@
],
"source": [
"# number of concurrent \"lanes\"\n",
"n_lanes = 4 \n",
"n_lanes = 4\n",
"widget = MoveHubWidget(n_lanes=n_lanes)\n",
"output = Output()\n",
"display(widget)"
Expand Down Expand Up @@ -179,13 +179,13 @@
"d_forward = 200\n",
"d_rotate = 300\n",
"output = Output()\n",
"async def main(lane,log, identifier): \n",
"async def main(lane,log, identifier):\n",
" for i in range(4):\n",
" await lane.set_led_async(\"red\")\n",
" await lane.motor_angle_multi_async(angle=d_forward, power_a=speed,power_b=speed)\n",
" await lane.set_led_async(\"green\")\n",
" await lane.motor_angle_multi_async(angle=d_rotate, power_a=speed,power_b=-1.0*speed)\n",
" \n",
"\n",
"widget.run_async_program(main, output=output);\n",
"output"
]
Expand Down
4 changes: 2 additions & 2 deletions install.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"packageManager": "python",
"packageName": "bluetooth_manager",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package bluetooth_manager"
"packageName": "jupyter-bluetooth-manager",
"uninstallInstructions": "Use your Python package manager (pip, conda, etc.) to uninstall the package jupyter-bluetooth-manager"
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
# in editable mode with pip. It is highly recommended to install
# the package from a stable release or in editable mode: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
import warnings
warnings.warn("Importing 'bluetooth_manager' outside a proper installation.")
warnings.warn("Importing 'jupyter_bluetooth_manager' outside a proper installation.")
__version__ = "dev"


def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "bluetooth-manager"
"dest": "jupyter-bluetooth-manager"
}]
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "bluetooth-manager",
"name": "jupyter-bluetooth-manager",
"version": "0.1.0",
"description": "A JupyterLab extension to manage to connect to devices with web bluetooth.",
"keywords": [
Expand Down Expand Up @@ -39,7 +39,7 @@
"clean": "jlpm clean:lib",
"clean:lib": "rimraf lib tsconfig.tsbuildinfo",
"clean:lintcache": "rimraf .eslintcache .stylelintcache",
"clean:labextension": "rimraf bluetooth_manager/labextension bluetooth_manager/_version.py",
"clean:labextension": "rimraf jupyter_bluetooth_manager/labextension jupyter_bluetooth_manager/_version.py",
"clean:all": "jlpm clean:lib && jlpm clean:labextension && jlpm clean:lintcache",
"eslint": "jlpm eslint:check --fix",
"eslint:check": "eslint . --cache --ext .ts,.tsx",
Expand Down Expand Up @@ -110,7 +110,7 @@
},
"jupyterlab": {
"extension": true,
"outputDir": "bluetooth_manager/labextension",
"outputDir": "jupyter_bluetooth_manager/labextension",
"schemaDir": "schema"
},
"eslintIgnore": [
Expand Down
18 changes: 9 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0
build-backend = "hatchling.build"

[project]
name = "bluetooth_manager"
name = "jupyter-bluetooth-manager"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.8"
Expand Down Expand Up @@ -33,24 +33,24 @@ source = "nodejs"
fields = ["description", "authors", "urls", "keywords"]

[tool.hatch.build.targets.sdist]
artifacts = ["bluetooth_manager/labextension"]
artifacts = ["jupyter_bluetooth_manager/labextension"]
exclude = [".github"]

[tool.hatch.build.targets.wheel.shared-data]
"bluetooth_manager/labextension" = "share/jupyter/labextensions/bluetooth-manager"
"install.json" = "share/jupyter/labextensions/bluetooth-manager/install.json"
"jupyter_bluetooth_manager/labextension" = "share/jupyter/labextensions/jupyter-bluetooth-manager"
"install.json" = "share/jupyter/labextensions/jupyter-bluetooth-manager/install.json"

[tool.hatch.build.hooks.version]
path = "bluetooth_manager/_version.py"
path = "jupyter_bluetooth_manager/_version.py"

[tool.hatch.build.hooks.jupyter-builder]
dependencies = ["hatch-jupyter-builder>=0.5"]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"bluetooth_manager/labextension/static/style.js",
"bluetooth_manager/labextension/package.json",
"jupyter_bluetooth_manager/labextension/static/style.js",
"jupyter_bluetooth_manager/labextension/package.json",
]
skip-if-exists = ["bluetooth_manager/labextension/static/style.js"]
skip-if-exists = ["jupyter_bluetooth_manager/labextension/static/style.js"]

[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
build_cmd = "build:prod"
Expand All @@ -60,7 +60,7 @@ npm = ["jlpm"]
build_cmd = "install:extension"
npm = ["jlpm"]
source_dir = "src"
build_dir = "bluetooth_manager/labextension"
build_dir = "jupyter_bluetooth_manager/labextension"

[tool.jupyter-releaser.options]
version_cmd = "hatch version"
Expand Down
4 changes: 2 additions & 2 deletions schema/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"jupyter.lab.shortcuts": [],
"title": "bluetooth-manager",
"description": "bluetooth-manager settings.",
"title": "jupyter-bluetooth-manager",
"description": "jupyter-bluetooth-manager settings.",
"type": "object",
"properties": {},
"additionalProperties": false
Expand Down
94 changes: 47 additions & 47 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4604,53 +4604,6 @@ __metadata:
languageName: node
linkType: hard

"bluetooth-manager@workspace:.":
version: 0.0.0-use.local
resolution: "bluetooth-manager@workspace:."
dependencies:
"@emotion/react": ^11.9.0
"@emotion/styled": ^11.9.0
"@jupyter-widgets/base": ^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6
"@jupyterlab/application": ^4.3.1
"@jupyterlab/builder": ^4.3.1
"@jupyterlab/running": ^4.3.1
"@jupyterlab/settingregistry": ^4.3.1
"@jupyterlab/testutils": ^4.3.1
"@jupyterlab/ui-components": ^4.3.1
"@mui/icons-material": 6.1.1
"@types/jest": ^29.2.0
"@types/json-schema": ^7.0.11
"@types/react": ^18.0.26
"@types/react-addons-linked-state-mixin": ^0.14.22
"@types/web-bluetooth": ^0.0.7
"@typescript-eslint/eslint-plugin": ^6.1.0
"@typescript-eslint/parser": ^6.1.0
base64-js: ^1.5.1
css-loader: ^6.7.1
eslint: ^8.36.0
eslint-config-prettier: ^8.8.0
eslint-plugin-prettier: ^5.0.0
ieee754: ^1.2.1
jest: ^29.2.0
npm-run-all: ^4.1.5
prettier: ^3.0.0
react: ^18.0.0
react-battery-gauge: 1.0.7
react-dom: ^18.0.0
react-select: 5.9.0
rimraf: ^5.0.1
source-map-loader: ^1.0.2
style-loader: ^3.3.1
stylelint: ^15.10.1
stylelint-config-recommended: ^13.0.0
stylelint-config-standard: ^34.0.0
stylelint-csstree-validator: ^3.0.0
stylelint-prettier: ^4.0.0
typescript: ~5.0.2
yjs: ^13.5.0
languageName: unknown
linkType: soft

"brace-expansion@npm:^1.1.7":
version: 1.1.11
resolution: "brace-expansion@npm:1.1.11"
Expand Down Expand Up @@ -7833,6 +7786,53 @@ __metadata:
languageName: node
linkType: hard

"jupyter-bluetooth-manager@workspace:.":
version: 0.0.0-use.local
resolution: "jupyter-bluetooth-manager@workspace:."
dependencies:
"@emotion/react": ^11.9.0
"@emotion/styled": ^11.9.0
"@jupyter-widgets/base": ^1.1.10 || ^2 || ^3 || ^4 || ^5 || ^6
"@jupyterlab/application": ^4.3.1
"@jupyterlab/builder": ^4.3.1
"@jupyterlab/running": ^4.3.1
"@jupyterlab/settingregistry": ^4.3.1
"@jupyterlab/testutils": ^4.3.1
"@jupyterlab/ui-components": ^4.3.1
"@mui/icons-material": 6.1.1
"@types/jest": ^29.2.0
"@types/json-schema": ^7.0.11
"@types/react": ^18.0.26
"@types/react-addons-linked-state-mixin": ^0.14.22
"@types/web-bluetooth": ^0.0.7
"@typescript-eslint/eslint-plugin": ^6.1.0
"@typescript-eslint/parser": ^6.1.0
base64-js: ^1.5.1
css-loader: ^6.7.1
eslint: ^8.36.0
eslint-config-prettier: ^8.8.0
eslint-plugin-prettier: ^5.0.0
ieee754: ^1.2.1
jest: ^29.2.0
npm-run-all: ^4.1.5
prettier: ^3.0.0
react: ^18.0.0
react-battery-gauge: 1.0.7
react-dom: ^18.0.0
react-select: 5.9.0
rimraf: ^5.0.1
source-map-loader: ^1.0.2
style-loader: ^3.3.1
stylelint: ^15.10.1
stylelint-config-recommended: ^13.0.0
stylelint-config-standard: ^34.0.0
stylelint-csstree-validator: ^3.0.0
stylelint-prettier: ^4.0.0
typescript: ~5.0.2
yjs: ^13.5.0
languageName: unknown
linkType: soft

"keyv@npm:^4.5.3":
version: 4.5.4
resolution: "keyv@npm:4.5.4"
Expand Down
Loading