-
Notifications
You must be signed in to change notification settings - Fork 2
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
Handicaps refactor #78
Conversation
Co-authored-by Liam Pattinson <liam.pattinson@york.ac.uk>
…nd getting started).
…cap schemes and instead use class property for descending scales.
@TomHall2020 and @LiamPattinson please do take a look and let me know your comments. |
Yeah would be happy to review on this. Will pull down the fork and play with it interactively too, but the new public API does look way better (good riddance |
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.
Overall looking great, pretty much exactly what I had in mind. The only comments I have are really nitpicky.
Had to stop my review there, don't know if it was the diffs or my browser but the github web interface just started going nuts. Most of what I've picked up on is the implicit coupling of from archeryutils import Round, Pass, Target
from archeryutils import handicaps as hc
t = Target("5_zone", (48, "inch"), (80, "yards"))
p = Pass(30,t)
r = Round('Test', [p,p,p])
hc.score_for_round(r, 30, "AGB")
hc.handicap_from_score(700, r, "AGB") Much more intuitive than the previous version and I appreciate the reduced imports as well. Even though I'd got familiar with the codebase by now, from a dev point of view the file layout now also feels more intuitive too. |
…stance rather than class, add super.init to subclasses.
…unctioning and allow default print method.
…mplicit dependence on specific schemes.
…es in base class, but explicitly assign all parameters in each subclass.
…tch handicap functions.
…cations in this task.
… more sensibly in the ToC.
@LiamPattinson @TomHall2020 I have updated the docs which was the last TODO from my end. If I can get closure of those and an approving review I will merge this which should unblock a number of your PRs @TomHall2020 and bring us very close to completing #49. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
==========================================
+ Coverage 96.07% 97.66% +1.59%
==========================================
Files 24 28 +4
Lines 1426 1499 +73
==========================================
+ Hits 1370 1464 +94
+ Misses 56 35 -21
|
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.
Looks good to me, fundamentally all the issues I had are addressed, the public api is much improved, and should be a clean foundation to work from in the future.
OK, great. If you are happy please could you do a review with "Approve" selected @TomHall2020? |
I've reviewed and approved already, but from the status bar below it looks like the repo is set to require an approving review from someone with write access, so that might be the issue you're having. |
I've added my approval and I'm seeing the same issue: at least 1 approving review is required by reviewers with write access. |
Thanks folks - feels great to get this one finally checked off! @TomHall2020 if you can update your open PRs to use this (I know you already rebased one) then hopefully they can follow soon. |
OK, this has been a slog and I will need a bit of a break after, but here it is.
In the words of Dylan Beattie: https://www.youtube.com/watch?v=xCGu5Z_vaps
MR Checklist:
Summary:
HandicapScheme
classHandicapTable
ClassHandicapScheme
classes have been written to provide easy access and preserve similar behaviour of the previous API.This will close #2
This inadvertently also closes #60
TODO:
HandicapTable
to yield a string output for use elsewhere (archerycalculator).HandicapScheme
subclass to the documentation.