Node.js v16 is required to compile TypeScript files.
$ npm install
$ npm run build:dev
Watch for files changes
$ npm run watch
Production builds
$ npm run build:prd
$ docker build -t optuna-dashboard .
When failed above command due to the out of heap memory error (Exit code: 137), please check "Resources" tab on your Docker engine's preference since it requires a lot of memory to compile TypeScript files. You can use the Docker image like below:
# SQLite3
$ docker run -it --rm -p 8080:8080 -v `pwd`:/app -w /app optuna-dashboard sqlite:///db.sqlite3
$ pip install -e .
$ OPTUNA_DASHBOARD_DEBUG=1 optuna-dashboard sqlite:///db.sqlite3
Note that OPTUNA_DASHBOARD_DEBUG=1
makes the server will automatically restart when the source codes are changed.
$ tox -e ALL
$ python -m unittest
or
$ pip install tox
$ tox -e py39
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.
$ pip install -r requirements.txt
$ flake8
$ black --check .
$ isort . --check
$ mypy optuna_dashboard python_tests
or
$ pip install tox
$ tox -e flake8 -e black -e mypy
$ npm run fmt
$ black .
$ isort .
The release process(compiling TypeScript files, packaging Python distributions and uploading to PyPI) is fully automated by GitHub Actions.
- Replace
optuna_dashboard.version.__version__
to the next version. - Create a git tag and push it to GitHub. If succeeded, GitHub Action will build sdist/wheel packages and create a draft GitHub release.
- Edit a GitHub release, generate release note, and mark "Create a discussion for this release" checkbox. Then make it publish. GitHub Action will release the new version to PyPI.