From 3b3017345c92ec1397c90164717184814017780a Mon Sep 17 00:00:00 2001 From: c-bata Date: Sat, 10 Apr 2021 03:21:52 +0900 Subject: [PATCH] Add requirements.txt instead of setup.cfg --- .github/workflows/python-tests.yml | 4 ++-- DEVELOPMENT.md | 2 +- requirements.txt | 14 ++++++++++++++ setup.cfg | 7 ------- tox.ini | 2 +- 5 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 requirements.txt diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index c01e0161..04d9c63e 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -18,8 +18,8 @@ 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 flake8 black isort mypy - run: flake8 . --show-source - run: black --check --diff . - run: isort --check --diff . diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 453c698b..4b2d06a4 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -73,7 +73,7 @@ $ tox -e py39 ### Linters (flake8, black and mypy) ``` -$ pip install .[lint] +$ pip install -r requirements.txt $ flake8 $ black --check . $ isort . --check diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..6d49d55a --- /dev/null +++ b/requirements.txt @@ -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 diff --git a/setup.cfg b/setup.cfg index 1ae34112..3cd04ed6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/tox.ini b/tox.ini index dd77fb99..91a17ef3 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ commands = black --check . {posargs} [testenv:isort] deps = isort -commands = isort . --check +commands = isort . --check {posargs} [testenv:mypy] deps = mypy