Skip to content

Commit

Permalink
Rename jupytercad-extension to base
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Nov 13, 2023
1 parent 530663f commit 188324d
Show file tree
Hide file tree
Showing 70 changed files with 132 additions and 176 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ repos:
- id: ruff
args: ['--fix']

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.53.0
hooks:
Expand Down
4 changes: 0 additions & 4 deletions jupytercad/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@
from .notebook import * # noqa


def _jupyter_labextension_paths():
return [{"src": "labextension", "dest": "@jupytercad/jupytercad-extension"}]


def _jupyter_server_extension_points():
return [{"module": __name__, "app": CadApp}]
2 changes: 1 addition & 1 deletion jupytercad/cadapp/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_page_config(base_url, app_name):
gpc(labextensions_path),
)
required_extensions = [
"@jupytercad/jupytercad-extension",
"@jupytercad/jupytercad-lab",
"@jupyter/collaboration-extension",
]
federated_extensions = page_config["federated_extensions"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@jupytercad/jupytercad-extension",
"name": "@jupytercad/base",
"version": "0.3.3",
"description": "A JupyterLab extension for 3D modelling.",
"keywords": [
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ export class SketcherReactWidget extends React.Component<IProps, IState> {
e.type === 'mousedown' && e.button === 2
? true
: e.type === 'mouseup'
? false
: this._mouse.button;
? false
: this._mouse.button;
if (e.type === 'wheel') {
this._mouse.wheel += -(e as WheelEvent).deltaY;
e.preventDefault();
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/jupytercad-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@jupyter/collaboration": "^1.0.0",
"@jupyter/docprovider": "^1.0.0",
"@jupyter/ydoc": "^0.3.4 || ^1.0.2",
"@jupytercad/jupytercad-extension": "^0.3.3",
"@jupytercad/base": "^0.3.3",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/application-extension": "^4.0.0",
"@jupyterlab/apputils": "^4.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RankedMenu, MenuSvg, homeIcon } from '@jupyterlab/ui-components';
import { CommandRegistry } from '@lumino/commands';
import { MenuBar } from '@lumino/widgets';
import { CommandIDs } from '@jupytercad/jupytercad-extension/lib/commands';
import { CommandIDs } from '@jupytercad/base/lib/commands';
import { IThemeManager } from '@jupyterlab/apputils';
export class MainMenu extends MenuBar {
constructor(options: {
Expand Down
48 changes: 0 additions & 48 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,54 +42,6 @@ dynamic = ["version", "description", "authors", "urls", "keywords"]
jcad = "jupytercad.jcad_ydoc:YJCad"
FCStd = "jupytercad.fcstd_ydoc:YFCStd"

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

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

[tool.hatch.build.targets.sdist]
artifacts = [
"/jupytercad/labextension",
"/jupytercad/notebook/objects/_schema/*.py",
"/jupytercad/cadapp/",
]
exclude = ["/.github", "/binder", "node_modules", "examples", "ui-tests"]

[tool.hatch.build.targets.wheel]
artifacts = ["/jupytercad/notebook/objects/_schema/*.py", "/jupytercad/cadapp/"]

[tool.hatch.build.targets.sdist.force-include]
"./packages" = "packages"

[tool.hatch.build.targets.wheel.shared-data]
"install.json" = "share/jupyter/labextensions/@jupytercad/jupytercad-extension/install.json"
"jupytercad/labextension" = "share/jupyter/labextensions/@jupytercad/jupytercad-extension"
"etc/jupyter" = "etc/jupyter"

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

[tool.hatch.build.hooks.jupyter-builder]
dependencies = ["hatch-jupyter-builder>=0.5"]
build-function = "hatch_jupyter_builder.npm_builder"
ensured-targets = [
"jupytercad/labextension/static/style.js",
"jupytercad/labextension/package.json",
"jupytercad/notebook/objects/_schema/box.py",
]
skip-if-exists = ["jupytercad/labextension/static/style.js"]

[tool.hatch.build.hooks.jupyter-builder.build-kwargs]
build_cmd = "build:prod"
npm = ["jlpm"]

[tool.hatch.build.hooks.jupyter-builder.editable-build-kwargs]
build_cmd = "install:extension"
npm = ["jlpm"]
source_dir = "src"
build_dir = "jupytercad/labextension"

[tool.jupyter-releaser.options]
version-cmd = "python scripts/bump-version.py"
python_packages = [
Expand Down
2 changes: 1 addition & 1 deletion python/jupytercad-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"build:worker:prod": "webpack --config worker.webpack.config.js --mode=production"
},
"dependencies": {
"@jupytercad/jupytercad-extension": "^0.3.3",
"@jupytercad/base": "^0.3.3",
"@jupytercad/jupytercad-opencascade": "^0.3.3",
"@jupytercad/jupytercad-worker": "^0.3.3",
"@jupyterlab/application": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion python/jupytercad-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
JupyterCadModel,
AnnotationModel,
JupyterCadWidget
} from '@jupytercad/jupytercad-extension';
} from '@jupytercad/base';
import { ITranslator } from '@jupyterlab/translation';
import { IMainMenu } from '@jupyterlab/mainmenu';
import { WidgetTracker } from '@jupyterlab/apputils';
Expand Down
33 changes: 31 additions & 2 deletions python/jupytercad-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,41 @@
"watch:labextension": "jupyter labextension watch ."
},
"dependencies": {
"@jupytercad/jupytercad-extension": "^0.3.3",
"@deathbeds/jupyterlab-rjsf": "^1.1.0",
"@jupyter/collaboration": "^1.0.0",
"@jupyter/docprovider": "^1.0.0",
"@jupyter/ydoc": "^0.3.4 || ^1.0.2",
"@jupytercad/jupytercad-opencascade": "^0.3.3",
"@jupytercad/jupytercad-schema": "^0.3.3",
"@jupytercad/jupytercad-worker": "^0.3.3",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/apputils": "^4.0.0",
"@jupyterlab/coreutils": "^6.0.0",
"@jupyterlab/services": "^7.0.0"
"@jupyterlab/docregistry": "^4.0.0",
"@jupyterlab/filebrowser": "^4.0.0",
"@jupyterlab/launcher": "^4.0.0",
"@jupyterlab/mainmenu": "^4.0.0",
"@jupyterlab/notebook": "^4.0.0",
"@jupyterlab/observables": "^5.0.0",
"@jupyterlab/services": "^7.0.0",
"@jupyterlab/translation": "^4.0.0",
"@jupyterlab/ui-components": "^4.0.0",
"@lumino/commands": "^2.0.0",
"@lumino/coreutils": "^2.0.0",
"@lumino/signaling": "^2.0.0",
"@lumino/widgets": "^2.0.0",
"@naisutech/react-tree": "^3.0.1",
"@rjsf/core": "^4.2.0",
"@types/d3-color": "^3.1.0",
"@types/three": "^0.134.0",
"d3-color": "^3.1.0",
"lib0": "^0.2.62",
"react": "^18.0.1",
"styled-components": "^5.3.6",
"three": "^0.135.0",
"three-mesh-bvh": "^0.5.17",
"uuid": "^8.3.2",
"yjs-widgets": "^0.3.3"
},
"devDependencies": {
"@jupyterlab/builder": "^4.0.0",
Expand Down
46 changes: 0 additions & 46 deletions python/jupytercad-lab/src/handler.ts

This file was deleted.

Loading

0 comments on commit 188324d

Please sign in to comment.