Skip to content

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
hbcarlos committed Jan 11, 2023
1 parent c31091b commit 0d333ad
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 56 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ node_modules/
*.tsbuildinfo
jupyterlab_lego_boost/labextension

# Version file is handled by hatchling
jupyterlab_lego_boost/_version.py

# Integration tests
ui-tests/test-results/
ui-tests/playwright-report/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Link: https://www.lego.com/en-de/product/boost-creative-toolbox-17101
To install the extension, execute:

```bash
micromamba create -n boost -c conda-forge python nodejs yarn jupyterlab==3.4 jupyter-packaging jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
micromamba create -n boost -c conda-forge python=3.9 nodejs=16 yarn jupyterlab=3.4 jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
micromamba activate boost
pip install jupyterlab-lego-boost
```
Expand Down Expand Up @@ -59,7 +59,7 @@ The `jlpm` command is JupyterLab's pinned version of
`yarn` or `npm` in lieu of `jlpm` below.

```bash
micromamba create -n boost -c conda-forge python nodejs yarn jupyterlab==3.4 jupyter-packaging jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
micromamba create -n boost -c conda-forge python=3.9 nodejs=16 yarn jupyterlab=3.4 jupyterlab-language-pack-es-ES jupyterlab-language-pack-fr-FR ipykernel xeus-python xeus-lua
micromamba activate boost
# Clone the repo to your local environment
# Change directory to the jupyterlab-lego-boost directory
Expand Down
14 changes: 2 additions & 12 deletions jupyterlab_lego_boost/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
import json
from pathlib import Path

from ._version import __version__


HERE = Path(__file__).parent.resolve()


with (HERE / "labextension" / "package.json").open() as fid:
data = json.load(fid)
from pathlib import Path


def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": data["name"]
"dest": "jupyterlab_lego_boost"
}]

23 changes: 0 additions & 23 deletions jupyterlab_lego_boost/_version.py

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"license": "BSD-3-Clause",
"author": {
"name": "Denisa Checiu",
"email": ""
"email": "[email protected]"
},
"files": [
"lib/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf}",
Expand Down
31 changes: 14 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[build-system]
requires = ["hatchling>=1.9.0", "hatch-nodejs-version", "jupyterlab~=3.4"]
requires = ["hatchling>=1.4.0", "hatch-nodejs-version", "jupyterlab~=3.4"]
build-backend = "hatchling.build"

[project]
name = "jupyterlab-lego-boost"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.7"
dependencies = ['jupyterlab-blockly>=0.2.1,<0.3']
classifiers = [
Expand All @@ -23,29 +24,28 @@ classifiers = [
]
dynamic = ["version", "description", "authors", "urls", "keywords"]

[project.license]
file = "LICENSE"

[project.optional-dependencies]
env = ["bleak", "pylgbst"]


[tool.hatch.version]
source = "nodejs"

[tool.hatch.metadata.hooks.nodejs]
fields = ["description", "authors", "urls"]

[tool.hatch.build]
ignore-vcs = true
[tool.hatch.build.targets.sdist]
artifacts = ["jupyterlab_lego_boost/labextension"]
exclude = [".github", "binder"]

[tool.hatch.build.targets.wheel.shared-data]
"install.json" = "share/jupyter/labextensions/jupyterlab-lego-boost/install.json"
"jupyterlab_lego_boost/labextension" = "share/jupyter/labextensions/jupyterlab-lego-boost/"

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

[tool.hatch.build.hooks.jupyter-builder]
dependencies = ["hatch-jupyter-builder>=0.6.2"]
dependencies = ["hatch-jupyter-builder>=0.5"]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = ["jupyterlab_lego_boost/labextension/static/style.js", "jupyterlab_lego_boost/labextension/package.json"]
skip-if-exists = ["jupyterlab_lego_boost/labextension/static/style.js"]
Expand All @@ -57,18 +57,15 @@ npm = ["jlpm"]
[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
build_cmd = "install:extension"
npm = ["jlpm"]


[tool.check-manifest]
ignore = ["jupyterlab_lego_boost/labextension/**", "yarn.lock", ".*", "package-lock.json"]


#[tool.jupyter-releaser]
#skip = ["check-links"]
source_dir = "src"
build_dir = "jupyterlab_lego_boost/labextension"

[tool.jupyter-releaser.options]
version_cmd = "hatch version"

[tool.jupyter-releaser.hooks]
before-build-npm = ["python -m pip install jupyterlab~=3.4", "jlpm"]
before-build-npm = ["python -m pip install jupyterlab~=3.4", "jlpm", "jlpm build:prod"]
before-build-python = ["jlpm clean:all"]

[tool.check-wheel-contents]
ignore = ["W002"]
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# setup.py shim for use with applications that require it.
__import__("setuptools").setup()
__import__('setuptools').setup()

0 comments on commit 0d333ad

Please sign in to comment.