-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Separated some UI components into @optuna/react
#851
Conversation
@optuna/storybook
@optuna/react
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #851 +/- ##
=======================================
Coverage 69.51% 69.51%
=======================================
Files 35 35
Lines 2375 2375
=======================================
Hits 1651 1651
Misses 724 724 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes looks almost good to me. I left some suggestions though.
biome.json
Outdated
@@ -14,6 +14,7 @@ | |||
], | |||
"ignore": [ | |||
"optuna_dashboard/ts/components/PlotlyColorTemplates.ts", | |||
"tslib/react/src/components/PlotlyDarkMode.ts", | |||
"standalone_app/src/PlotlyDarkMode.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just remove this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed L18 ("standalone_app/src/PlotlyDarkMode.ts"
), not L17 ("tslib/react/src/components/PlotlyDarkMode.ts"
), thank you for your catch!
standalone_app/package.json
Outdated
"name": "optuna-dashboard-wasm", | ||
"private": true, | ||
"version": "0.0.0", | ||
"description": "", | ||
"scripts": { | ||
"watch": "vite", | ||
"build:vscode": "webpack" | ||
}, | ||
"devDependencies": { | ||
"@types/plotly.js": "^2.29.2", | ||
"@types/react": "^18.2.64", | ||
"@types/react-dom": "^18.2.21", | ||
"@types/react-router-dom": "^5.3.3", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"compression-webpack-plugin": "^11.1.0", | ||
"esbuild-loader": "^4.0.3", | ||
"vite": "^5.1.5", | ||
"webpack": "^5.90.3", | ||
"webpack-cli": "^5.1.4" | ||
}, | ||
"dependencies": { | ||
"@emotion/react": "^11.11.3", | ||
"@emotion/styled": "^11.11.0", | ||
"@mui/icons-material": "^5.15.12", | ||
"@mui/lab": "^5.0.0-alpha.167", | ||
"@mui/material": "^5.15.12", | ||
"@optuna/react": "../tslib/react", | ||
"@optuna/storage": "../tslib/storage", | ||
"module-workers-polyfill": "^0.3.2", | ||
"notistack": "^3.0.1", | ||
"optuna": "../rustlib/pkg", | ||
"plotly.js-dist-min": "^2.30.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-router-dom": "^6.22.3" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[question] Should we use a tab for the indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No specific reason for my change here, so I replaced tab with spaces.
Thanks for your comment.
@@ -0,0 +1,45 @@ | |||
import { JournalFileStorage, SQLite3Storage } from "@optuna/storage" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this file into tslib/storage
or just leaving it in the standalone_app
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will leave this here as it is, because loadStorageFromFile
function is used in MockStudies
,
but certainly this file should not be included in the package.
So I marked this file into exclude
in tsconfig.json
.
standalone_app/package.json
Outdated
"optionalDependencies": { | ||
"@rollup/rollup-linux-x64-gnu": "^4.13.2" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Memo:These lines are added to resolve the error due to rollup dependency (module not found error: Error: Cannot find module @rollup/rollup-linux-x64-gnu
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Separated UI components into `@optuna/react` (Continued from #851)
Contributor License Agreement
This repository (
optuna-dashboard
) and Goptuna share common code.This pull request may therefore be ported to Goptuna.
Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.
Reference Issues/PRs
NA
What does this implement/fix? Explain your changes.
@optuna/react
as the first step to make codes common@optuna/react
as common codes:DataGrid
PlotHistory
TrialTable
PlotlyDarkMode