Commit 37da6c38 authored by deck's avatar deck

update readme file and add prettier-apply command

parent b3b3281b
......@@ -14,11 +14,14 @@ static:
- pip install "$GITLAB_CI_PYPI_TOX"
- apt update
- apt install npm -y
- npm install -g prettier
- tox -e "flake8,isort,yapf,pylint,prettier"
- tox -e "flake8,isort,yapf,pylint"
stage: static
- npm install -g prettier
- prettier --check "./polaris/**/*.html"
stage: build
......@@ -120,17 +120,25 @@ It is important to format the code before commiting, otherwise the
CI engine will fail. We have a tox command setup to run tests before
committing so you will never have to push failing pipelines. Code
linting is also done to ensure the code does not have any errors
before committing:
before committing.
First you will have to install prettier :
$ npm install -g prettier
You can learn more about npm [here](
# Install tox to execute CI tasks
$ (.venv) pip install tox
# Auto-format the code
$ (.venv) tox -e yapf-apply -e isort-apply
$ (.venv) tox -e yapf-apply -e isort-apply -e prettier-apply
______________________ summary______________________
yapf-apply: commands succeeded
isort: commands succeeded
prettier-apply: commands succeeded
congratulations :)
# Verify CI test passes
......@@ -143,6 +151,7 @@ ______________________ summary______________________
pylint: commands succeeded
build: commands succeeded
pytest: commands succeeded
prettier: commands succeeded
congratulations :)
envlist = flake8,isort,yapf,pylint,build,pytest, prettier
envlist = flake8,isort,yapf,pylint,build,pytest,prettier
flake8 = 3.7.7
......@@ -27,6 +27,11 @@ deps =
skip_install = True
commands = yapf -d -r .
whitelist_externals = prettier
skip_install = True
commands = prettier --write "./polaris/**/*.html"
skip_install = True
commands = prettier --check "./polaris/**/*.html"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment