Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save camallen/ca697d8d80002a8d99f7c6a7f4bd48c3 to your computer and use it in GitHub Desktop.

Select an option

Save camallen/ca697d8d80002a8d99f7c6a7f4bd48c3 to your computer and use it in GitHub Desktop.
Empty all the PII classification task annotation data from the WAMBO project
# https://www.zooniverse.org/admin/project_status/h-spiers/where-are-my-body-organs
# https://www.zooniverse.org/lab/
wambo_project_id = 5372
wambo_classifications_scope = Classification.where(project_id: wambo_project_id).select(:id)
wambo_classifications_scope.find_in_batches do |classifications|
classifications_update_scope = Classification.where(id: classifications)
# overwrite the submitted task annotations for all workflows
# this will most likley break dumps in API and that's ok.
# we've shipped the data safely
# and folks asking for new data should not be allowed to get it
# errors in the API are nice to flag this :)
classifications_update_scope.update_all(annotations: [])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment