Skip to content

Latest commit

 

History

History
177 lines (116 loc) · 2.75 KB

commands.md

File metadata and controls

177 lines (116 loc) · 2.75 KB

juggle: Management commands (fabric/invoke)

We use fabric and invoke to automate routine tasks like deployment, builds, making backups, etc.

Commands for backend

Run backend locally:

fab run

Run shell_plus:

fab shell

Run Celery worker & beat locally:

fab celery.all

Run Celery worker only locally:

fab celery.worker

Run Celery beat only locally:

fab celery.beat

Clear Celery queue:

fab celery.clear

Clean *.pyc files:

fab clean-pyc

Run tests:

fab test

Check Python formatting with black:

fab test.black

Fix Python formatting with black:

fab test.black-apply

Check imports order with isort:

fab test.isort

Fix imports order with isort:

fab test.isort-apply

Test security issues with bandit:

fab test.bandit

Run different checks (pycodestyle, pyflakes, mccabe, radon) with pylama:

fab test.pylama

Check Python code with pylint:

fab test.pylint

Check Python dependencies for know vulnerabilities with safety:

fab test.safety

Run tests + all linters described above:

fab test.all

Frontend

Build frontend locally (yarn build):

fab fe.build

Run frontend locally (yarn start)

fab fe.start

Run 3rd party:

Run PostgreSQL, Redis and Mailhog (for testing emails) locally in Docker:

fab compose.up

Run in background:

fab compose.up -d

Stop 3rd-party services:

fab compose.down

Stop 3rd-party services and delete their data:

fab compose.down -v

Delete merged GIT-branches

This command will locally remove all currently merged GIT branches except develop, stage and production.

fab git.delete-stale

Get Github pull request as a local branch:

fab git.checkout-pr <pr-number>

Update python requirements with pip-tools

To work with a list of Python requirements we use pip-tools utility.

To compile all requirement files run this command:

fab pip.compile

To synchronize requirements run this command:

fab pip.sync