Commit Graph

27 Commits

Author SHA1 Message Date
Copilot
d9d26d0523 feat(statistics): store ranked_score & total_score under classic scoring mode (#68)
* Initial plan

* feat(calculator): add classic score simulator and scoring mode support

- Add ScoringMode enum with STANDARDISED and CLASSIC modes
- Add scoring_mode configuration to game settings
- Implement GetDisplayScore function in calculator.py
- Add get_display_score method to Score model
- Update score statistics to use display scores based on scoring mode

Co-authored-by: MingxuanGame <68982190+MingxuanGame@users.noreply.github.com>

* fix(calculator): apply scoring mode to TotalScoreBestScore delete method

- Update delete method to use display score for consistency
- Ensures all UserStatistics modifications use configured scoring mode

Co-authored-by: MingxuanGame <68982190+MingxuanGame@users.noreply.github.com>

* refactor(calculator): address code review feedback

- Move MAX_SCORE constant to app/const.py
- Implement is_basic() as method in HitResult enum
- Move imports to top of file in Score model
- Revert TotalScoreBestScore storage to use standardised score
- Apply display score calculation in tools/recalculate.py
- Keep display score usage in UserStatistics modifications

Co-authored-by: MingxuanGame <68982190+MingxuanGame@users.noreply.github.com>

* chore(linter): auto fix by pre-commit hooks

* Don't use forward-ref for `ScoringMode`

* chore(linter): auto fix by pre-commit hooks

* fix(calculator): update HitResult usage in get_display_score and adjust ruleset value in PerformanceServerPerformanceCalculator

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: MingxuanGame <MingxuanGame@outlook.com>
2025-11-08 20:56:29 +08:00
MingxuanGame
33f321952d feat(custom-rulesets): support custom rulesets (#23)
* feat(custom_ruleset): add custom rulesets support

* feat(custom-ruleset): add version check

* feat(custom-ruleset): add LegacyIO API to get ruleset hashes

* feat(pp): add check for rulesets whose pp cannot be calculated

* docs(readme): update README to include support for custom rulesets

* fix(custom-ruleset): make `rulesets` empty instead of throw a error when version check is disabled

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(custom-ruleset): apply the latest changes of generator

c891bcd159

and

e25041ad3b

* feat(calculator): add fallback performance calculation for unsupported modes

* fix(calculator): remove debug print

* fix: resolve reviews

* feat(calculator): add difficulty calculation checks

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-26 21:10:36 +08:00
MingxuanGame
8790ccad64 feat(pp-calculator): support other pp calculators (#57)
New configurations:

- CALCULATOR="rosu": specific pp calculator
- CALCULATOR_CONFIG='{}': argument passed through into calculator
2025-10-18 19:10:53 +08:00
MingxuanGame
dfd656f2fb style(project): remove from __future__ import annotations 2025-10-03 17:15:41 +00:00
MingxuanGame
d490239f46 chore(linter): update ruff rules 2025-10-03 15:46:53 +00:00
MingxuanGame
d23f32f08d refactor(log): refactor the whole project
format: {time:YYYY-MM-DD HH:mm:ss} [{level}] | {name} | {message}
{name} is:
- Uvicorn: log from uvicorn server (#228B22)
- Service: log from class of `app.service` (blue)
- Fetcher: log from fetchers (magenta)
- Task: log from `app.tasks` (#FFD700)
- System: log from `system_logger` (red)
- Normal: log from `log(name)` (#FFC1C1)
- Default: the module name of caller

if you are writing services or tasks, you can just call `logger.`, we will pack it with name `Service` or `Task`
if you want to print fetcher logs, system-related logs, or normal logs, use `logger = (fetcher_logger / system_logger / log)(name)`
2025-10-03 11:53:05 +00:00
MingxuanGame
224e890e31 feat(recalculate): add scheduled job to recalculate failed scores 2025-08-28 16:53:15 +00:00
MingxuanGame
d4f542c64b chore(score): change pp limit to 3000
没有人类了.
2025-08-25 01:15:34 +08:00
MingxuanGame
598fcc8b38 refactor(project): make pyright & ruff happy 2025-08-22 08:21:52 +00:00
咕谷酱
80d4237c5d ruff fix 2025-08-22 00:07:19 +08:00
咕谷酱
b3fff65e35 fix token 2025-08-18 17:41:10 +08:00
咕谷酱
7f512cec6e Optimization of score calculation 2025-08-18 17:16:44 +08:00
MingxuanGame
11b8f799a0 feat(score): support recalculate statistics 2025-08-17 05:48:36 +00:00
MingxuanGame
658c1a4d17 fix(score): fix cannot calculate pp when mod setting is enum 2025-08-16 16:48:09 +00:00
chenjintang-shrimp
36225df9bb feat(detector): 添加对2b图的判断 2025-08-15 14:49:07 +00:00
chenjintang-shrimp
9a5c2fde08 revert(detetor): revert changes from 8204634 2025-08-15 13:29:44 +00:00
chenjintang-shrimp
8733abb51e Merge branch 'main' of https://github.com/GooGuTeam/osu_lazer_api 2025-08-15 13:20:26 +00:00
chenjintang-shrimp
8204634a4e feat(detector): 支持自定义黑名单 2025-08-15 13:20:19 +00:00
MingxuanGame
ceb4708e71 fix(score): acc multiply 100 2025-08-15 13:14:53 +00:00
chenjintang-shrimp
b79b80a12c feat(detector): 更改检测可疑谱面函数的判断逻辑
- 新增 Threshold 枚举类,定义各种异常阈值
- 实现 too_dense 函数,检测单位时间内的物件密度是否异常
- 实现 slider_is_sus 函数,检查滑条是否存在异常
- 重构 is_suspicious_beatmap 函数,增加对不同游戏模式的检测逻辑
2025-08-15 12:42:49 +00:00
MingxuanGame
814d9c4618 refactor(detector): more readable 2025-08-15 08:52:01 +00:00
chenjintang-shrimp
7c7c68c163 feat(detector): 新增封禁谱面表并检查可疑谱面
- 在数据库中添加了封禁谱面表(banned_beatmaps)
- 实现了检查可疑谱面的功能,将不符合规范的谱面添加到封禁列表
- 更新了相关的模型和迁移文件
2025-08-15 08:05:02 +00:00
MingxuanGame
2c7c761a44 feat(score): add simple suspicious score check
TODO: use another lib to check the beatmap is whether suspicious or not
2025-08-14 07:44:13 +00:00
MingxuanGame
7a6a548a65 fix(statistics): fix levels 2025-08-13 10:37:51 +00:00
MingxuanGame
d9cf522f40 feat(score): support custom pp calculator 2025-08-10 05:05:08 +00:00
MingxuanGame
70399a2e50 feat(score): update statistics & return user in score 2025-07-29 07:36:33 +00:00
MingxuanGame
223fa99692 feat(score): support calculate pp 2025-07-29 02:56:21 +00:00