Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/remove games app #563

Closed
wants to merge 636 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
636 commits
Select commit Hold shift + click to select a range
ddb30bc
test cd
AleksZaritskiy22 Jun 4, 2024
9a87384
test cd
AleksZaritskiy22 Jun 4, 2024
7bfd21c
test cd
AleksZaritskiy22 Jun 4, 2024
78d54bf
test cd
AleksZaritskiy22 Jun 4, 2024
bf042cb
test cd
AleksZaritskiy22 Jun 4, 2024
b46e94e
test cd
AleksZaritskiy22 Jun 4, 2024
c54cd78
test cd
AleksZaritskiy22 Jun 4, 2024
1b2672b
test cd
AleksZaritskiy22 Jun 4, 2024
06b8e72
test cd
AleksZaritskiy22 Jun 4, 2024
697c1d8
test cd
AleksZaritskiy22 Jun 4, 2024
11f3557
test cd
AleksZaritskiy22 Jun 4, 2024
2f7de5d
test cd
AleksZaritskiy22 Jun 4, 2024
e615348
test cd
AleksZaritskiy22 Jun 4, 2024
4267fc4
test cd
AleksZaritskiy22 Jun 4, 2024
fa9fdec
test cd
AleksZaritskiy22 Jun 4, 2024
7dd3e4b
test cd
AleksZaritskiy22 Jun 4, 2024
8791ebe
test cd
AleksZaritskiy22 Jun 4, 2024
98e60f8
test cd
AleksZaritskiy22 Jun 5, 2024
c03472b
test cd
AleksZaritskiy22 Jun 5, 2024
fbd5dc3
test cd
AleksZaritskiy22 Jun 5, 2024
1d2e1c6
test cd
AleksZaritskiy22 Jun 5, 2024
3f6f857
test cd
AleksZaritskiy22 Jun 5, 2024
e7036b8
test cd
AleksZaritskiy22 Jun 5, 2024
6ed322b
test cd
AleksZaritskiy22 Jun 5, 2024
576fad9
test cd
AleksZaritskiy22 Jun 5, 2024
a060e40
Create/endpoint game (#442)
SHURSHALO Jun 5, 2024
345fc46
test cd
AleksZaritskiy22 Jun 5, 2024
e9ddcf4
Merge branch 'dev' of https://github.com/Studio-Yandex-Practicum/adap…
AleksZaritskiy22 Jun 5, 2024
429ebb9
test cd
AleksZaritskiy22 Jun 5, 2024
e260dc4
test cd
AleksZaritskiy22 Jun 5, 2024
05f5e50
test cd
AleksZaritskiy22 Jun 5, 2024
3203a53
test cd
AleksZaritskiy22 Jun 5, 2024
e2085ce
test cd
AleksZaritskiy22 Jun 5, 2024
4daa6cf
test cd
AleksZaritskiy22 Jun 5, 2024
c2ea975
test cd
AleksZaritskiy22 Jun 5, 2024
dee34d8
test cd
AleksZaritskiy22 Jun 5, 2024
228a73e
test cd
AleksZaritskiy22 Jun 5, 2024
cda05ed
test cd
AleksZaritskiy22 Jun 5, 2024
79abbad
test cd
AleksZaritskiy22 Jun 5, 2024
3cbf46e
test cd
AleksZaritskiy22 Jun 6, 2024
4305906
test cd
AleksZaritskiy22 Jun 6, 2024
6de60de
test cd
AleksZaritskiy22 Jun 6, 2024
29ca2fe
test cd
AleksZaritskiy22 Jun 6, 2024
1df7f1a
test cd
AleksZaritskiy22 Jun 6, 2024
a854d65
test cd
AleksZaritskiy22 Jun 6, 2024
9795831
test cd
AleksZaritskiy22 Jun 6, 2024
0aa4666
test cd
AleksZaritskiy22 Jun 6, 2024
04ffa00
test cd
AleksZaritskiy22 Jun 6, 2024
1eb2903
test cd
AleksZaritskiy22 Jun 6, 2024
3d6bcdc
test cd
AleksZaritskiy22 Jun 6, 2024
1d52bb9
test cd
AleksZaritskiy22 Jun 6, 2024
68403f8
test cd
AleksZaritskiy22 Jun 6, 2024
5eb9e0e
test cd
AleksZaritskiy22 Jun 6, 2024
87d9415
test cd
AleksZaritskiy22 Jun 6, 2024
6467e4d
test cd
AleksZaritskiy22 Jun 6, 2024
554b47c
test cd
AleksZaritskiy22 Jun 6, 2024
469bd0c
test cd
AleksZaritskiy22 Jun 6, 2024
59e599e
test cd
AleksZaritskiy22 Jun 6, 2024
bc1eae1
test cd
AleksZaritskiy22 Jun 6, 2024
907c9a9
test cd
AleksZaritskiy22 Jun 6, 2024
3351e58
test cd
AleksZaritskiy22 Jun 6, 2024
d5e7347
test cd
AleksZaritskiy22 Jun 6, 2024
3a11098
test cd
AleksZaritskiy22 Jun 6, 2024
f3fef47
test cd
AleksZaritskiy22 Jun 6, 2024
6ace0df
test cd
AleksZaritskiy22 Jun 6, 2024
2a6b444
test cd
AleksZaritskiy22 Jun 6, 2024
151d433
fix: remove games button for team agents (#445)
Apicqq Jun 6, 2024
89dacfe
Bugfix/game creation form fixes (#441)
Apicqq Jun 6, 2024
c746a92
test cd
AleksZaritskiy22 Jun 7, 2024
984b6fc
Add docker scripts in Makefile and add ds_server in gitignore (#447)
ItsFreez Jun 8, 2024
c78af99
Решен баг с заполением БД реальными данными (#451)
Nikita527 Jun 12, 2024
6d7bf45
fix player_video_games views (#452)
zaritskiiAA Jun 13, 2024
262fb83
fix stage
KonstantinRaikhert Jun 13, 2024
7430ab9
Feature/models id sync (#454)
Apicqq Jun 16, 2024
44b83a4
Bugfix/template fixes (#458)
Apicqq Jun 16, 2024
bdb476f
Fix search display, implement searching games and add icons for edit/…
ItsFreez Jun 16, 2024
9e1724a
fix: fix game creation via admin panel, also add basic form validatio…
Apicqq Jun 16, 2024
a057ad5
Edit players_number (#453)
Milkyaway13 Jun 16, 2024
fd4731e
Create/video recognition (#455)
SHURSHALO Jun 17, 2024
5ebd1c7
refactoring video_api views and swagger doc (#464)
zaritskiiAA Jun 19, 2024
371161c
add requirement
AleksZaritskiy22 Jun 19, 2024
805edcd
fix name mistake in env param (#465)
zaritskiiAA Jun 20, 2024
81331fb
Bugfix/player number edit form (#470)
Apicqq Jun 21, 2024
f66e3cd
Feature/factories and bugfix in player (#472)
DoomHunter190 Jun 25, 2024
7d8ade4
fix game_team query (#477)
zaritskiiAA Jun 27, 2024
4cffa2b
Add GameDataPlayer model for storing game JSON data (#481)
posredn1k Jun 28, 2024
de54f54
connect celery with redis back/broker. create mock tasks (#484)
zaritskiiAA Jun 29, 2024
2dcacf6
Add JSON player data factory (#483)
posredn1k Jul 2, 2024
fa86cb1
add mock functional for processing video (#486)
zaritskiiAA Jul 2, 2024
ea7e693
Bugfix/fix analytic table in uploads (#493)
trippiez Jul 3, 2024
c3a1ee4
rework GameDataPlayer model, refactoring mock celery tasks/serializer…
zaritskiiAA Jul 3, 2024
6a75d73
Add celery instruction
KonstantinRaikhert Jul 8, 2024
3ad323d
add celery instruction
KonstantinRaikhert Jul 8, 2024
bece91a
fix migrations conflict
KonstantinRaikhert Jul 9, 2024
3005a40
Add feature dynamic video button in player_views and templates player…
PavelNep1996 Jul 10, 2024
51012c2
Feature/readme fix (#500)
ffff00-korj Jul 15, 2024
06d4157
Bugfix/template fix game detail (#499)
ffff00-korj Jul 16, 2024
f895fb4
Added the feature of an additional column name of the competition on …
PavelNep1996 Jul 16, 2024
b71f077
add make command for kson factory (#498)
posredn1k Jul 16, 2024
a5519ea
test_status_service (#501)
trippiez Jul 22, 2024
3e2102c
Added diagram video workers in docs. (#508)
AleksandrPU Jul 26, 2024
48ddf9b
Update the game player model - update a player number unique constrai…
ramil-khan Jul 29, 2024
42abd50
Refactor requests to DS API, add YandexDist token to settings and .en…
RuselK Jul 29, 2024
7c376ab
Tests remarks (#514)
Milkyaway13 Jul 29, 2024
679f752
Add show message for unload_player_game_video (#509) (#512)
AleksandrPU Jul 30, 2024
b583e78
Add validation to check unique player number field in player update f…
RuselK Jul 30, 2024
08943bc
Feature/download player video (#520) (#521)
AleksandrPU Aug 1, 2024
a40834e
Bugfix/visible form adding player in team (#518) (#523)
AleksandrPU Aug 3, 2024
58413ac
Bugfix/change footer buttons color (#525) (#526)
AleksandrPU Aug 6, 2024
5c3a044
Integrate Celery worker and flower run into Make run (Issue #515) (#527)
ramil-khan Aug 7, 2024
3cc2333
Feature/django message in game card (#519) (#522)
RuselK Aug 8, 2024
fde48cb
Fix issue #507 - fix stage (#530)
ramil-khan Aug 11, 2024
2a2cb38
Fix stage deployment error (#535)
ramil-khan Aug 15, 2024
48bc8a2
Add celery tasks to download videos from Y.disk, to slice video with …
RuselK Aug 18, 2024
f151a9e
Feature/Add DS mock server (#533)
AleksandrPU Aug 20, 2024
08f9b18
fix bug (#538)
AlexanderKhasanov Aug 25, 2024
c0a592d
Bugfix/random teams in created game (#539)
AleksandrPU Aug 29, 2024
2ad9646
add spec of analytics in docs
KonstantinRaikhert Sep 4, 2024
88fabcc
add spec of analytics in docs
KonstantinRaikhert Sep 4, 2024
5755fd2
Feature/removing celery (#545)
OlegGsk Sep 23, 2024
2c4b1d1
test prod workflow
OlegGsk Sep 23, 2024
0bfa42e
fix /infra/prod/
OlegGsk Sep 24, 2024
ff24d4e
fix docker compose prod
OlegGsk Sep 24, 2024
1cbcf94
test prod.dockerfile
OlegGsk Sep 24, 2024
9962a93
test prod.dockerfile2
OlegGsk Sep 24, 2024
f8d457c
test prod.dockerfile3
OlegGsk Sep 24, 2024
3d4ffa2
test prod.dockerfile4
OlegGsk Sep 24, 2024
a9abd9b
test prod.dockerfile5
OlegGsk Sep 24, 2024
698608b
test prod.dockerfile6
OlegGsk Sep 24, 2024
a3c6648
test deploy to production
OlegGsk Sep 24, 2024
f9fec85
test deploy to production2
OlegGsk Sep 24, 2024
f723f6d
test deploy to production3
OlegGsk Sep 24, 2024
440bf57
test deploy to production4
OlegGsk Sep 24, 2024
1930378
test deploy to production6
OlegGsk Sep 24, 2024
3576d73
Relocated openpyxl config file to configs folder (#549)
Toksi86 Sep 25, 2024
ab46d69
Add commands export-db and import-db. (#548)
InKLaR1TY Sep 25, 2024
930453a
test deploy to production7
OlegGsk Sep 25, 2024
6c659eb
test deploy to production8
OlegGsk Sep 25, 2024
a74d380
test deploy to production9
OlegGsk Sep 25, 2024
d3df132
test deploy to production10
OlegGsk Sep 25, 2024
6f2c7f9
test deploy to production10
OlegGsk Sep 25, 2024
7b04894
test deploy to production11
OlegGsk Sep 25, 2024
d7c9c22
test deploy to production12
OlegGsk Sep 25, 2024
d2ce8b8
test deploy to production13
OlegGsk Sep 25, 2024
4512e64
test deploy to production14
OlegGsk Sep 25, 2024
27a3d35
test deploy to production15
OlegGsk Sep 25, 2024
916dbc9
test deploy to production16
OlegGsk Sep 25, 2024
b33a2f1
test deploy to production17
OlegGsk Sep 25, 2024
520d38a
test deploy to production18
OlegGsk Sep 25, 2024
d6022d4
test deploy to production19
OlegGsk Sep 25, 2024
b4d5f66
test deploy to production20
OlegGsk Sep 25, 2024
176154c
test deploy to production21
OlegGsk Sep 25, 2024
adf55b9
test deploy to production22
OlegGsk Sep 25, 2024
5c63d6d
test deploy to production23
OlegGsk Sep 25, 2024
193823f
test deploy to production24
OlegGsk Sep 26, 2024
54ae2ea
test deploy to production25
OlegGsk Sep 26, 2024
5362f84
test deploy to production26
OlegGsk Sep 26, 2024
29f9fbe
test deploy to production27
OlegGsk Sep 26, 2024
28ced68
test secrets
OlegGsk Sep 26, 2024
2f559ff
test secrets1
OlegGsk Sep 26, 2024
53be901
test secrets2
OlegGsk Sep 26, 2024
783d553
test secrets3
OlegGsk Sep 26, 2024
bffe6d7
test secrets4
OlegGsk Sep 26, 2024
0ad8682
test secrets5
OlegGsk Sep 26, 2024
53ae4e1
test secrets6
OlegGsk Sep 26, 2024
73ed84a
test secrets7
OlegGsk Sep 26, 2024
5c05913
test copy infra to vps
OlegGsk Sep 26, 2024
d4c7608
test copy infra to vps - 1
OlegGsk Sep 26, 2024
3bd7af3
test copy infra to vps - 2
OlegGsk Sep 26, 2024
f2d68f9
test copy infra to vps - 3
OlegGsk Sep 26, 2024
c878c46
test copy infra to vps - 4
OlegGsk Sep 26, 2024
3df804f
test copy infra to vps - 5
OlegGsk Sep 26, 2024
1a3d8d7
test copy infra to vps - 6
OlegGsk Sep 26, 2024
9403383
test copy infra to vps - 7
OlegGsk Sep 26, 2024
8f4b992
test copy infra to vps - 8
OlegGsk Sep 26, 2024
c33f385
test copy infra to vps - 9
OlegGsk Sep 26, 2024
a9d883d
test copy infra to vps - 10
OlegGsk Sep 26, 2024
c4e2321
test copy infra to vps - 11
OlegGsk Sep 26, 2024
58acbd1
test copy infra to vps - 12
OlegGsk Sep 26, 2024
31d71ad
Removed the video_api module and everything related to it
Toksi86 Sep 27, 2024
e7f68c8
test deploy
OlegGsk Sep 27, 2024
695d6bd
test deploy1
OlegGsk Sep 27, 2024
807c7aa
test deploy2
OlegGsk Sep 27, 2024
aa4065f
test deploy3
OlegGsk Sep 27, 2024
891c452
test deploy4
OlegGsk Sep 27, 2024
c786a8e
test deploy5
OlegGsk Sep 27, 2024
846ba06
test deploy6
OlegGsk Sep 27, 2024
5110552
test deploy7
OlegGsk Sep 27, 2024
fedd3f2
test deploy8
OlegGsk Sep 27, 2024
7392223
test deploy8
OlegGsk Sep 27, 2024
d8bc2ef
test deploy9
OlegGsk Sep 27, 2024
0f3e7a1
test deploy10
OlegGsk Sep 27, 2024
5e421b8
test deploy11
OlegGsk Sep 27, 2024
36c394c
test deploy12
OlegGsk Sep 27, 2024
aab2f02
test deploy13
OlegGsk Sep 27, 2024
da36781
test deploy14
OlegGsk Sep 27, 2024
565f906
test deploy15
OlegGsk Sep 27, 2024
48ec311
test deploy16
OlegGsk Sep 27, 2024
4ddddd5
test deploy17
OlegGsk Sep 27, 2024
1ed0ca7
test deploy18
OlegGsk Sep 27, 2024
786827b
test deploy19
OlegGsk Sep 27, 2024
8c6827c
test deploy20
OlegGsk Sep 27, 2024
ecba4ae
test deploy21
OlegGsk Sep 27, 2024
28fce2a
pre-realease
OlegGsk Sep 27, 2024
456a6eb
pre-realease1
OlegGsk Sep 27, 2024
a0b3362
pre-realease2
OlegGsk Sep 27, 2024
1bc1efc
pre-realease3
OlegGsk Sep 28, 2024
9405720
pre-realease4
OlegGsk Sep 28, 2024
83a9f17
pre-realease5
OlegGsk Sep 28, 2024
fa2d1db
pre-realease6
OlegGsk Sep 28, 2024
c3f8f18
pre-realease7
OlegGsk Sep 28, 2024
df1e668
pre-realease8
OlegGsk Sep 28, 2024
d8cc99a
pre-realease9
OlegGsk Sep 28, 2024
875a0dd
pre-realease10
OlegGsk Sep 28, 2024
d2abf66
pre-realease11
OlegGsk Sep 28, 2024
4e6eb8b
on review
OlegGsk Sep 28, 2024
c87c5da
test build
OlegGsk Sep 28, 2024
cb568be
test build1
OlegGsk Sep 28, 2024
c04aff3
test build2
OlegGsk Sep 28, 2024
ad14fbd
test build3
OlegGsk Sep 28, 2024
3dd162a
test watchtower
OlegGsk Sep 28, 2024
808d7b1
test watchtower1
OlegGsk Sep 28, 2024
d466f03
on review3
OlegGsk Sep 28, 2024
251bde8
on review4
OlegGsk Sep 28, 2024
9a125d7
test build
OlegGsk Sep 29, 2024
0eb325c
test build1
OlegGsk Sep 29, 2024
114b9c9
on review 4
OlegGsk Sep 29, 2024
eac00c7
test build-1
OlegGsk Sep 29, 2024
a7562be
test build-2
OlegGsk Sep 29, 2024
9a7f6fe
test build 5
OlegGsk Sep 29, 2024
7015852
test build 6
OlegGsk Sep 29, 2024
f5b44b7
test build 6
OlegGsk Sep 29, 2024
ff13ebe
test build 7
OlegGsk Sep 29, 2024
090e16f
test build 8
OlegGsk Sep 29, 2024
a28a143
test build 8
OlegGsk Sep 30, 2024
ba30530
test build 9
OlegGsk Sep 30, 2024
40c6df2
test build 10
OlegGsk Sep 30, 2024
2a94235
test build 11
OlegGsk Sep 30, 2024
92f3e71
test build 12
OlegGsk Sep 30, 2024
84d79ad
test build 14
OlegGsk Sep 30, 2024
a941288
on_review
OlegGsk Sep 30, 2024
2ff17bf
Merge pull request #552 from Studio-Yandex-Practicum/bugfix/remove-vi…
Toksi86 Oct 1, 2024
3122a24
on_review final
OlegGsk Oct 1, 2024
5f925c3
on_review final
OlegGsk Oct 1, 2024
6b390d3
on_review final1
OlegGsk Oct 1, 2024
74e89cf
Remove parser and rewrite command fill-db (#554)
InKLaR1TY Oct 1, 2024
ccaef8a
fix by review
OlegGsk Oct 1, 2024
9680c9c
Merge branch 'dev' into feature/convert_ci-cd_to_the_prod
OlegGsk Oct 1, 2024
0fa84aa
Merge pull request #553 from Studio-Yandex-Practicum/feature/convert_…
OlegGsk Oct 1, 2024
851f7ab
Remove games app. Rewrite ER Diagram.
InKLaR1TY Oct 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 40 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# API settings
API_DOCS_KEY=8f2d9e1b2c4e6f
# Django settings
SECRET_KEY=12345678
DEBUG=True
ALLOWED_HOSTS=*
# Superuser settings
DJANGO_SUPERUSER_FIRST_NAME=Админ
DJANGO_SUPERUSER_LAST_NAME=Админ
DJANGO_SUPERUSER_ROLE=Администратор
DJANGO_SUPERUSER_USERNAME=admin
DJANGO_SUPERUSER_EMAIL=admin@admin.ru
DJANGO_SUPERUSER_PASSWORD=admin
# Postgres settings
DB_ENGINE='django.db.backends.postgresql'
POSTGRES_PASSWORD='1qw2#ER$'
POSTGRES_USER='django'
POSTGRES_DB='django'
DB_HOST='localhost'
DB_PORT='5432'
# Email settings
EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST='smtp.yandex.ru'
EMAIL_PORT=587
# реквизиты для аутентификации в почтовом сервисе
EMAIL_HOST_USER=your_mail@yandex.ru
EMAIL_HOST_PASSWORD=your_mail_password
EMAIL_USE_TLS=True
# Базовый урл сервиса по обработке видео
PROCESSING_SERVICE_BASE_URL=http://127.0.0.1:8010/
#Redis
REDIS_BROKER_DATABASE_LEVEL=0
# Celery
SETTINGS_LEVEL=dev

CELERY_BROKER_HOST=localhost
CELERY_BROKER_PORT=6379
CELERY_VISIBILITY_TIMEOUT=360
# Yandex Disk settings
YANDEX_DISK_OAUTH_TOKEN=ya_oauth_token
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Bug report
about: Шаблон для описания бага в приложении
title: ''
labels: bug
assignees: ''

---

# Где был обнаружен баг ?

*Описание места и возможных причин бага.*

# Скриншоты

*Сюда добавить возможные скрины с описанием.*

# Предложения и предположения как исправить

*Возможные догадки, как исправить.*
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/docs-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Docs template
about: Оформление Readme и документации
title: ''
labels: documentation
assignees: ''

---

# Что нужно описать?

*Какую часть функционала описываем.*


# Где?

*В какой части репозитория пишем.*
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/new-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: New feature
about: Шаблон на реализацию нового функционала
title: ''
labels: enhancement
assignees: ''

---

# Зачем?

*Зачем выполняется реализация задачи и какую проблему она решает.*

# Как нужно делать?

*Как мы выполняем реализацию данной задачи, какие действия нужны для достижения цели.*

# Где?

*Где делаем реализацию задачи, какие сервисы задействованы, ссылка на требования, сcылка на API, скриншоты.*
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Description

Если нужно что-то дополнить по внесённым изменениям.

## Type of change

Пожалуйста, удалите варианты, которые не относятся к ПР-у.

- [ ] Documentation (опечатки, примеры кода или любое обновление документации)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Опишите, пожалуйста, тесты, которые вы провели для проверки ваших изменений. Предоставьте инструкции, чтобы мы могли воспроизвести их. Также укажите все необходимые детали конфигурации тестов.

## Checklist:

- [ ] Мой код соответствует code-style данного проекта
- [ ] Я провел самоанализ собственного кода
- [ ] Я внес соответствующие изменения в документацию
29 changes: 29 additions & 0 deletions .github/workflows/ codestyle_pep8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Codestyle_pep8

on: [push, pull_request]

jobs:
ruff:
runs-on: ubuntu-latest
name: ruff
steps:
- name: Установка Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Установка Poetry
uses: snok/install-poetry@v1
with:
poetry-version: 1.5.0

- name: Извлечение репозитория
uses: actions/checkout@v4

- name: Установка зависимостей
run: |
poetry install
- name: ruff
run: |
poetry run ruff check
133 changes: 133 additions & 0 deletions .github/workflows/prod_deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Production deploy

on:
push:
branches:
- master

env:
DEPLOY_PATH: adaptive_hockey_federation
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

defaults:
run:
working-directory: .

jobs:
pytest:
runs-on: ubuntu-latest
name: pytest
steps:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install Poetry
uses: snok/install-poetry@v1
with:
poetry-version: 1.5.0

- name: Check out the repo
uses: actions/checkout@v4

- name: Install dependencies
run: |
poetry install
- name: pytest
run: |
poetry run pytest
working-directory: adaptive_hockey_federation

build_and_push:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: pytest

steps:
- uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image for Production
uses: docker/build-push-action@v5
with:
context: .
file: infra/prod/prod.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}


deploy:
if: github.ref == 'refs/heads/master'
name: Deploy changes on server
needs: [pytest, build_and_push]
runs-on: ubuntu-latest
environment:
name: prod_deploy
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Delete stage & dev
run: |
rm -r infra/stage
rm -r infra/dev

- name: Copy infra via ssh
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
source: "infra/"
target: "${{ env.DEPLOY_PATH }}/infra"
rm: true
strip_components: 1

- name: Execute commands on VPS
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
cd ${{ env.DEPLOY_PATH }}
touch .env

echo "${{ secrets.ENV_FILE }}" > .env

cd infra/prod/
sudo systemctl stop adaptive_hockey_federation.service
docker system prune --force

sudo cp -f /home/production/adaptive_hockey_federation/infra/prod/adaptive_hockey_federation.service /etc/systemd/system/adaptive_hockey_federation.service
sudo systemctl daemon-reload
sudo systemctl start adaptive_hockey_federation.service

sudo systemctl is-active --quiet adaptive_hockey_federation.service
until [ $? -eq 0 ]; do
echo "Waiting for adaptive_hockey_federation.service to be active..."
sleep 5
sudo systemctl is-active --quiet adaptive_hockey_federation.service
done

echo "adaptive_hockey_federation.service is active"

docker exec adaptive_hockey_federation python manage.py collectstatic --noinput
docker exec adaptive_hockey_federation python manage.py migrate
32 changes: 32 additions & 0 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Pytest

on:
push:
branches:
- dev

jobs:
pytest:
runs-on: ubuntu-latest
name: pytest
steps:
- name: Установка Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Установка Poetry
uses: snok/install-poetry@v1
with:
poetry-version: 1.5.0

- name: Извлечение репозитория
uses: actions/checkout@v4

- name: Установка зависимостей
run: |
poetry install
- name: pytest
run: |
poetry run pytest
working-directory: adaptive_hockey_federation
46 changes: 36 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
Expand Down Expand Up @@ -138,10 +138,8 @@ venv.bak/
# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# ruff
.ruff_cache/

# Pyre type checker
.pyre/
Expand All @@ -153,8 +151,36 @@ dmypy.json
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/

# VScode
.vscode/

# Pylint settings
.pylintrc

/adaptive_hockey_federation/parser/Именная заявка/
resourses/


#Django static
static/
.DS_Store

#Data JSON
*.json
*.zip

#Data XLSX
*.XLSX
data/

#Data .csv
csv/

#MediaFiles
media/

# DS server
a_hockey-main/
adaptive_hockey_federation/service/test_video/
Loading
Loading