osf.io icon indicating copy to clipboard operation
osf.io copied to clipboard

[ENG-4438] Add Spam Reversal Metric Numbers

Open Johnetordoff opened this issue 1 year ago • 0 comments

Purpose

Add more nuanced statistics indicating what spam flagging actions come from which services and are applied to which resource types.

Changes

  • adds new service specific queries to admin metrics report
    • adds total number of reversed flag and per-sevice for preprints, node, and registrations

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify statistics are correct after back-filling statisitics

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

https://api.osf.io/_/metrics/reports/spam_summary/

Quick backfill script:

import datetime
from dateutil.relativedelta import relativedelta
from django.core.management import call_command


date = datetime.datetime(year=2014, month=1, day=1)
now = datetime.datetime.now()

while date < now:
    date += relativedelta(months=1)
    call_command('monthly_reporters_go', f'{date.year}-{date.month:0>2}')

Side Effects

Ticket

https://openscience.atlassian.net/browse/ENG-4438

Johnetordoff avatar Mar 16 '23 13:03 Johnetordoff