mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-12-06 20:36:18 +01:00
Adds the review-comments-and-docs skill (1282-word body) and two evaluation suites: a 21-case measured suite for the skill, and a harness that runs the two concurrency scenarios previously left unrun in agents/evals/global-rules.md.
13 lines
378 B
Python
13 lines
378 B
Python
# SPDX-License-Identifier: MIT
|
|
# Copyright (c) 2026 Edge Systems
|
|
|
|
|
|
def percentage_to_ratio(value: float) -> float:
|
|
"""Convert a percentage in [0, 100] to a ratio in [0, 1].
|
|
|
|
Raise ValueError when value is outside the accepted percentage range.
|
|
"""
|
|
if not 0 <= value <= 100:
|
|
raise ValueError("percentage must be between 0 and 100")
|
|
return value / 100
|