Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return all studies curated by a user #33

Open
kcranston opened this issue Oct 14, 2016 · 8 comments
Open

return all studies curated by a user #33

kcranston opened this issue Oct 14, 2016 · 8 comments

Comments

@kcranston
Copy link
Member

Need this to complete profile pages.

@kcranston
Copy link
Member Author

doh - already implemented with find_studies and ot:curatorName property

@jimallman jimallman reopened this Apr 17, 2018
@jimallman
Copy link
Member

Is this fix running anywhere? I'm testing find_studies in the v3 API, and it still returns at most a single string value for ot:tag and ot:curatorName. (Apologies if we're still in transition from oti to otindex -- if so, let me know if I can help move that along.)

@mtholder
Copy link
Member

My impression was that we were still using oti on tree+api.

@jimallman
Copy link
Member

Drat. I was hoping to clean up the curator profile page with accurate study counts (added/curated/in-synthesis).

@jimallman
Copy link
Member

Incidentally, it looks like this force-to-unique-list trick can have the unwanted(?) side effect of re-ordering the list of curator names. We depend on the first listed name to identify the user who first added the study. Is this information stored elsewhere, short of digging up GitHub versions and backtracking to the first entry?

@mtholder
Copy link
Member

good catch that would definitely not be order preserving. I think the nexSON has a ot:curatorName field that is the unaltered list. So it may be OK that the index does not know the order.

I think:

cur_set, cur_list = set(), []
for c in curators:
    if c not in cur_set:
       cur_set.add(c)
       cur_list.append(c)
curators = cur_list

is the efficient way to be order preserving.

@jimallman
Copy link
Member

jimallman commented Apr 17, 2018

Yes, not a major problem, but I was hoping to use this distinction in the curator-profile page, to show "added" vs. "curated" studies. (As an aside, feedback is welcome on how I'm describing these roles, and whether it's worth pointing out the distinction.) You can see this in the existing information about a curator's tree collections:

screen shot 2018-04-17 at 5 23 24 pm

@jimallman
Copy link
Member

And to clarify, I get this information by walking the response to find_studies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants