-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
add UIAA gradetype #252
add UIAA gradetype #252
Conversation
UIAA is the dominant grading scale in Central Europe. Also see OpenBeta/openbeta-graphql#252.
|
2c6f315
to
e709c6b
Compare
@l4u532 thanks for the PR. May I ask that you create 2 separate PRs, one for UIAA and one for bolt count field? For the bolt count, maybe consider using an array to account for multipitch climbs? |
How are we dealing with variants of routes? Many multipitch routes have slight variations, where you can break off from the standard route and maybe bypass a difficult section, for example, by climbing a bolt ladder or an easier or harder pitch. This really introduces some complexity. Do we already have a method for representing route variants? It seems to me that an array with array index mapping to bolt count per pitch would not easily extend to representing bolt counts for routes with variations. On the other hand, if every variation has its own unique record and name, then there is no problem. |
@musoke @bradleyDean (1) I suggest creating individual routes for when breaking off of the original route (ie. taking a variant). How else would you be able to tick a route. (2) For "boltsCount", I agree a simple String array should be the most elegant and user-friendly implementation. As @musoke suggested, grade should then become a String array, to map difficulty to pitch. |
0fcf7f6
to
a2835bc
Compare
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.
Could you add some tests? https://github.com/OpenBeta/openbeta-graphql/pull/255/files has analogous ones for Ewbank grades.
Do you want to define a context that uses UIAA too? openbeta-graphql/src/GradeUtils.ts Line 28 in dab9388
|
Good spot. Hm, I don't think I want to define it... COUNTRIES_DEFAULT_NON_US_GRADE_CONTEXT expects this, with a correct-looking mapping. Yet, in Central Europe, where UIAA is dominant, people still use a mix of UIAA and French; in my view, one cannot really definitely pinpoint UIAA to a regional context (apart from alpine, maybe). Besides, export const gradeContextToGradeScales: Partial<Record<GradeContexts, ClimbGradeContextType>> = {
Do you think it's feasible to leave the definition out for now? |
Yes, we need more flexibility there.
I'm working on that, see #283. Likewise for aid.
Yes. The main advantage I see is it being an easy way to get some tests in. |
Looks good! I left one more small query. Do you want to merge this before or after the ice grades in #283? If it's easier for you, I can rebase my PR on this and change the ice grade to WI there. Could you open an issue describing the problems with the current UIAA context? I think there are similar questions to be addressed with other contexts - e.g. we don't have a way of allowing both winter ice and alpine ice grades, or aid and aid with mandatory free. Addressing these may require reworking the grade context model significantly. |
I don't mind waiting. Just ping/mention me once you are done :)
I must admit I have not fully understood the motivation behind and all the interconnections of the current gradeContext model. It def needs a re-work, though. I'll have a look. |
Ok, will ping you when that's done 😄 |
l4u532's UIAA changes
@all-contributors please add @l4u532 for code and ideas |
I've put up a pull request to add @l4u532! 🎉 |
thank you @l4u532! |
OpenBeta misses some database fields/types to cover the needs for climbs in Central Europe (Germany, Austria, Switzerland, etc.). For one, the UIAA grading system. For the other, the number of bolts (fixed anchors) for a climb, as sport climbs are the vast majority, trad climbs are more of a niche.