fix: improve spp_hazard performance, security, UX, and test coverage #101
Open
gonzalesedwin1123 wants to merge 2 commits into19.0from
Open
fix: improve spp_hazard performance, security, UX, and test coverage #101gonzalesedwin1123 wants to merge 2 commits into19.0from
gonzalesedwin1123 wants to merge 2 commits into19.0from
Conversation
- Replace len(rec.xxx_ids) with read_group for computed counts - Use SQL COUNT(DISTINCT) for affected_registrant_count - Batch bulk_create_impacts with BATCH_SIZE=500 - Replace deprecated name_get() with _compute_display_name() - Fix action_close() multi-record bug (iterate per record) - Restrict officer write/create on config models (category, impact_type) - Add base.group_user read ACL for spp.hazard.impact - Apply master data vs workflow entity form patterns - Add alert banners, badge decorations, extension points - Add accessibility titles to icon elements - Add demo areas, registrants, and impact records - Add registrant test suite (9 tests) and security tests (7 tests) - Add 5 new incident tests (areas, display_name, constraints, close) - Update DESCRIPTION.md and add USAGE.md QA testing guide
|
Warning Gemini is experiencing higher than usual traffic and was unable to create the summary. Please try again in a few hours by commenting |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 19.0 #101 +/- ##
==========================================
+ Coverage 71.17% 71.20% +0.03%
==========================================
Files 704 704
Lines 38554 38565 +11
==========================================
+ Hits 27439 27462 +23
+ Misses 11115 11103 -12
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Cover gaps in hazard_incident.py: is_ongoing for alert/recovery/closed statuses, date constraint on update, DISTINCT registrant counting, empty recordset branch, multi-record action_close, and end_date preservation on close. Total tests: 59 → 65.
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
len(rec.xxx_ids)withread_group, use SQLCOUNT(DISTINCT)for affected registrant counts, batchbulk_create_impactswith BATCH_SIZE=500)base.group_userread ACL forspp.hazard.impactname_get()with_compute_display_name(), useCommand.link()in testsaction_close()multi-record bug (now iterates per record)Test plan
./scripts/test_single_module.sh spp_hazard)