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

feat/refactor: clean-up !with parameter parsing & add more param support #640

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

minisbett
Copy link
Contributor

@minisbett minisbett commented Feb 26, 2024

Describe your changes

  1. Simplifies the parsing
  2. Adds support for specifying n100, n50, ngeki and nkatu
  3. Adds tests for the parsing

Related Issues / Projects

Checklist

  • I've manually tested my code


result = app.usecases.performance.calculate_performances(
osu_file_path=str(BEATMAPS_PATH / f"{bmap.id}.osu"),
scores=[score_args], # calculate one score
)

return "{msg}: {pp:.2f}pp ({stars:.2f}*)".format(
msg=" ".join(msg_fields),
return "{pp:.2f}pp ({stars:.2f}*)".format(
Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep the msg here is nice in the sense that from in-game, it's easy to tell whether or not the server correctly parsed the params you send

It'll be quite nice now that the parsing is split into a function -- we can have a format__with__args(score_args) -> str and test that similarly

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.

2 participants