Fix/sports heat stress risk scale#303
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 25 minutes and 30 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR bumps the package version to 3.9.2 and updates the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pythermalcomfort/models/sports_heat_stress_risk.py (1)
95-178: 🛠️ Refactor suggestion | 🟠 MajorAdd the missing
Applicabilitysection.The updated public docstring still doesn’t spell out the model’s validity bounds. Please add an
Applicabilitysection while you’re touching this API doc so callers can see the intended input domain.As per coding guidelines,
pythermalcomfort/models/*.py: Include applicability limits and minimal runnable examples in model function docstrings.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pythermalcomfort/models/sports_heat_stress_risk.py` around lines 95 - 178, Add an "Applicability" section to the sports_heat_stress_risk docstring describing the model validity bounds and expected inputs: state supported ranges for tdb/tr (°C), rh (%), vr (m/s) and minimum sport.vr enforcement, valid met and clo ranges (from _SportsValues / Sports presets), supported duration ranges, array broadcasting behavior, and units; also include a one- or two-line minimal runnable example showing call to sports_heat_stress_risk with numeric inputs and the returned SportsHeatStressRisk usage (e.g., accessing .risk_level_interpolated). Ensure you update the docstring inside the sports_heat_stress_risk function and reference the Sports and _SportsValues names so callers know where presets and types come from.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pythermalcomfort/models/sports_heat_stress_risk.py`:
- Around line 150-156: The example outputs are inconsistent with the
implementation: _calc_risk_single_value() computes t_high as (t_medium +
t_extreme) / 2, so the printed sample values for t_medium, t_high, and t_extreme
in the sports_heat_stress_risk example must be regenerated from an actual call;
update the example lines that print result.t_medium, result.t_high, and
result.t_extreme to reflect the true values returned by sports_heat_stress_risk
(calling sports_heat_stress_risk(tdb=35, tr=35, rh=40, vr=2.0,
sport=Sports.RUNNING)) so t_high equals the midpoint of t_medium and t_extreme
per _calc_risk_single_value().
---
Outside diff comments:
In `@pythermalcomfort/models/sports_heat_stress_risk.py`:
- Around line 95-178: Add an "Applicability" section to the
sports_heat_stress_risk docstring describing the model validity bounds and
expected inputs: state supported ranges for tdb/tr (°C), rh (%), vr (m/s) and
minimum sport.vr enforcement, valid met and clo ranges (from _SportsValues /
Sports presets), supported duration ranges, array broadcasting behavior, and
units; also include a one- or two-line minimal runnable example showing call to
sports_heat_stress_risk with numeric inputs and the returned
SportsHeatStressRisk usage (e.g., accessing .risk_level_interpolated). Ensure
you update the docstring inside the sports_heat_stress_risk function and
reference the Sports and _SportsValues names so callers know where presets and
types come from.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7e234dfd-557f-42e6-8940-93d99275f8a1
📒 Files selected for processing (9)
.bumpversion.tomlCHANGELOG.rstdocs/conf.pypythermalcomfort/__init__.pypythermalcomfort/classes_input.pypythermalcomfort/classes_return.pypythermalcomfort/models/sports_heat_stress_risk.pysetup.pytests/test_sports_heat_stress_risk.py
FedericoTartarini
left a comment
There was a problem hiding this comment.
I'm not entirely sure what is the best way of updating the version moving forward whether it is better that I update the version once I push it to main or whether in each pull request we should update the version number let me know what you think is the best approach.
Perhaps if we update it in the Pull request to development then I'm not entirely sure it is going to be deployed when we push it to main. I need to check the GitHub action.
|
|
Once it has been merged into development, it can then be merged into master and deployed, so that I can use it properly in SMA app. |
Summary by CodeRabbit
Release Notes – Version 3.9.2
New Features
Chores