Skip to content

Use npm and update dependencies #963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 4, 2025
Merged
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
16 changes: 8 additions & 8 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ on:
- 'LICENSE'
- 'package.json'
- 'README.md'
- 'yarn.lock'
- 'package-lock.json'
jobs:
test-lib:
runs-on: ubuntu-latest
@@ -24,11 +24,11 @@ jobs:
with:
node-version: 20
- name: Install
run: yarn
run: npm install
- name: Prepare ONNX
run: yarn create-onnx -t
run: npm run create-onnx -t
- name: Test lib
run: yarn test:lib --bail
run: npm run test:lib --bail
- name: Coveralls
uses: coverallsapp/github-action@master
with:
@@ -38,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Test js
run: yarn test:js --bail
run: npm run test:js --bail
test-gui:
runs-on: ubuntu-latest
steps:
@@ -47,16 +47,16 @@ jobs:
run: docker compose run --rm test-gui --bail
deploy:
runs-on: ubuntu-latest
needs: [test-lib, test-gui]
needs: [test-lib, test-gui, test-js]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install
run: yarn
run: npm install
- name: Build
run: yarn build:gh-pages
run: npm run build:gh-pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
10 changes: 5 additions & 5 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -11,11 +11,11 @@ jobs:
with:
node-version: 20
- name: Install
run: yarn
run: npm install
- name: Prepare ONNX
run: yarn create-onnx -t
run: npm run create-onnx -t
- name: Test
run: yarn test:lib --bail
run: npm run test:lib --bail
publish:
runs-on: ubuntu-latest
needs: test
@@ -26,9 +26,9 @@ jobs:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Install
run: yarn
run: npm install
- name: Build
run: yarn build:npm
run: npm run build:npm
- name: Publish
run: npm publish
env:
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -9,11 +9,11 @@ jobs:
with:
node-version: 20
- name: Install
run: yarn
run: npm install
- name: Prepare ONNX
run: yarn create-onnx -t
run: npm run create-onnx -t
- name: Test lib
run: yarn test:lib --bail
run: npm run test:lib --bail
- name: Coveralls
uses: coverallsapp/github-action@master
with:
@@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Test js
run: yarn test:js --bail
run: npm run test:js --bail
test-gui:
runs-on: ubuntu-latest
steps:
4 changes: 1 addition & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
test-gui:
build:
@@ -15,6 +13,6 @@ services:
working_dir: /app

server:
image: nginx:1.25.5-alpine
image: nginx:1.27.5-alpine
volumes:
- .:/usr/share/nginx/html
2 changes: 1 addition & 1 deletion lib/model/nns/onnx/layer/argmax.js
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ export default {
const keepdims = new onnx.AttributeProto()
keepdims.setName('keepdims')
keepdims.setType(onnx.AttributeProto.AttributeType.INT)
keepdims.setI(obj.keepdims ?? true ? 1 : 0)
keepdims.setI((obj.keepdims ?? true) ? 1 : 0)
node.addAttribute(keepdims)

graph.addNode(node)
2 changes: 1 addition & 1 deletion lib/model/nns/onnx/layer/argmin.js
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ export default {
const keepdims = new onnx.AttributeProto()
keepdims.setName('keepdims')
keepdims.setType(onnx.AttributeProto.AttributeType.INT)
keepdims.setI(obj.keepdims ?? true ? 1 : 0)
keepdims.setI((obj.keepdims ?? true) ? 1 : 0)
node.addAttribute(keepdims)

graph.addNode(node)
2 changes: 1 addition & 1 deletion lib/model/nns/onnx/layer/mean.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export default {
node.addInput(input)
node.addOutput(obj.name)

const keepdims = obj.keepdims ?? true ? 1 : 0
const keepdims = (obj.keepdims ?? true) ? 1 : 0
const attrKeepdims = new onnx.AttributeProto()
attrKeepdims.setName('keepdims')
attrKeepdims.setType(onnx.AttributeProto.AttributeType.INT)
2 changes: 1 addition & 1 deletion lib/model/nns/onnx/layer/prod.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export default {
node.addInput(input)
node.addOutput(obj.name)

const keepdims = obj.keepdims ?? true ? 1 : 0
const keepdims = (obj.keepdims ?? true) ? 1 : 0
const attrKeepdims = new onnx.AttributeProto()
attrKeepdims.setName('keepdims')
attrKeepdims.setType(onnx.AttributeProto.AttributeType.INT)
2 changes: 1 addition & 1 deletion lib/model/nns/onnx/layer/reduce_max.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export default {
node.addInput(input)
node.addOutput(obj.name)

const keepdims = obj.keepdims ?? true ? 1 : 0
const keepdims = (obj.keepdims ?? true) ? 1 : 0
const attrKeepdims = new onnx.AttributeProto()
attrKeepdims.setName('keepdims')
attrKeepdims.setType(onnx.AttributeProto.AttributeType.INT)
2 changes: 1 addition & 1 deletion lib/model/nns/onnx/layer/reduce_min.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export default {
node.addInput(input)
node.addOutput(obj.name)

const keepdims = obj.keepdims ?? true ? 1 : 0
const keepdims = (obj.keepdims ?? true) ? 1 : 0
const attrKeepdims = new onnx.AttributeProto()
attrKeepdims.setName('keepdims')
attrKeepdims.setType(onnx.AttributeProto.AttributeType.INT)
2 changes: 1 addition & 1 deletion lib/model/nns/onnx/layer/std.js
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ export default {
node_variance.addInput(obj.name + '_mul')
node_variance.addOutput(obj.name + '_var')

const keepdims = obj.keepdims ?? true ? 1 : 0
const keepdims = (obj.keepdims ?? true) ? 1 : 0
const attrKeepdims2 = new onnx.AttributeProto()
attrKeepdims2.setName('keepdims')
attrKeepdims2.setType(onnx.AttributeProto.AttributeType.INT)
2 changes: 1 addition & 1 deletion lib/model/nns/onnx/layer/sum.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export default {
node.addInput(input)
node.addOutput(obj.name)

const keepdims = obj.keepdims ?? true ? 1 : 0
const keepdims = (obj.keepdims ?? true) ? 1 : 0
const attrKeepdims = new onnx.AttributeProto()
attrKeepdims.setName('keepdims')
attrKeepdims.setType(onnx.AttributeProto.AttributeType.INT)
2 changes: 1 addition & 1 deletion lib/model/nns/onnx/layer/variance.js
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ export default {
node_variance.addInput(obj.name + '_mul')
node_variance.addOutput(obj.name)

const keepdims = obj.keepdims ?? true ? 1 : 0
const keepdims = (obj.keepdims ?? true) ? 1 : 0
const attrKeepdims2 = new onnx.AttributeProto()
attrKeepdims2.setName('keepdims')
attrKeepdims2.setType(onnx.AttributeProto.AttributeType.INT)
Loading