mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-09 11:28:14 +08:00
Update config files for optuna_dashboard/ts
This commit is contained in:
@@ -8,9 +8,9 @@ on:
|
||||
- '**.py'
|
||||
- '**.ts'
|
||||
- '**.tsx'
|
||||
- 'package.json'
|
||||
- 'package-lock.json'
|
||||
- 'tsconfig.json'
|
||||
- 'optuna_dashboard/package.json'
|
||||
- 'optuna_dashboard/package-lock.json'
|
||||
- 'optuna_dashboard/tsconfig.json'
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-20.04
|
||||
@@ -24,8 +24,12 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- run: npm install
|
||||
- run: npm run build:dev
|
||||
|
||||
- name: Build bundle.js
|
||||
working-directory: optuna_dashboard
|
||||
run: |
|
||||
npm install
|
||||
npm run build:dev
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
|
||||
@@ -18,8 +18,12 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- run: npm install
|
||||
- run: npm run build:prd
|
||||
|
||||
- name: Build bundle.js
|
||||
working-directory: optuna_dashboard
|
||||
run: |
|
||||
npm install
|
||||
npm run build:prd
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
|
||||
@@ -6,9 +6,10 @@ on:
|
||||
- '.eslintrc.js'
|
||||
- '**.ts'
|
||||
- '**.tsx'
|
||||
- 'package.json'
|
||||
- 'package-lock.json'
|
||||
- 'tsconfig.json'
|
||||
- 'optuna_dashboard/package.json'
|
||||
- 'optuna_dashboard/package-lock.json'
|
||||
- 'optuna_dashboard/tsconfig.json'
|
||||
- 'optuna_dashboard/webpack.config.js'
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint checking on Ubuntu
|
||||
@@ -37,7 +38,9 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- run: |
|
||||
- name: Build bundle.js
|
||||
working-directory: optuna_dashboard
|
||||
run: |
|
||||
npm install
|
||||
npm run build:dev
|
||||
npm run build:prd
|
||||
@@ -54,6 +57,8 @@ jobs:
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- run: |
|
||||
- name: Run jest
|
||||
working-directory: optuna_dashboard
|
||||
run: |
|
||||
npm install
|
||||
npm run test
|
||||
|
||||
@@ -26,6 +26,7 @@ The repository is organized as follows:
|
||||
Node.js v16 is required to compile TypeScript files.
|
||||
|
||||
```
|
||||
$ cd optuna_dashboard/
|
||||
$ npm install
|
||||
$ npm run build:dev
|
||||
```
|
||||
@@ -34,6 +35,7 @@ $ npm run build:dev
|
||||
<summary>Watch for files changes</summary>
|
||||
|
||||
```
|
||||
$ cd optuna_dashboard/
|
||||
$ npm run watch
|
||||
```
|
||||
|
||||
@@ -43,6 +45,7 @@ $ npm run watch
|
||||
<summary>Production builds</summary>
|
||||
|
||||
```
|
||||
$ cd optuna_dashboard/
|
||||
$ npm run build:prd
|
||||
```
|
||||
|
||||
|
||||
+5
-5
@@ -1,12 +1,12 @@
|
||||
FROM node:20 AS front-builder
|
||||
WORKDIR /usr/src
|
||||
WORKDIR /usr/src/optuna_dashboard
|
||||
|
||||
ADD ./package.json /usr/src/package.json
|
||||
ADD ./package-lock.json /usr/src/package-lock.json
|
||||
ADD ./optuna_dashboard/package.json /usr/src/optuna_dashboard/package.json
|
||||
ADD ./optuna_dashboard/package-lock.json /usr/src/optuna_dashboard/package-lock.json
|
||||
RUN npm install
|
||||
|
||||
ADD ./tsconfig.json /usr/src/tsconfig.json
|
||||
ADD ./webpack.config.js /usr/src/webpack.config.js
|
||||
ADD ./optuna_dashboard/tsconfig.json /usr/src/optuna_dashboard/tsconfig.json
|
||||
ADD ./optuna_dashboard/webpack.config.js /usr/src/optuna_dashboard/webpack.config.js
|
||||
ADD ./optuna_dashboard/ts/ /usr/src/optuna_dashboard/ts
|
||||
RUN mkdir -p /usr/src/optuna_dashboard/public
|
||||
RUN npm run build:prd
|
||||
|
||||
@@ -16,7 +16,7 @@ vscode/assets/bundle.js: $(RUSTLIB_OUT) $(STANDALONE_SRC)
|
||||
cd standalone_app && npm install && npm run build:vscode
|
||||
|
||||
$(DASHBOARD_TS_OUT): $(DASHBOARD_TS_SRC)
|
||||
npm install && npm run build:$(MODE)
|
||||
cd optuna_dashboard && npm install && npm run build:$(MODE)
|
||||
|
||||
.PHONY: serve-browser-app
|
||||
serve-browser-app: $(RUSTLIB_OUT)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"build": "webpack",
|
||||
"build:dev": "NODE_ENV=development TYPESCRIPT_LOADER=esbuild-loader webpack",
|
||||
"build:prd": "NODE_ENV=production webpack",
|
||||
"test": "jest typescript_tests"
|
||||
"test": "jest ts/tests"
|
||||
},
|
||||
"author": "Masashi Shibata",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useEffect } from "react"
|
||||
import { useSnackbar } from "notistack"
|
||||
import { getParamImportances } from "../../ts/apiClient"
|
||||
import { getParamImportances } from "../apiClient"
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import { AxiosError } from "axios"
|
||||
|
||||
|
||||
@@ -2,10 +2,7 @@ import React from "react"
|
||||
global.URL.createObjectURL = jest.fn()
|
||||
|
||||
import { cleanup, render } from "@testing-library/react"
|
||||
import {
|
||||
DataGrid,
|
||||
DataGridColumn,
|
||||
} from "../optuna_dashboard/ts/components/DataGrid"
|
||||
import { DataGrid, DataGridColumn } from "../components/DataGrid"
|
||||
|
||||
afterEach(cleanup)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { mergeUnionSearchSpace } from "../optuna_dashboard/ts/searchSpace"
|
||||
import { mergeUnionSearchSpace } from "../searchSpace"
|
||||
|
||||
global.URL.createObjectURL = jest.fn()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"noUnusedLocals": true,
|
||||
"noImplicitThis": true,
|
||||
"alwaysStrict": true,
|
||||
"outDir": "./optuna_dashboard/public/",
|
||||
"outDir": "./public/",
|
||||
"paths": {
|
||||
"plotly.js-dist-min": ["node_modules/@types/plotly.js"]
|
||||
},
|
||||
@@ -21,11 +21,11 @@
|
||||
"strict": true
|
||||
},
|
||||
"files": [
|
||||
"./optuna_dashboard/ts/index.tsx"
|
||||
"./ts/index.tsx"
|
||||
],
|
||||
"include": [
|
||||
"./optuna_dashboard/ts/types/**/*",
|
||||
"./typescript_tests/**/*"
|
||||
"./ts/types/**/*",
|
||||
"./ts/tests/**/*"
|
||||
],
|
||||
"types": ["node"]
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ const typeScriptLoader =
|
||||
|
||||
var config = {
|
||||
mode,
|
||||
entry: [__dirname + "/optuna_dashboard/ts/index.tsx"],
|
||||
entry: [__dirname + "/ts/index.tsx"],
|
||||
output: {
|
||||
path: __dirname + "/optuna_dashboard/public/",
|
||||
path: __dirname + "/public/",
|
||||
filename: "bundle.js",
|
||||
publicPath: "/public/",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user