Created
May 3, 2019 11:36
-
-
Save adammcmaster/605695db28d73a88c9020fe1da53c72d to your computer and use it in GitHub Desktop.
Print workflow stats for an organisation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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, | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.