From 639e453f7b9ab9dfb07382fda36cdb9a65f62e0f Mon Sep 17 00:00:00 2001 From: c-bata Date: Tue, 16 May 2023 16:01:54 +0900 Subject: [PATCH 1/2] Refactor project structure --- .github/workflows/integration-tests.yml | 2 +- CONTRIBUTING.md | 2 +- .../check-docker-image}/check_mysql.sh | 0 .../check-docker-image}/check_postgres.sh | 0 .../check-docker-image}/optuna_example.py | 0 .../visual_regression_test.py | 0 pyproject.toml | 1 - renovate.json | 29 --------------- setup.cfg | 2 +- tox.ini | 37 ------------------- 10 files changed, 3 insertions(+), 70 deletions(-) rename {docker => hack/check-docker-image}/check_mysql.sh (100%) rename {docker => hack/check-docker-image}/check_postgres.sh (100%) rename {docker => hack/check-docker-image}/optuna_example.py (100%) rename visual_regression_test.py => hack/visual_regression_test.py (100%) delete mode 100644 renovate.json delete mode 100644 tox.ini diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 52e4065a..266ba395 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index afcf4fed..511671ad 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -79,7 +79,7 @@ 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. diff --git a/docker/check_mysql.sh b/hack/check-docker-image/check_mysql.sh similarity index 100% rename from docker/check_mysql.sh rename to hack/check-docker-image/check_mysql.sh diff --git a/docker/check_postgres.sh b/hack/check-docker-image/check_postgres.sh similarity index 100% rename from docker/check_postgres.sh rename to hack/check-docker-image/check_postgres.sh diff --git a/docker/optuna_example.py b/hack/check-docker-image/optuna_example.py similarity index 100% rename from docker/optuna_example.py rename to hack/check-docker-image/optuna_example.py diff --git a/visual_regression_test.py b/hack/visual_regression_test.py similarity index 100% rename from visual_regression_test.py rename to hack/visual_regression_test.py diff --git a/pyproject.toml b/pyproject.toml index 00ef0db9..406e0f49 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,6 @@ exclude = ''' \.eggs | \.git | \.mypy_cache - | \.tox | \.venv | _build | build diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 6c0741cc..00000000 --- a/renovate.json +++ /dev/null @@ -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"] - } - ] -} diff --git a/setup.cfg b/setup.cfg index b5b40dda..93d9ad56 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,4 +1,4 @@ [flake8] max-line-length = 99 statistics = True -exclude = venv,build,.tox +exclude = venv,build diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 57d7caa5..00000000 --- a/tox.ini +++ /dev/null @@ -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} From acc146365ce8cc054457e9fb56e70db4058bbcf6 Mon Sep 17 00:00:00 2001 From: c-bata Date: Tue, 16 May 2023 16:03:21 +0900 Subject: [PATCH 2/2] Remove tox --- .gitignore | 1 - CONTRIBUTING.md | 20 -------------------- 2 files changed, 21 deletions(-) diff --git a/.gitignore b/.gitignore index eaa61537..7b64dfd6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,6 @@ build/ node_modules/ public/ -.tox/ tmp/ *.sqlite3 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 511671ad..03c1075e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,25 +54,12 @@ 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. @@ -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) ```