novoseltcev / interview-bolid-backend

Тестовое задание в компанию НВП Болид

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FastAPI

Тестовое задание в компанию НВП Болид


CI Checked with mypy Imports: isort Code style: black


Working with GIT

We use Trunk Based Development to work with git

Commit/Branch Styling

Commit Styling:

<type>[!](<scope>): [#<issue num>] <description>

Branch Styling:

<type>/[#<issue num>-]<task_name>

Types:

  • feat - new functionality
  • bug - fix the bug by issue
  • fix - fix the bug, if you found it (without issue)
  • chore - refactoring and another routine (maybe without issue)

Setup

  1. Clone repository and cd into its directory:
$ git clone https://github.com/novoseltcev/interview-bolid-backend.git && cd interview-bolid-backend
  1. Install poetry:
$ curl -sSL https://install.python-poetry.org | python3 -
  1. Install dependencies and activate python-env:
$ poetry install && poetry shell
  1. Configure environment:

    1. Copy example environment preset and open its:
    $ cp .env.example .env && vim .env
    1. Configurate DB connection for local db or use default values for docker running:
    POSTGRES_USER=
    POSTGRES_PASSWORD=
    POSTGRES_HOST=
    POSTGRES_PORT=
    POSTGRES_DB=
    
  2. Run server:

    1. Local development server:
    $ migrate upgrade && app
    1. Inside container:
    $ docker-compose up -d --build && poetry run preset
  3. Open URL

Code Quality Assurance

We use linter flake8, static type checker mypy, PEP 8 compliant opinionated formatter black, imports sortings utility isort.

Lint your code:

$ lint

Format your code:

$ format

Set preset:

$ preset

About

Тестовое задание в компанию НВП Болид


Languages

Language:Python 89.3%Language:Dockerfile 5.3%Language:HTML 2.3%Language:Mako 1.9%Language:Shell 1.3%