Skip to content

Update summary endpoint to return total GFA#5234

Open
kflemin wants to merge 6 commits into
developfrom
summary_v4_view
Open

Update summary endpoint to return total GFA#5234
kflemin wants to merge 6 commits into
developfrom
summary_v4_view

Conversation

@kflemin
Copy link
Copy Markdown
Contributor

@kflemin kflemin commented May 14, 2026

v3 version of the endpoint was updated with Total GFA calculation to display on the inventory summary page. v4 did not yet have that calculation

@kflemin kflemin added the Enhancement Add this label if functionality was generally improved but not a full feature or maintentance. label May 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the v4 analyses stats endpoint to include a “Total GFA”/total square footage value so the inventory summary page can display it, aligning v4 behavior with v3.

Changes:

  • Query PropertyState.gross_floor_area for the selected cycle’s property states.
  • Compute and return a new total_sqft field in the v4 /analyses/stats response.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread seed/views/v4/analyses.py Outdated
Comment thread seed/views/v4/analyses.py
Comment on lines 73 to 77
"status": "success",
"total_records": len(state_ids),
"number_extra_data_fields": len(extra_data_columns),
"total_sqft": total_sqft,
"stats": stats,
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Implemented in b4a92ce. I updated seed/tests/v4/test_analyses_views.py::test_stats to use deterministic gross_floor_area fixture values and added an assertion that verifies total_sqft equals the expected summed value.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI and others added 3 commits May 15, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Add this label if functionality was generally improved but not a full feature or maintentance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants