Skip to content

fix: age-grade band follow-ups from review (v1.18.1) - #93

Merged
0jonjo merged 3 commits into
mainfrom
fix/age-grade-bands-followups
Sep 6, 2026
Merged

0jonjo merged 3 commits into
mainfrom
fix/age-grade-bands-followups

Conversation

@0jonjo

@0jonjo 0jonjo commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Follow-ups from the adversarial review of the just-published 1.18.0. Ships as 1.18.1.

  1. CHANGELOG: moved the 1.18.0 substance under ### Breaking (mirroring the 1.15.0 entry's style), dropped the "label-only change" / "no numeric output changes" softeners, and stated plainly that age_grade[:category] / age_grade_label return different strings below 60% and callers matching "Developing" must update. Added a ## [1.18.1] entry with ### Fixed and ### Changed, and updated the link references.
  2. Corrected provenance wording in lib/calcpace/data/wma_2023_open_standards.yml and README: the WMA / Alan Jones (Howard Grubb) tables are numeric age factors and open standards only and define no categories; the bands from Local Class (60%) upward follow the USATF Masters / National Masters News convention; the three bands below 60% are calcpace's own extension. Added a README sentence noting the bands apply to the rounded age_grade percentage.
  3. AGE_GRADE_LABELS now sorts by min descending at load time and raises ArgumentError unless the lowest min is exactly 0.0. age_grade_label raises ArgumentError: Age-grade percent must be a finite number for non-finite input (NaN/Infinity), in addition to the existing negative-value check.
  4. Added tests: the 60% rounding edge (age_grade(10.0, 2750, age: 40, sex: :male)[:category] == "Local Class", raw value 59.9886%), age_grade_label(Float::NAN) raising, and AgeGrading::AGE_GRADE_LABELS mins being strictly descending and ending at 0.0.
  5. Bumped lib/calcpace/version.rb and the README install line to 1.18.1.
  6. bundle exec rubocop clean (44 files, no offenses), bundle exec rake test green (507 runs, 1135 assertions, 0 failures, 0 errors, 0 skips).
  7. This PR is a draft and should not be merged without a separate go-ahead — merging publishes to RubyGems.

- CHANGELOG: move 1.18.0 substance under ### Breaking (mirroring 1.15.0's
  style), drop softening language, and add a 1.18.1 entry
- Correct provenance wording for age-grade categories in README and
  wma_2023_open_standards.yml: WMA/Alan Jones tables define no categories,
  the 60%+ bands follow USATF Masters/NMN convention, and the sub-60% bands
  are calcpace's own extension
- Note in README that bands apply to the rounded age_grade percentage
- AGE_GRADE_LABELS: sort by min descending at load time and raise unless
  the lowest min is exactly 0.0
- age_grade_label: raise ArgumentError for non-finite percent (NaN/Infinity)
- Add tests for the 60% rounding edge, the non-finite guard, and label
  ordering
- Bump version to 1.18.1
@0jonjo
0jonjo marked this pull request as ready for review September 6, 2026 20:31
Copilot AI lite review requested due to automatic review settings September 6, 2026 20:31
@0jonjo
0jonjo merged commit ab36aba into main Sep 6, 2026
7 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@0jonjo
0jonjo deleted the fix/age-grade-bands-followups branch September 6, 2026 20:31
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.

2 participants