Open kcranston opened 8 years ago
doh - already implemented with find_studies and ot:curatorName property
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.)
My impression was that we were still using oti on tree+api.
Drat. I was hoping to clean up the curator profile page with accurate study counts (added/curated/in-synthesis).
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?
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.
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:
And to clarify, I get this information by walking the response to find_studies
Need this to complete profile pages.