mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-10 12:23:22 +08:00
Merge pull request #461 from c-bata/refactor-project-structure
Refactor project structure
This commit is contained in:
@@ -52,6 +52,6 @@ jobs:
|
||||
env:
|
||||
PYPPETEER_HOME: ./local-chromium
|
||||
|
||||
- run: python visual_regression_test.py --skip-screenshot --sleep 3
|
||||
- run: python hack/visual_regression_test.py --skip-screenshot --sleep 3
|
||||
env:
|
||||
PYPPETEER_HOME: ./local-chromium
|
||||
|
||||
@@ -8,7 +8,6 @@ build/
|
||||
|
||||
node_modules/
|
||||
public/
|
||||
.tox/
|
||||
tmp/
|
||||
|
||||
*.sqlite3
|
||||
|
||||
+1
-21
@@ -54,32 +54,19 @@ Note that `OPTUNA_DASHBOARD_DEBUG=1` makes the server will automatically restart
|
||||
|
||||
## Running tests, lint checks and formatters
|
||||
|
||||
### Run all tests and lint checks
|
||||
|
||||
```
|
||||
$ tox -e ALL
|
||||
```
|
||||
|
||||
### Running Python unit tests
|
||||
|
||||
```
|
||||
$ python -m unittest
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
$ pip install tox
|
||||
$ tox -e py39
|
||||
```
|
||||
|
||||
### Running visual regression tests using pyppeteer
|
||||
|
||||
Please run following commands, then check screenshots in `tmp/` directory.
|
||||
|
||||
```
|
||||
$ pip install -r requirements.txt
|
||||
$ python visual_regression_test.py --output-dir tmp
|
||||
$ python hack/visual_regression_test.py --output-dir tmp
|
||||
```
|
||||
|
||||
Note: When you run pyppeteer for the first time, it downloads the latest version of Chromium (~150MB) if it is not found on your system.
|
||||
@@ -94,13 +81,6 @@ $ isort . --check
|
||||
$ mypy optuna_dashboard python_tests
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
$ pip install tox
|
||||
$ tox -e flake8 -e black -e mypy
|
||||
```
|
||||
|
||||
### Auto-formatting TypeScript files (by prettier)
|
||||
|
||||
```
|
||||
|
||||
@@ -59,7 +59,6 @@ exclude = '''
|
||||
\.eggs
|
||||
| \.git
|
||||
| \.mypy_cache
|
||||
| \.tox
|
||||
| \.venv
|
||||
| _build
|
||||
| build
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base",
|
||||
"schedule:monthly",
|
||||
":maintainLockFilesMonthly",
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"extends": [
|
||||
"group:definitelyTyped",
|
||||
"group:materialMonorepo",
|
||||
"group:reactMonorepo",
|
||||
"group:reactrouterMonorepo"
|
||||
],
|
||||
"groupName": "javascript",
|
||||
"separateMajorMinor": false,
|
||||
"schedule": ["before 3am on the first day of the month"],
|
||||
"ignoreDeps": [
|
||||
"prettier"
|
||||
]
|
||||
},
|
||||
{
|
||||
"matchPaths": [".github/**"],
|
||||
"separateMajorMinor": false,
|
||||
"groupName": "github-actions",
|
||||
"schedule": ["before 3am on the first day of the month"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
[flake8]
|
||||
max-line-length = 99
|
||||
statistics = True
|
||||
exclude = venv,build,.tox
|
||||
exclude = venv,build
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
[tox]
|
||||
envlist =
|
||||
py37
|
||||
py38
|
||||
py39
|
||||
flake8
|
||||
black
|
||||
isort
|
||||
mypy
|
||||
|
||||
[testenv:py37]
|
||||
basepython = python3.7
|
||||
commands = python -m unittest {posargs}
|
||||
|
||||
[testenv:py38]
|
||||
basepython = python3.8
|
||||
commands = python -m unittest {posargs}
|
||||
|
||||
[testenv:py39]
|
||||
basepython = python3.9
|
||||
commands = python -m unittest {posargs}
|
||||
|
||||
[testenv:flake8]
|
||||
deps = flake8
|
||||
commands = flake8 . {posargs}
|
||||
|
||||
[testenv:black]
|
||||
deps = black
|
||||
commands = black --check . {posargs}
|
||||
|
||||
[testenv:isort]
|
||||
deps = isort
|
||||
commands = isort . --check {posargs}
|
||||
|
||||
[testenv:mypy]
|
||||
deps = mypy
|
||||
commands = mypy . {posargs}
|
||||
Reference in New Issue
Block a user