Skip to content

Commit

Permalink
Refactor figshare_stem to commons module #31
Browse files Browse the repository at this point in the history
  • Loading branch information
astrochun committed Jul 14, 2020
1 parent 70ca119 commit f899bd0
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions requiam/grouper_query.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import requests

from .commons import figshare_stem


class GrouperQuery(object):
"""
Expand Down Expand Up @@ -47,28 +49,6 @@ def members(self):
return set(self._members)


def figshare_stem(stem):
"""
Purpose:
Construct Grouper figshare stems
:param stem: string corresponding to the sub-stem
Options are: 'quota', 'portal'
:return stem_query: str
Usage:
For quota stem, call as: figshare_stem('quota')
> 'arizona.edu:dept:LBRY:figshare:quota'
For portal stem, call as: figshare_stem('portal')
> 'arizona.edu:dept:LBRY:figshare:portal'
"""

stem_query = 'arizona.edu:dept:LBRY:figshare:{}'.format(stem)
return stem_query


def figshare_group(group, root_stem):
"""
Purpose:
Expand Down

0 comments on commit f899bd0

Please sign in to comment.