Skip to content

Conversation

@R2ZER0
Copy link
Contributor

@R2ZER0 R2ZER0 commented Dec 11, 2025

This PR:

  • Enables tracking select non-GBP currencies in the monitoring metrics (only EUR and USD for now).
  • Fixes a bug in rewrite_quality_data where SourceFile aggregate data would fail to be calculated when threading was disabled.
  • Enables creating fake grants in the test framework that have currencies other than GBP, and SourceFile aggregate data is now calculated properly from fake grants, rather than being directly mocked with static data.

Fix a bug in rewrite_quality_data where the function would fail when
arguments threads=0 and publishers_only=False were set, due to not
exporting the results of processing sourcefile quality data / stats.
This commit adds an option to fake_grant() to choose a non-GBP currency
when creating a fake grant.
Also SourceFile aggregate data is now generated from grants instead of
being directly mocked.
This commit enables tracking sum totals for grants in select currencies
other than GBP (at the moment EUR and USD).
@R2ZER0 R2ZER0 requested a review from mrshll1001 December 11, 2025 13:51
Copy link

@mrshll1001 mrshll1001 left a comment

Choose a reason for hiding this comment

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

I believe this is safe to merge, so please go ahead :-)

A thought: Obviously the job at hand is to specifically handle USD and EUR grants in addition to GBP – but are we not just creating tech debt by hard-coding this in various places? There are a few places where there are hard-coded mentions of them e.g. in datastore/monitoring/metrics.py L167; could we be gathering totals for currencies and then adding them to the dict? How much work would it be to handle arbitrary currencies?

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.

3 participants