Skip to content

fix(spp_analytics)#112

Merged
gonzalesedwin1123 merged 2 commits into19.0from
fix/spp-analytics-description
Mar 16, 2026
Merged

fix(spp_analytics)#112
gonzalesedwin1123 merged 2 commits into19.0from
fix/spp-analytics-description

Conversation

@gonzalesedwin1123
Copy link
Member

Summary

  • Fix incorrect model names in readme/DESCRIPTION.md (spp.aggregation.*spp.analytics.*), wrong menu paths ("Aggregation" → "Analytics"), wrong dependency name (spp_metrics_services
    spp_metric_service), and missing security groups
  • Add readme/USAGE.md with a UI testing guide covering 7 test areas and 25+ scenarios for QA verification
  • Add 45 new tests in test_coverage_gaps.py to bring estimated coverage from ~92% to ~96%

Changes

File What changed
readme/DESCRIPTION.md Fixed 6 model names, menu paths, dependency, added missing models and security groups
readme/USAGE.md New QA testing guide: scopes, access rules, cache, search, security roles, validation errors
README.rst Regenerated by oca-gen-addon-readme
tests/test_coverage_gaps.py 45 new tests covering error handling, cache hit/expiry paths, resolver edge cases, indicator registry branches
tests/__init__.py Register new test module

Test plan

  • All 250 tests pass (205 existing + 45 new)
  • Pre-commit checks pass (ruff, pylint, prettier, semgrep, bandit)
  • No existing tests removed or weakened
  • Verify USAGE.md renders correctly on GitHub

… QA guide

Fix model names (spp.aggregation.* → spp.analytics.*), menu paths,
dependency name, and security group documentation in DESCRIPTION.md.
Add USAGE.md with UI testing guide for QA verification. Add 45 new
tests covering error handling, cache paths, and edge cases to bring
coverage above 95%.
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the spp_analytics module by refining its core documentation for clarity and accuracy, providing a detailed manual testing guide for quality assurance, and substantially increasing automated test coverage. These changes aim to improve the module's maintainability, user experience, and overall robustness.

Highlights

  • Documentation Updates: Corrected model names, menu paths, and dependency names in readme/DESCRIPTION.md and README.rst to align with 'analytics' terminology. Additionally, missing security groups were added to the documentation.
  • New UI Testing Guide: Introduced a comprehensive UI testing guide in readme/USAGE.md, covering 7 test areas and over 25 scenarios for QA verification of the analytics module.
  • Increased Test Coverage: Added 45 new tests in test_coverage_gaps.py to address previously uncovered code paths, improving the estimated test coverage from approximately 92% to 96%.
Changelog
  • spp_analytics/README.rst
    • Updated service description from 'aggregation' to 'analytics'
    • Corrected model names and menu paths
    • Expanded security group descriptions
    • Updated dependency name from spp_metrics_services to spp_metric_service
    • Added a 'Usage' section with a table of contents
  • spp_analytics/readme/DESCRIPTION.md
    • Fixed 6 model names, menu paths, and dependency name
    • Added missing models and security groups to the description
  • spp_analytics/readme/USAGE.md
    • Added a new QA testing guide covering scopes, access rules, cache, search, security roles, and validation errors
  • spp_analytics/tests/init.py
    • Registered the new test module test_coverage_gaps
  • spp_analytics/tests/test_coverage_gaps.py
    • Added 45 new tests covering error handling, cache hit/expiry paths, resolver edge cases, and indicator registry branches
Activity
  • No human activity has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily handles a large-scale renaming from spp.aggregation to spp.analytics, updating documentation and model names accordingly. It also introduces a comprehensive USAGE.md for QA testing and significantly boosts test coverage with 45 new tests for edge cases and error handling. The changes are mostly solid, especially the new tests which are very thorough. However, I've identified some inconsistencies in the documentation related to the renaming, specifically with security group names and a reference to a related module, which should be addressed for consistency.

Comment on lines +97 to +114
+-------------------------------+--------------------------------------+
| Group | Access |
+===============================+======================================+
| ``group_aggregation_read`` | Read scopes and cache entries (Tier |
| | 3 technical) |
+-------------------------------+--------------------------------------+
| ``group_aggregation_write`` | Write scopes and cache entries (Tier |
| | 3 technical) |
+-------------------------------+--------------------------------------+
| ``group_aggregation_viewer`` | View aggregate statistics only (Tier |
| | 2) |
+-------------------------------+--------------------------------------+
| ``group_aggregation_officer`` | Query with individual record access |
| | (Tier 2) |
+-------------------------------+--------------------------------------+
| ``group_aggregation_manager`` | Full management including access |
| | rules (Tier 2) |
+-------------------------------+--------------------------------------+

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The security group names group_aggregation_* are inconsistent with the module's renaming to spp_analytics. For better maintainability and clarity, consider renaming them to group_analytics_* (e.g., group_aggregation_read to group_analytics_read). This change should be applied consistently, including in the security XML files where they are defined.

Comment on lines +46 to +50
| `group_aggregation_read` | Read scopes and cache entries (Tier 3 technical) |
| `group_aggregation_write` | Write scopes and cache entries (Tier 3 technical) |
| `group_aggregation_viewer` | View aggregate statistics only (Tier 2) |
| `group_aggregation_officer` | Query with individual record access (Tier 2) |
| `group_aggregation_manager` | Full management including access rules (Tier 2) |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Similar to the README.rst file, the security group names group_aggregation_* are inconsistent with the module's renaming to spp_analytics. For better maintainability and clarity, consider renaming them to group_analytics_* (e.g., group_aggregation_read to group_analytics_read).

Comment on lines +502 to +503
| Spatial scopes return empty | The ``spp_aggregation_spatial`` |
| results | bridge module is not installed |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation refers to spp_aggregation_spatial. Given the module rename from spp_aggregation to spp_analytics, this should likely be spp_analytics_spatial for consistency, assuming that module was also renamed or is planned to be.

Suggested change
| Spatial scopes return empty | The ``spp_aggregation_spatial`` |
| results | bridge module is not installed |
| Spatial scopes return empty | The ``spp_analytics_spatial`` |
| results | bridge module is not installed |

| Analytics menu not visible | User lacks the **Manager** role under Analytics Engine |
| Registrant count shows 0 on area scope | No registrants assigned to the selected area |
| CEL scope shows 0 registrants | CEL expression syntax error or no matching registrants |
| Spatial scopes return empty results | The `spp_aggregation_spatial` bridge module is not installed |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The documentation refers to spp_aggregation_spatial. Given the module rename from spp_aggregation to spp_analytics, this should likely be spp_analytics_spatial for consistency.

Suggested change
| Spatial scopes return empty results | The `spp_aggregation_spatial` bridge module is not installed |
| Spatial scopes return empty results | The `spp_analytics_spatial` bridge module is not installed |

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.23%. Comparing base (93fa4cb) to head (c19987f).
⚠️ Report is 20 commits behind head on 19.0.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             19.0     #112      +/-   ##
==========================================
+ Coverage   70.76%   71.23%   +0.46%     
==========================================
  Files         682      693      +11     
  Lines       37347    38148     +801     
==========================================
+ Hits        26429    27175     +746     
- Misses      10918    10973      +55     
Flag Coverage Δ
spp_analytics 93.13% <ø> (?)
spp_api_v2_gis 71.52% <ø> (ø)
spp_api_v2_simulation 71.12% <ø> (ø)
spp_base_common 90.26% <ø> (ø)
spp_dci_demo 69.23% <ø> (ø)
spp_mis_demo_v2 69.73% <ø> (ø)
spp_programs 45.51% <ø> (ø)
spp_security 66.66% <ø> (ø)
spp_simulation 79.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
spp_analytics/__manifest__.py 0.00% <ø> (ø)

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gonzalesedwin1123 gonzalesedwin1123 marked this pull request as ready for review March 16, 2026 07:37
@gonzalesedwin1123 gonzalesedwin1123 merged commit 4475c68 into 19.0 Mar 16, 2026
24 checks passed
@gonzalesedwin1123 gonzalesedwin1123 deleted the fix/spp-analytics-description branch March 16, 2026 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant