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

Fix sort lecturers #48

Merged
merged 9 commits into from
Nov 24, 2024
Merged

Fix sort lecturers #48

merged 9 commits into from
Nov 24, 2024

Conversation

DaymasS
Copy link
Contributor

@DaymasS DaymasS commented Nov 10, 2024

Изменения

Изменено поведение сортировки лекторов

Детали реализации

Сортировка теперь происходит либо по средней оценке (стандартное), либо по отдельному виду оценки, либо по алфавиту фамилий.
Появилась возможность менять порядок сортировки (ascending/descending order)
Также исправлен баг с сортировкой только limit-первых лекторов, а не всех

Check-List

  • Вы проверили свой код перед отправкой запроса?
  • Вы написали тесты к реализованным функциям?
  • Вы не забыли применить форматирование black и isort для Back-End или Prettier для Front-End?

@DaymasS DaymasS requested a review from Temmmmmo November 10, 2024 23:22
@DaymasS DaymasS self-assigned this Nov 10, 2024
Copy link
Member

@Temmmmmo Temmmmmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем генерал выпилили
Оставь, это тоже надо

(см. Детали реализации)

Copy link

github-actions bot commented Nov 10, 2024

Code Coverage

Coverage Report
FileStmtsMissCoverMissing
rating_api
   __main__.py440%1–7
   exceptions.py26388%35–36, 44
rating_api/models
   base.py55591%24–27, 76
   db.py73297%61, 74
rating_api/routes
   comment.py661282%28, 34–37, 87, 93–98, 105, 127, 142
   exc_handlers.py20290%26, 33
   lecturer.py841483%132–153, 169, 177, 195, 201
rating_api/schemas
   base.py12467%6–9
TOTAL4444690% 

Summary

Tests Skipped Failures Errors Time
32 0 💤 0 ❌ 0 🔥 2.233s ⏱️

@DaymasS DaymasS requested a review from Temmmmmo November 11, 2024 07:47
rating_api/routes/lecturer.py Show resolved Hide resolved
rating_api/routes/lecturer.py Outdated Show resolved Hide resolved
rating_api/routes/lecturer.py Outdated Show resolved Hide resolved
@DaymasS DaymasS requested a review from Temmmmmo November 18, 2024 06:29
Copy link
Contributor

@Wudext Wudext left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я бы подумал над изменением логики высчитывания среднего, потому что сейчас идет итерирование трижды по всем оценкам лектора, т.е. get запросы в будущем с такой логикой будут тормозить

В целом ок, по этому просто коммент

rating_api/routes/lecturer.py Show resolved Hide resolved
@Arzangulyan Arzangulyan linked an issue Nov 18, 2024 that may be closed by this pull request
2 tasks
@DaymasS DaymasS requested a review from Wudext November 18, 2024 09:23
@Temmmmmo Temmmmmo merged commit cf3f423 into main Nov 24, 2024
2 checks passed
@DaymasS DaymasS deleted the fix-total-lecturer-num branch November 24, 2024 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Сортировка преподов
3 participants