Skip to content

Mw/new aggregate export data - #291

Merged
R2ZER0 merged 8 commits into
livefrom
mw/new-aggregate-export-data
Aug 15, 2025
Merged

Mw/new aggregate export data#291
R2ZER0 merged 8 commits into
livefrom
mw/new-aggregate-export-data

Conversation

@michaelwood

Copy link
Copy Markdown
Contributor

No description provided.

@michaelwood
michaelwood force-pushed the mw/new-aggregate-export-data branch from efdfdc0 to abea717 Compare July 28, 2025 17:44
@michaelwood
michaelwood force-pushed the mw/new-aggregate-export-data branch from f129769 to 0de8150 Compare August 8, 2025 17:26
@michaelwood
michaelwood requested a review from R2ZER0 August 8, 2025 17:27
@michaelwood
michaelwood force-pushed the mw/new-aggregate-export-data branch 6 times, most recently from 8f39e5c to 550ff2d Compare August 13, 2025 09:28
- Split the aggregate data into recipient individuals and organisations
- Fix the avg calculation to use the total grants from the currency not
  the total of all grants
- Mark the avg to be deprecated when no longer needed in public APIv1
- Run update_entities() to regenerate aggregate data
- Add missing Orginfocache item to create a non-primary org id org
- Update fixture file `manage.py dumpdata --natural-foreign --natural-primary >
  ./db/fixtures/test_data.json`
This ensures compatibility reflecting the structure change of aggregate
data within the entities objects. The majority of the work is to combine
the aggregate data back into not being split by recipient org/ind types.
This ensures that running the tests doesn't require being in a certain
directory.
As the API will output valid json to a 404 it's helpful to see this in
the output rather than just KeyError.
@michaelwood
michaelwood force-pushed the mw/new-aggregate-export-data branch from 70839b3 to 0249c6a Compare August 13, 2025 16:37
@michaelwood

Copy link
Copy Markdown
Contributor Author

Note this is an data output change so the corresponding change in GrantNav is needed to be deployed simultaneously to avoid breakage.

This should help maintain stability of the aggregate data in both the
test data and to detect any changes/regressions in manage_entities_data output.
@michaelwood

Copy link
Copy Markdown
Contributor Author

Requires: ThreeSixtyGiving/grantnav#1196

@R2ZER0 R2ZER0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good 👍

@R2ZER0
R2ZER0 merged commit 4248d84 into live Aug 15, 2025
4 of 6 checks passed
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