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

Support Legacy AGB classifications for outdoor rounds? #102

Open
TomHall2020 opened this issue Dec 2, 2024 · 4 comments
Open

Support Legacy AGB classifications for outdoor rounds? #102

TomHall2020 opened this issue Dec 2, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@TomHall2020
Copy link
Contributor

TomHall2020 commented Dec 2, 2024

Hello again!

Currently archeryutils supports calculating handicaps in the new and old AGB systems, and can provide classifications and classification score boundaries for Indoor and Outdoor (and now field) rounds under the new system, and also indoor rounds under the old system.

With the new system being essentially fully integrated now, is it possible to provide classification feature parity for outdoor rounds for the previous system as well? I have a use case for this in that we are trying to keep archr agnostic as to which handicap system it uses, so I would like to still be able to calculate classification score thresholds.

Of course we could already do this by reverse engineering the previous system and working out which handicaps correlate to which classifications, but I'd rather chuck all that in the bin and use archeryutils as a definitive single source of truth for all such matters.

This would at a minimum mean providing two new functions in the classifications namespace: calculate_agb_old_outdoor_classification and agb_indoor_classification_scores. It might also be a good opportunity to add a simplified generic api similar to the top level handicap functions where the handicap scheme and discipline (eg indoor, outdoor, field) can be passed as string arguments, leaving us with a pair of conviniences functions calculate_classifcation and get_classification_scores/classification_thresholds or something similar. Edit: I see that issue #24 remains open, which would be addressed by this if we went for the full flavour.

Happy to help with implementation as ever.

@jatkinson1000
Copy link
Owner

jatkinson1000 commented Dec 2, 2024

Yep @TomHall2020, open to this.

I agree, it should take a similar approach to the old indoor classifications using the "old" AGB handicap equations to get a handicap, and then comparing that to a predefined classification dict based on the old thresholds.

And yes, open to a generic API into classifications as per #24
I think to do this I would want to wrap the existing functions to preserve backwards compatibility where possible.

Quite busy with various things at the moment, but happy to review or co-write if you are thinking of looking at this soon.

@jatkinson1000 jatkinson1000 added enhancement New feature or request help wanted Extra attention is needed labels Dec 2, 2024
@TomHall2020
Copy link
Contributor Author

Awesome. Yeah I can get stuck into it.

I see the handicap thresholds are defined inline for the old indoor classifications. Main thing I could use help with is if you know of a definitive source for the handicap thresholds in the old system? I have some from archr but I would definitely like a double check on that as there could easily be a mistake in there.

Wrapping the existing functions makes sense and is similar to what we did with the handicap functions too. Splitting by system/discipline into modules is convinient for organising the library but inconvienient for calling users having to vary their imports, so generic wrappers calling the existing functions is the best of both worlds.

Might end up ticking off #68 in the process.

@jatkinson1000
Copy link
Owner

Great, thanks.

Yep, I can help with handicap thresholds.
The way I would approach it would be to use the old classification tables and work out the thresholds for each category.
If you get to the point where you have placeholders for the different categories in a dict I can look at filling in the numbers.

One thing that occurs to me as I write this - the age categories will not line up with the new standard, but I think this can be resolved by a guard that maps:

  • U21 -> adult
  • 50+ -> adult
  • U15 -> U16

The logic on eligible rounds will also need tweaking, but should be doable in a similar fashion to the new outdoor classifications, and is less complicated as there is no 'alignment' of ages at U15 - instead just step down by 10m/y per classification for all categories.

No doubt other things will crop up in the process, but I think these two are the big ones.

@TomHall2020
Copy link
Contributor Author

Great, thanks.

Yep, I can help with handicap thresholds. The way I would approach it would be to use the old classification tables and work out the thresholds for each category. If you get to the point where you have placeholders for the different categories in a dict I can look at filling in the numbers.

One thing that occurs to me as I write this - the age categories will not line up with the new standard, but I think this can be resolved by a guard that maps:

* U21 -> adult

* 50+ -> adult

* U15 -> U16

The logic on eligible rounds will also need tweaking, but should be doable in a similar fashion to the new outdoor classifications, and is less complicated as there is no 'alignment' of ages at U15 - instead just step down by 10m/y per classification for all categories.

No doubt other things will crop up in the process, but I think these two are the big ones.

Will start having a look and building the placeholders and open a PR to discuss on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants