Skip to content

Instantly share code, notes, and snippets.

@adammcmaster
Created May 3, 2019 11:36
Show Gist options
  • Save adammcmaster/605695db28d73a88c9020fe1da53c72d to your computer and use it in GitHub Desktop.
Save adammcmaster/605695db28d73a88c9020fe1da53c72d to your computer and use it in GitHub Desktop.
Print workflow stats for an organisation
"""
Requires panoptes-client and (on Python 2) futures.
pip install panoptes-client futures
"""
from panoptes_client import Panoptes, Organization
ORG_ID = 16
Panoptes.connect(
username='',
password='',
)
print(u"{:<8}{:<28}{:<28}{:<10}{}".format(
'ID',
'Created date',
'Finished date',
'Subjects',
'Workflow name',
))
for project in Organization(ORG_ID).links.projects:
print("{}".format(project.display_name))
for workflow in project.links.workflows:
print(u"{:<8}{:<28}{:<28}{:<10}{}".format(
workflow.id,
workflow.created_at,
workflow.finished_at,
workflow.subjects_count,
workflow.display_name,
))
@PmasonFF
Copy link

Please see my latest attempt to add the functionality requested by Laura Trouille here:
https://github.com/PmasonFF/Zooniverse-data-digging/blob/master/Panoptes_client_examples/org_workflow_stats_expanded.py
with a readme file here:
https://github.com/PmasonFF/Zooniverse-data-digging/blob/master/Panoptes_client_examples/org_workflow_stats_expanded_readme.md

Adam please have a look and pass them on to Michael Denslowm or request changes as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment