-
Notifications
You must be signed in to change notification settings - Fork 9
Fix decaying points (Fixes #232) #233
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✔️ Auto-approved due to hotfix/
branch.
Codecov Report
@@ Coverage Diff @@
## master #233 +/- ##
==========================================
+ Coverage 96.55% 96.65% +0.09%
==========================================
Files 108 108
Lines 4970 5026 +56
Branches 264 267 +3
==========================================
+ Hits 4799 4858 +59
+ Misses 139 137 -2
+ Partials 32 31 -1
Continue to review full report at Codecov.
|
I may be being stupid here but this doesn't appear to broadcast the websocket message to me? Please send event_type 7, challenge_id and score |
decay_constant = challenge.flag_metadata.get("decay_constant", 0.99) | ||
min_points = challenge.flag_metadata.get("min_points", 100) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move this into settings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure, min_points makes sense to have per challenge imo, because the max points is stored per challenge, decay constant feels like something most people wont need to touch, but if we're giving them control over min and max, it feels a bit odd not giving them control over decay constant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I mean, Django settings. As in
decay_constant = challenge.flag_metadata.get("decay_constant", 0.99) | |
min_points = challenge.flag_metadata.get("min_points", 100) | |
decay_constant = challenge.flag_metadata.get("decay_constant", settings.DEFAULT_CHALLENGE_DECAY) | |
min_points = challenge.flag_metadata.get("min_points", settings.DEFAULT_CHALLENGE_MINIMUM_POINTS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohhh, ok, that makes sense, i'd either put it there or config, the defaults should definitely be configurable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rock solid, apart from maybe moving the values to settings.
3fe4993
to
bcc7b27
Compare
bcc7b27
to
6d4f27f
Compare
…updated whenever a dynamically scored challenge is solved.
@david-cooke will reach out to @thebeanogamer about testing this, then it's good to go |
Am out today, will hopefully find time to test this with shell after some succour from Daniel with running all changes. |
Relevant fields for frontend:
decay_constant
for controlling how fast the points decaymin_points
for controlling the minimum amount of pointsAnd challenge.points_type being set to decay to use this plugin