Skip to content

Final project for the course of Distributed Systems and Middleware

Notifications You must be signed in to change notification settings

a1d4r/last-letter-game

Repository files navigation

game

Install

  1. Clone repo
git clone https://github.com/a1d4r/last-letter-game.git
cd last-letter-game
  1. If you don't have Poetry installed run:
make poetry-download
  1. Initialize poetry and python package:
make install

Usage

Usage: last-letter [OPTIONS]             

Options:
  --host TEXT                     [default: 127.0.0.1]
  --port INTEGER                  [default: 1234]
  --name TEXT
  --redis-dsn TEXT                [default: redis://127.0.0.1:6379/0]
  --install-completion [bash|zsh|fish|powershell|pwsh]
                                  Install completion for the specified shell.
  --show-completion [bash|zsh|fish|powershell|pwsh]
                                  Show completion for the specified shell, to
                                  copy it or customize the installation.
  --help                          Show this message and exit.

Makefile usage

Makefile contains a lot of functions for faster development.

1. Download and remove Poetry

To download and install Poetry run:

make poetry-download

To uninstall

make poetry-remove

2. Install all dependencies and pre-commit hooks

Install requirements:

make install

Pre-commit hooks coulb be installed after git init via

make pre-commit-install

3. Codestyle

Automatic formatting uses pyupgrade, isort, autoflake and black.

make codestyle

# or use synonym
make format

Codestyle checks only, without rewriting files:

make check-codestyle

Note: check-codestyle uses isort, black, autoflake and darglint library

4. Code security

make check-security

This command identifies security issues with Safety and Bandit.

make check-security

To validate pyproject.toml use

make check-poetry

5. Linting and type checks

Run static linting with pylint and mypy:

make static-lint

6. Tests

Run pytest

make test

7. All linters

Of course there is a command to rule run all linters in one:

make lint

the same as:

make test && make check-codestyle && make static-lint && make check-safety

8. Docker

make docker-build

which is equivalent to:

make docker-build VERSION=latest

Remove docker image with

make docker-remove

More information about docker.

9. Cleanup

Delete pycache files

make pycache-remove

Remove package build

make build-remove

Or to remove pycache, build and docker image run:

make clean-all

About

Final project for the course of Distributed Systems and Middleware

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published