Merge pull request #82 from optuna/requirements-txt

Add description for visual regression tests
This commit is contained in:
Masashi Shibata
2021-04-10 05:25:35 +09:00
committed by GitHub
5 changed files with 33 additions and 12 deletions
+6 -3
View File
@@ -18,8 +18,9 @@ jobs:
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install --progress-bar off .[lint]
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off .
pip install --progress-bar off flake8 black isort mypy
- run: flake8 . --show-source
- run: black --check --diff .
- run: isort --check --diff .
@@ -37,5 +38,7 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: pip install --progress-bar off .
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off .
- run: python -m unittest
+12 -1
View File
@@ -70,10 +70,21 @@ $ 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
```
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.
### Linters (flake8, black and mypy)
```
$ pip install .[lint]
$ pip install -r requirements.txt
$ flake8
$ black --check .
$ isort . --check
+14
View File
@@ -0,0 +1,14 @@
# project dependency
optuna>=2.4
bottle
typing-extensions;python_version<'3.8'
scikit-learn
# lint
black
flake8
isort
mypy
# test
pyppeteer
-7
View File
@@ -32,13 +32,6 @@ install_requires =
typing-extensions;python_version<'3.8'
scikit-learn
[options.extras_require]
lint =
black
isort
mypy
flake8
[options.entry_points]
console_scripts =
optuna-dashboard = optuna_dashboard.cli:main
+1 -1
View File
@@ -35,7 +35,7 @@ commands = black --check . {posargs}
[testenv:isort]
deps = isort
commands = isort . --check
commands = isort . --check {posargs}
[testenv:mypy]
deps = mypy