Skip to content

fix(spp_gis_report_programs,spp_studio_api_v2): alpha to beta promotion#90

Merged
emjay0921 merged 2 commits into19.0from
fix/alpha-to-beta-gis-report-programs-studio-api-v2
Mar 12, 2026
Merged

fix(spp_gis_report_programs,spp_studio_api_v2): alpha to beta promotion#90
emjay0921 merged 2 commits into19.0from
fix/alpha-to-beta-gis-report-programs-studio-api-v2

Conversation

@emjay0921
Copy link
Copy Markdown
Contributor

Why is this change needed?

Promote spp_gis_report_programs and spp_studio_api_v2 from Alpha to Beta status. Fixes bugs and adds missing tests identified during review.

How was the change implemented?

  • Added development_status: Beta to both manifests
  • Replaced markdown tables with bullet lists in DESCRIPTION.md files (fixes RST column width CI issue with oca-gen-addon-readme)
  • Fixed variable shadowing bug in spp_studio_api_v2/routers/studio.pylist_variables endpoint was overwriting function parameters source_type and applies_to with loop variables
  • Created test suite for spp_gis_report_programs (14 tests covering report model and wizard)

New unit tests

  • spp_gis_report_programs/tests/test_gis_report_programs.py — 14 tests:
    • TestGISReportProgramsModel: field existence, create with/without program, _apply_context_filters with program/without/non-partner model
    • TestGISReportWizardPrograms: field existence, validation (required/provided/not-required), context filter vals, code suffix

Unit tests executed by the author

  • spp_gis_report_programs: 0 failed, 0 errors of 14 tests
  • spp_studio_api_v2: 0 failed, 0 errors of 89 tests

How to test manually

  1. Install both modules
  2. Verify spp_gis_report_programs wizard shows program field when template requires program
  3. Verify spp_studio_api_v2 /Studio/variables endpoint returns correct data without parameter corruption

Related links

…on fixes

- Add development_status: Beta to both manifests
- Replace markdown tables with bullet lists in DESCRIPTION.md (CI compat)
- Fix variable shadowing bug in studio router list_variables endpoint
- Add unit tests for spp_gis_report_programs (report model + wizard)
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.18%. Comparing base (3068522) to head (ec5830e).
⚠️ Report is 11 commits behind head on 19.0.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             19.0      #90      +/-   ##
==========================================
+ Coverage   69.67%   70.18%   +0.50%     
==========================================
  Files         666      685      +19     
  Lines       36682    37422     +740     
==========================================
+ Hits        25558    26264     +706     
- Misses      11124    11158      +34     
Flag Coverage Δ
spp_base_common 90.26% <ø> (ø)
spp_gis_report_programs 97.05% <ø> (?)
spp_programs 45.51% <ø> (ø)
spp_security 66.66% <ø> (ø)
spp_studio_api_v2 95.32% <100.00%> (?)

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

Files with missing lines Coverage Δ
spp_gis_report_programs/__manifest__.py 0.00% <ø> (ø)
spp_studio_api_v2/__manifest__.py 0.00% <ø> (ø)
spp_studio_api_v2/routers/studio.py 92.20% <100.00%> (ø)

... and 16 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.

@gemini-code-assist
Copy link
Copy Markdown

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 advances the spp_gis_report_programs and spp_studio_api_v2 modules to Beta status, signifying their increased stability and readiness. The promotion is supported by critical bug fixes, enhanced documentation readability, and the addition of comprehensive unit tests, ensuring robust functionality and improved maintainability for both modules.

Highlights

  • Development Status Promotion: The spp_gis_report_programs and spp_studio_api_v2 modules have been promoted from Alpha to Beta development status.
  • Bug Fix: A variable shadowing bug in the list_variables endpoint within spp_studio_api_v2/routers/studio.py was identified and fixed.
  • New Test Suite: A comprehensive test suite comprising 14 tests was added for spp_gis_report_programs, covering report model and wizard functionalities.
  • Documentation Improvement: Markdown tables in README.rst, DESCRIPTION.md, and index.html files were replaced with bullet lists to resolve CI issues related to RST column width.
Changelog
  • spp_gis_report_programs/README.rst
    • Updated documentation tables to bullet lists.
  • spp_gis_report_programs/manifest.py
    • Updated development status to "Beta".
  • spp_gis_report_programs/readme/DESCRIPTION.md
    • Converted markdown tables to bullet lists.
  • spp_gis_report_programs/static/description/index.html
    • Replaced HTML tables with unordered lists.
  • spp_gis_report_programs/tests/init.py
    • Added import for the new GIS report programs test module.
  • spp_gis_report_programs/tests/test_gis_report_programs.py
    • Added a new test suite with 14 tests for GIS report model and wizard.
  • spp_studio_api_v2/README.rst
    • Updated documentation tables to bullet lists.
  • spp_studio_api_v2/manifest.py
    • Updated development status to "Beta".
  • spp_studio_api_v2/readme/DESCRIPTION.md
    • Converted markdown tables to bullet lists.
  • spp_studio_api_v2/routers/studio.py
    • Fixed a variable shadowing bug in the list_variables endpoint.
  • spp_studio_api_v2/static/description/index.html
    • Replaced HTML tables with unordered lists.
Activity
  • No external activity (comments, reviews, etc.) has been recorded for 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
Copy Markdown

@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 correctly promotes spp_gis_report_programs and spp_studio_api_v2 to Beta status, fixes a variable shadowing bug, and adds a valuable test suite. The documentation updates are also beneficial. I've included one suggestion to further refactor the code in spp_studio_api_v2/routers/studio.py for improved conciseness by removing temporary variables.

Comment on lines +400 to +420
var_cel_accessor = var.cel_accessor
var_value_type = var.value_type
var_source_type = var.source_type
var_applies_to = var.applies_to

if not cel_accessor or not value_type or not source_type or not applies_to:
if not var_cel_accessor or not var_value_type or not var_source_type or not var_applies_to:
_logger.warning("Skipping variable ID %s with missing required fields", var.id)
continue

# Ensure string type for required fields (some may be False/None from Odoo)
try:
items.append(
VariableInfo(
name=str(cel_accessor),
label=str(getattr(var, "label", None) or var.name or cel_accessor),
name=str(var_cel_accessor),
label=str(getattr(var, "label", None) or var.name or var_cel_accessor),
description=str(getattr(var, "description", None) or "")
if getattr(var, "description", None)
else None,
valueType=str(value_type),
sourceType=str(source_type),
appliesTo=str(applies_to),
valueType=str(var_value_type),
sourceType=str(var_source_type),
appliesTo=str(var_applies_to),
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

While the fix for variable shadowing is correct, this block can be made more concise by removing the temporary variables (var_cel_accessor, var_value_type, etc.) and accessing the var object's attributes directly. This improves readability and reduces redundancy.

        if not var.cel_accessor or not var.value_type or not var.source_type or not var.applies_to:
            _logger.warning("Skipping variable ID %s with missing required fields", var.id)
            continue

        # Ensure string type for required fields (some may be False/None from Odoo)
        try:
            items.append(
                VariableInfo(
                    name=str(var.cel_accessor),
                    label=str(getattr(var, "label", None) or var.name or var.cel_accessor),
                    description=str(getattr(var, "description", None) or "")
                    if getattr(var, "description", None)
                    else None,
                    valueType=str(var.value_type),
                    sourceType=str(var.source_type),
                    appliesTo=str(var.applies_to),

Add test_coverage_gaps.py with 60+ tests covering monkey-patched service
closures, studio field registration edge cases, extension write service
conversions, variable value service edge cases, and FastAPI endpoint
integration. Coverage: spp_studio_api_v2 95%, spp_gis_report_programs 97%.
@emjay0921 emjay0921 merged commit 5ba2bb7 into 19.0 Mar 12, 2026
20 checks passed
@emjay0921 emjay0921 deleted the fix/alpha-to-beta-gis-report-programs-studio-api-v2 branch March 12, 2026 02:48
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.

2 participants