Repository navigation
Make spot ranking honest about ties, skill and access - #33
Merged
Merged
Conversation
Equal best-hour scores share a rank. Within a tie, shore access and an easier skill come first. --skill lists spots above that level instead of dropping them. Co-authored-by: Zane <xquantize@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #32 (part of #21). Targets
feature/conditions.Equal best-hour scores were broken by spot id, so the alphabetically first spot looked like the top recommendation. Ties are now shown as ties, and skill and access count.
rank_spotsgives spots with the same best-hour score a shared rank (=1,=1,3). Within a tie the order is practicality: shore access before a boat, then easiermin_skill, then earlier best hour, then name.skill(beginner,intermediate,advanced) keeps harder spots out of the ranking and returns them as above your level.swellsense check --all [--hours 12] [--skill LEVEL]adds rank, min_skill, access and a hazards count. With--skill, the above-your-level list is printed after the ranking.No new dependencies.
bash scripts/check.shpassed (270 tests).