Skip to content

Commit

Permalink
Rename jupytercad-opencascade to opencascade
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Nov 14, 2023
1 parent 847c84a commit 11a3afb
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 63 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ jobs:
uses: actions/cache@v2
with:
path: |
packages/jupytercad-opencascade/lib/jupytercad.opencascade.js
packages/jupytercad-opencascade/lib/jupytercad.opencascade.wasm
packages/jupytercad-opencascade/lib/jupytercad.opencascade.d.ts
packages/jupytercad-opencascade/lib/jupytercad.opencascade.version
key: ${{ hashFiles('packages/jupytercad-opencascade/build.yml') }}
packages/opencascade/lib/jupytercad.opencascade.js
packages/opencascade/lib/jupytercad.opencascade.wasm
packages/opencascade/lib/jupytercad.opencascade.d.ts
packages/opencascade/lib/jupytercad.opencascade.version
key: ${{ hashFiles('packages/opencascade/build.yml') }}

- name: Build the extension
shell: bash -l {0}
Expand Down
18 changes: 2 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jupyter lab build --minimize=False

JupyterCAD uses a custom build of Open Cascade WASM. For performance and data usage concern, we only build the symbols we need.

This custom build is done in the `jupytercad-opencascade` directory:
This custom build is done in the `packages/opencascade` directory:

```bash
cd jupytercad-opencascade
cd packages/opencascade
```

In order to rebuild it yourself, you need to install Docker, then you need to run the following (this may take some time):
Expand All @@ -60,20 +60,6 @@ In the case where you need to add new symbols, you can rebuild Open Cascade with
yarn run build --add symbol_to_add another_symbol ...
```

In order to build jupytercad with your local `jupytercad-opencascade` build, you can use `yarn link`:

```bash
# Link jupytercad-opencascade (this can be done only once)
cd jupytercad-opencascade
yarn link

cd ..
yarn link jupytercad-opencascade

# Rebuild jupytercad with our local jupytercad-opencascade
yarn run build
```

#### See also

Custom build doc: https://ocjs.org/docs/app-dev-workflow/custom-builds
Expand Down
2 changes: 1 addition & 1 deletion packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
"@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/occ-worker": "^0.3.3",
"@jupytercad/opencascade": "^0.3.3",
"@jupytercad/schema": "^0.3.3",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/apputils": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/occ-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"watch": "webpack --config worker.webpack.config.js --watch --mode=development"
},
"dependencies": {
"@jupytercad/jupytercad-opencascade": "^0.3.3",
"@jupytercad/opencascade": "^0.3.3",
"@jupytercad/schema": "^0.3.3",
"uuid": "^8.3.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/occ-worker/src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Handle_Poly_Triangulation,
OpenCascadeInstance,
TopoDS_Shape
} from '@jupytercad/jupytercad-opencascade';
} from '@jupytercad/opencascade';
import { IJCadContent, IJCadObject } from '@jupytercad/schema';

import { IDict, WorkerAction } from './types';
Expand Down
2 changes: 1 addition & 1 deletion packages/occ-worker/src/occapi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TopoDS_Shape } from '@jupytercad/jupytercad-opencascade';
import { TopoDS_Shape } from '@jupytercad/opencascade';
import { v4 as uuid } from 'uuid';

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/occ-worker/src/occparser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Handle_Poly_Triangulation,
OpenCascadeInstance,
TopoDS_Shape
} from '@jupytercad/jupytercad-opencascade';
} from '@jupytercad/opencascade';
import { IJCadObject } from '@jupytercad/schema';

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/occ-worker/src/operatorcache.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TopoDS_Shape } from '@jupytercad/jupytercad-opencascade';
import { TopoDS_Shape } from '@jupytercad/opencascade';
import { IJCadContent, IShapeMetadata, Parts } from '@jupytercad/schema';

import { getOcc } from './actions';
Expand Down
2 changes: 1 addition & 1 deletion packages/occ-worker/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TopoDS_Shape } from '@jupytercad/jupytercad-opencascade';
import { TopoDS_Shape } from '@jupytercad/opencascade';
import {
IAny,
IBox,
Expand Down
4 changes: 1 addition & 3 deletions packages/occ-worker/src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import initOpenCascade, {
OpenCascadeInstance
} from '@jupytercad/jupytercad-opencascade';
import initOpenCascade, { OpenCascadeInstance } from '@jupytercad/opencascade';

import WorkerHandler from './actions';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,16 @@ mainBuild:
- symbol: TopTools_IndexedMapOfShape
- symbol: TopTools_ListOfShape
emccFlags:
- "-flto"
- "-fexceptions"
- "-sDISABLE_EXCEPTION_CATCHING=1"
- "-O3"
- "-sEXPORT_ES6=1"
- "-sUSE_ES6_IMPORT_META=0"
- '-flto'
- '-fexceptions'
- '-sDISABLE_EXCEPTION_CATCHING=1'
- '-O3'
- '-sEXPORT_ES6=1'
- '-sUSE_ES6_IMPORT_META=0'
- "-sEXPORTED_RUNTIME_METHODS=['FS']"
- "-sINITIAL_MEMORY=15MB"
- "-sMAXIMUM_MEMORY=4GB"
- "-sALLOW_MEMORY_GROWTH=1"
- "-sLLD_REPORT_UNDEFINED"
- "--no-entry"
- '-sINITIAL_MEMORY=15MB'
- '-sMAXIMUM_MEMORY=4GB'
- '-sALLOW_MEMORY_GROWTH=1'
- '-sLLD_REPORT_UNDEFINED'
- '--no-entry'
- "-sENVIRONMENT='web'"
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@jupytercad/jupytercad-opencascade",
"name": "@jupytercad/opencascade",
"version": "0.3.3",
"description": "The custom OpenCascade build for JupyterCAD.",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion python/jupytercad-core/extension.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const occPath = [
'../',
'../',
'node_modules',
'@jupytercad/jupytercad-opencascade',
'@jupytercad/opencascade',
'lib',
'*.wasm'
];
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 @@ -54,8 +54,8 @@
},
"dependencies": {
"@jupytercad/base": "^0.3.3",
"@jupytercad/jupytercad-opencascade": "^0.3.3",
"@jupytercad/occ-worker": "^0.3.3",
"@jupytercad/opencascade": "^0.3.3",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/coreutils": "^6.0.0",
"@jupyterlab/services": "^7.0.0"
Expand Down
10 changes: 5 additions & 5 deletions python/jupytercad-lab/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"@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/occ-worker": "^0.3.3",
"@jupytercad/opencascade": "^0.3.3",
"@jupytercad/schema": "^0.3.3",
"@jupyterlab/application": "^4.0.0",
"@jupyterlab/apputils": "^4.0.0",
Expand Down Expand Up @@ -135,9 +135,9 @@
"outputDir": "jupytercad_lab/labextension",
"sharedPackages": {
"@jupytercad/base": {
"singleton": true,
"bundled": false
}
}
"singleton": true,
"bundled": false
}
}
}
}
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,8 @@ __metadata:
"@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/occ-worker": ^0.3.3
"@jupytercad/opencascade": ^0.3.3
"@jupytercad/schema": ^0.3.3
"@jupyterlab/application": ^4.0.0
"@jupyterlab/apputils": ^4.0.0
Expand Down Expand Up @@ -1006,8 +1006,8 @@ __metadata:
resolution: "@jupytercad/jupytercad-core@workspace:python/jupytercad-core"
dependencies:
"@jupytercad/base": ^0.3.3
"@jupytercad/jupytercad-opencascade": ^0.3.3
"@jupytercad/occ-worker": ^0.3.3
"@jupytercad/opencascade": ^0.3.3
"@jupyterlab/application": ^4.0.0
"@jupyterlab/builder": ^4.0.0
"@jupyterlab/coreutils": ^6.0.0
Expand All @@ -1034,8 +1034,8 @@ __metadata:
"@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/occ-worker": ^0.3.3
"@jupytercad/opencascade": ^0.3.3
"@jupytercad/schema": ^0.3.3
"@jupyterlab/application": ^4.0.0
"@jupyterlab/apputils": ^4.0.0
Expand Down Expand Up @@ -1091,15 +1091,6 @@ __metadata:
languageName: unknown
linkType: soft

"@jupytercad/jupytercad-opencascade@^0.3.3, @jupytercad/jupytercad-opencascade@workspace:packages/jupytercad-opencascade":
version: 0.0.0-use.local
resolution: "@jupytercad/jupytercad-opencascade@workspace:packages/jupytercad-opencascade"
dependencies:
js-yaml: ^4.1.0
rimraf: ^3.0.2
languageName: unknown
linkType: soft

"@jupytercad/jupytercad-root@workspace:.":
version: 0.0.0-use.local
resolution: "@jupytercad/jupytercad-root@workspace:."
Expand All @@ -1123,7 +1114,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@jupytercad/occ-worker@workspace:packages/occ-worker"
dependencies:
"@jupytercad/jupytercad-opencascade": ^0.3.3
"@jupytercad/opencascade": ^0.3.3
"@jupytercad/schema": ^0.3.3
"@types/node": ^18.15.11
copy-webpack-plugin: ^10.0.0
Expand All @@ -1138,6 +1129,15 @@ __metadata:
languageName: unknown
linkType: soft

"@jupytercad/opencascade@^0.3.3, @jupytercad/opencascade@workspace:packages/opencascade":
version: 0.0.0-use.local
resolution: "@jupytercad/opencascade@workspace:packages/opencascade"
dependencies:
js-yaml: ^4.1.0
rimraf: ^3.0.2
languageName: unknown
linkType: soft

"@jupytercad/schema@^0.3.3, @jupytercad/schema@workspace:packages/schema":
version: 0.0.0-use.local
resolution: "@jupytercad/schema@workspace:packages/schema"
Expand Down

0 comments on commit 11a3afb

Please sign in to comment.