refactor(model_selection): resolve open CodeQL alerts; lock sf2-safe 22.2.0#217
Merged
Conversation
…ort (CodeQL) Resolves both open code-scanning alerts: - Alert 85 (py/redundant-comparison, warning): CodeQL mis-normalizes the inline "pos > 1 - warn_frac" / "pos < warn_frac" ternary in boundary_report and flags the second test as always true. Hoist the threshold into a named variable inside a shared _position_flag() helper, which also deduplicates the identical flag logic in report_boundary_positions and boundary_report. - Alert 84 (py/repeated-import, note): remove the function-level "import logging" in tests/test_multitask.py that shadowed the module-level import. No behavior change; black-format the module. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ntract) The lecture qmd now passes include_football_match_window to ConfigEntsoe (sf2-safe 22.2.0 event windows), which the team4 consumer-contract gate correctly flagged against the 22.1.0 lock. Bump the lock (pin >=22,<23 already allows it) and sync the lockfile self-version to 8.1.0. Add the two new provider flags (include_football_match_window, include_energy_saving_window) to the exog-provider re-export test and assert registry membership as a superset so additive provider releases in sf2-safe no longer break sf2's suite; removals still fail. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Collaborator
Author
|
🎉 This PR is included in version 8.1.1-rc.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Collaborator
Author
|
🎉 This PR is included in version 8.1.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Summary
Fixes both open code-scanning alerts and brings the dependency lock back in line with the lecture consumer contract.
py/redundant-comparison, warning,model_selection/boundary.py): CodeQL mis-normalizes the inlinepos > 1 - warn_frac/pos < warn_fracternary and claims the second test is always true. The flag logic is now a shared_position_flag()helper with the threshold hoisted into a named variable — this removes the pattern CodeQL trips on and deduplicates identical logic inreport_boundary_positionsandboundary_report. No behavior change.py/repeated-import, note,tests/test_multitask.py): removed the function-levelimport loggingshadowing the module-level import.include_football_match_windowtoConfigEntsoe; the team4 consumer-contract gate flagged the stale lock. The exog-provider re-export test gains the two new event-window flags and asserts registry membership as a superset, so additive provider releases in sf2-safe no longer break this suite (removals still fail).Both alerts are reported against
main; they will auto-close on the next promotion.Verification (full pre-push pipeline, all green)
uv run pytest tests/ -q— 1257 passeduv run ruff check src/ tests/— cleanuv run python docs/quartodoc_build.py && uv run quartodoc interlinks— OKuv run quarto render --no-cache— 44/44 pagesuv tool run reuse lint— compliant🤖 Generated with Claude Code