Skip to content
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

Align the types defined in optuna_dashboard/ts to @optuna/types as much as possible #863

Merged
merged 24 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
44ab51c
Add run scripts
porink0424 Apr 12, 2024
918d9f0
Resolve type errors
porink0424 Apr 12, 2024
2dd2427
Remove type TrialValueNumber
porink0424 Apr 12, 2024
59af374
Remove type TrialIntermediateValueNumber
porink0424 Apr 12, 2024
7678a12
Remove from StudyDirection
porink0424 Apr 12, 2024
f8b0a9a
Modify CategoricalDistribution choices type to
porink0424 Apr 12, 2024
e03910a
Add devDependencies of @optuna/types
porink0424 Apr 12, 2024
e55212a
Remove common types from optuna_dashboard
porink0424 Apr 12, 2024
2836969
Apply formatter
porink0424 Apr 12, 2024
76622bb
Tiny fix for lint
porink0424 Apr 12, 2024
8d899e2
Fix the type of IntDistribution.step
porink0424 Apr 12, 2024
9e3eb49
Fix the type in serializer
porink0424 Apr 12, 2024
1080b8a
Update type def file
porink0424 Apr 17, 2024
e531f1e
Apply formatter
porink0424 Apr 17, 2024
cf591d0
Move some types from input.d.ts -> optuna.ts
porink0424 Apr 17, 2024
e887710
Delete
porink0424 Apr 17, 2024
958045e
Merge branch 'main' of github.com:porink0424/optuna-dashboard into fi…
porink0424 Apr 17, 2024
9181142
Add package-lock.json
porink0424 Apr 17, 2024
555438e
Add type-check into lint flow
porink0424 Apr 17, 2024
abff6e0
Add 'make tslib' flow into Lint checking
porink0424 Apr 17, 2024
c59daa1
Update biome config
porink0424 Apr 17, 2024
0dcd553
Add type-check test into github workflow
porink0424 Apr 17, 2024
e34dd05
Replace target es5 -> es6 in tsconfig
porink0424 Apr 17, 2024
c4ba65a
Update package-lock.json
porink0424 Apr 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/typescript-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,32 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: '20'

- run: npm install
- run: npm run lint

type-check:
name: Type checking on optuna-dashboard
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@master

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Setup tslib
run: make tslib

- name: Type Check
working-directory: optuna_dashboard
run: |
npm install
npm run type-check

build:
name: JS build check
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"ignore": [
"optuna_dashboard/ts/components/PlotlyColorTemplates.ts",
"tslib/react/src/components/PlotlyDarkMode.ts",
"tslib/**/pkg/*"
"tslib/**/pkg/*",
"tslib/react/types/*"
]
},
"javascript": {
Expand Down
2 changes: 1 addition & 1 deletion optuna_dashboard/_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"type": Literal["FloatDistribution"],
"low": float,
"high": float,
"step": float,
"step": Union[float, None],
"log": bool,
},
)
Expand Down