Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dantetemplar committed Feb 25, 2024
1 parent 7b3fc2f commit e8743c3
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 63 deletions.
81 changes: 57 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,71 @@
# InNoHassle Music room bot

[![GitHub Actions pre-commit](https://img.shields.io/github/actions/workflow/status/one-zero-eight/InNoHassle-MusicRoomBot/pre-commit.yaml?label=pre-commit)](https://github.com/one-zero-eight/InNoHassle-MusicRoomBot/actions)

[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=one-zero-eight_InNoHassle-MusicRoomBot&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=one-zero-eight_InNoHassle-MusicRoomBot)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=one-zero-eight_InNoHassle-MusicRoomBot&metric=bugs)](https://sonarcloud.io/summary/new_code?id=one-zero-eight_InNoHassle-MusicRoomBot)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=one-zero-eight_InNoHassle-MusicRoomBot&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=one-zero-eight_InNoHassle-MusicRoomBot)

## Project Installation
## Table of contents

Did you know that GitHub supports table of
contents [by default](https://github.blog/changelog/2021-04-13-table-of-contents-support-in-markdown-files/) 🤔

## About

This is the Telegram bot for music room service in InNoHassle ecosystem.

### Features

- 🎵 Booking Music room
- 📅 Schedule of Music room
- 🔒 Roles and permissions

**Note that for successful use of this bot, you have to run
the [InNoHassle-MusicRoom](https://github.com/one-zero-eight/InNoHassle-MusicRoom) API.**
### Technologies

1. Install dependencies with [poetry](https://python-poetry.org/docs/).
```bash
poetry install --no-root
```
- [Python 3.11](https://www.python.org/downloads/release/python-3117/) & [Poetry](https://python-poetry.org/docs/)
- [Aiogram 3](https://docs.aiogram.dev/en/latest/) & [aiogram-dialog](https://aiogram-dialog.readthedocs.io/)
- Formatting and linting: [Ruff](https://docs.astral.sh/ruff/), [pre-commit](https://pre-commit.com/)
- Deployment: [Docker](https://www.docker.com/), [Docker Compose](https://docs.docker.com/compose/),
[GitHub Actions](https://github.com/features/actions)

2. Setup environment variables in `.env` file.
## Development

Run
```bash
cp .env.example .env
```
And edit .env
### Getting started

1. Install [Python 3.11+](https://www.python.org/downloads/release/python-3117/)
2. Install [Poetry](https://python-poetry.org/docs/)
3. Install project dependencies with [Poetry](https://python-poetry.org/docs/cli/#options-2).
```bash
poetry install --no-root --with code-style
```
4. Set up [pre-commit](https://pre-commit.com/) hooks:

3. Run the bot
```bash
python -m src.main
```
OR using Docker
1. Create a network called <i>music-room</i>
```
docker network create music-room
```
2. Run bot
```bash
poetry run pre-commit install --install-hooks -t pre-commit -t commit-msg
```
5. Set up project settings file (check [settings.schema.yaml](settings.schema.yaml) for more info).
```bash
cp settings.example.yaml settings.yaml
```
docker-compose up --build
Edit `settings.yaml` according to your needs.

**Set up PyCharm integrations**

1. Ruff ([plugin](https://plugins.jetbrains.com/plugin/20574-ruff)).
It will lint and format your code.
Make sure to enable `Use ruff format` option in plugin settings.
2. Pydantic ([plugin](https://plugins.jetbrains.com/plugin/12861-pydantic)).
It will fix PyCharm issues with
type-hinting.
3. Conventional commits ([plugin](https://plugins.jetbrains.com/plugin/13389-conventional-commit)).
It will help you
to write [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).

### Run for development

1. Run the [api service](https://github.com/one-zero-eight/InNoHassle-MusicRoom).
2. Run the bot:
```bash
python3 -m src.main
```
193 changes: 157 additions & 36 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ readme = "README.md"

[tool.poetry.dependencies]
python = "^3.11"
aiogram = "^3.1.1"
aiogram = "^3.4.1"
aiohttp = "^3.8.6"
aiogram-dialog = "^2.0.0"
ruff = "^0.1.9"
redis = "^5.0.1"
python-dotenv = "^1.0.1"
pyyaml = "^6.0.1"
colorlog = "^6.8.2"

[tool.poetry.group.code-style]
optional = true
[tool.poetry.group.code-style.dependencies]
ruff = "^0.2.2"
pre-commit = "^3.6.2"

[tool.ruff]
line-length = 120
ignore = [
Expand Down

0 comments on commit e8743c3

Please sign in to comment.