Skip to content

Add IRCRA grading scale - #180

Open
Stevie-Ray wants to merge 6 commits into
OpenBeta:developfrom
Stevie-Ray:develop
Open

Stevie-Ray wants to merge 6 commits into
OpenBeta:developfrom
Stevie-Ray:develop

Conversation

@Stevie-Ray

@Stevie-Ray Stevie-Ray commented Oct 16, 2025 •

Copy link
Copy Markdown

Add IRCRA grading scale support (fixes #179)

Adds support for the IRCRA integer scale from Reporting Grades in Climbing Research.
This lets Sandbag convert between systems (French, YDS, Font, V-scale, etc.) using a shared universal scale, super useful for research and data comparisons. Includes mappings and tests.

https://ircra.rocks/reporting-grades-in-climbing-research/

@github-actions

github-actions Bot commented Oct 16, 2025 •

Copy link
Copy Markdown

Coverage report

Caution

Coverage does not meet threshold
Statements coverage not met for global: expected <=999999 not covered statements, but got 772

St.❔
Category Percentage Covered / Total
🟢 Statements
90.93% (+2.98% 🔼)
772/849
🟡 Branches
78.28% (+10.74% 🔼)
209/267
🟢 Functions
85.19% (+5.92% 🔼)
161/189
🟢 Lines
90% (+3.11% 🔼)
675/750
Show new covered files 🐣
St.❔
File Statements Branches Functions Lines
🟢 scales/ircra.ts 100% 100% 100% 100%
🟢 ircra-conversion.ts 100% 100% 100% 100%

Test suite run success

440 tests passing in 19 suites.

Report generated by 🧪jest coverage report action from a61e8f7

@musoke

musoke commented Nov 3, 2025

Copy link
Copy Markdown
Collaborator

Thank you for this!
Very interesting. Is the table on https://ircra.rocks/reporting-grades-in-climbing-research/ consistent with ours? I am concerned that our current table doesn't align completely with the IRCRA table, so may give unexpected results.

@Stevie-Ray

Stevie-Ray commented Nov 4, 2025 •

Copy link
Copy Markdown
Author

Hi @musoke, i used the GradeParser.ts in __tests__ to match the internal grading system. Is the sandbag 107 grades based on some other sheet or system?

    test('convert IRCRA to FONT', () => {
      expect(convertFromIRCRA({ grade: '14', sourceScale: GradeScales.FONT }, GradeScales.FONT)).toEqual('')
    })

    test('convert IRCRA to VSCALE', () => {
      expect(convertFromIRCRA({ grade: '14', sourceScale: GradeScales.VSCALE }, GradeScales.VSCALE)).toEqual('V1')
    })

    test('convert IRCRA to YDS', () => {
      expect(convertFromIRCRA({ grade: '15', sourceScale: GradeScales.YDS }, GradeScales.YDS)).toEqual('5.11b')
    })

    test('convert IRCRA to French', () => {
      expect(convertFromIRCRA({ grade: '15', sourceScale: GradeScales.FRENCH }, GradeScales.FRENCH)).toEqual('6c')
    })

    // Test reverse conversions
    test('convert FONT to IRCRA', () => {
      expect(convertGrade('6a', GradeScales.FONT, GradeScales.IRCRA)).toEqual('15/16')
    })

    test('convert VSCALE to IRCRA', () => {
      expect(convertGrade('V2', GradeScales.VSCALE, GradeScales.IRCRA)).toEqual('15/16')
    })

It was kind of tricky to make it match perfectly, but as you can see in the image, there is no perfect alignment.

CocoisBuggy
CocoisBuggy previously approved these changes Sep 19, 2026
@CocoisBuggy

CocoisBuggy commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Im not gonna merge this just yet, but I don't see a problem with how the submission has been formed, especially if the author is seeing tests pass

@CocoisBuggy
CocoisBuggy dismissed their stale review September 21, 2026 07:49

I should not be reviewing code on my phone, It clearly doesn't work

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add IRCRA reporting scale for research-grade conversions

3 participants