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 getting scale from grade string #136

Open
vnugent opened this issue Jul 20, 2023 · 1 comment
Open

Support getting scale from grade string #136

vnugent opened this issue Jul 20, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@vnugent
Copy link
Contributor

vnugent commented Jul 20, 2023

While building graphs and charts OpenBeta/open-tick-list#9 I have a constant need to call getScore() to convert grade in string format (Ex: v4or5.8`) to numeric values for sorting and plotting them on the y-axes. However, since we don't store grade context with tick data, it makes building graphs difficult.

Proposal:

const score = getScale('v3').getScore()

const scale = getScale('6a') // we have a problem here. Is it FR or FONT?

Duplicated #94

*Edit: Perhaps we should store grade context when recording ticks. Similarly when we measure distance we have to include the unit, 2km vs 2miles

@vnugent vnugent added the enhancement New feature or request label Jul 20, 2023
@musoke
Copy link
Collaborator

musoke commented Nov 10, 2023

const scale = getScale('6a') // we have a problem here. Is it FR or FONT?

Perhaps we should store grade context when recording ticks. Similarly when we measure distance we have to include the unit, 2km vs 2miles

Not just the context, the discipline would also be needed for your example.

That example shouldn't be an issue though: the convention is that 6a is French sport and 6A is Font (see #107). It's still possible to confuse it with British technical though.

@musoke musoke added this to the M10 milestone Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants