Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Support new sourcecred identities #30

Open
Beanow opened this issue Sep 8, 2019 · 7 comments
Open

Support new sourcecred identities #30

Beanow opened this issue Sep 8, 2019 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Beanow
Copy link
Collaborator

Beanow commented Sep 8, 2019

To answer a question from sourcecred/sourcecred#1360

@Beanow would a widget work too with the updates here?

(referring to the Discourse plugin)

@vsoch the current widgets implementation relies on the format produced by sourcecred scores <project spec>. That format has a concept of users which is assumed to be a github user. To support Discourse for the widgets, we would need to have some form of canonical identities introduced here as well and a way to find which avatar goes with that.

Edit: Identities are now supported sourcecred/sourcecred#1384

@vsoch
Copy link
Contributor

vsoch commented Sep 8, 2019

Are you saying that GitHub users would need to be cross referenced with Discourse, or just that sourcecred would need to produce an equivalent data structure (with user scores) from Discourse? Has that not been finished yet? There are definitely users in discourse, so it should be a doable thing!

@vsoch
Copy link
Contributor

vsoch commented Sep 8, 2019

E.g. I'm looking here although I suppose I don't know how the snapshots are processed :P

@Beanow
Copy link
Collaborator Author

Beanow commented Sep 9, 2019

Yes I think the end goal is to have GitHub and Discourse users mixed in the same instance, rather than analysing them in isolation. Discourse has users but what I meant is that cross referencing yes.

Without that, you may see the same avatar from different sources and with different cred scores.
For instance, right now I would be 4th in line based on https://sourcecred.io/cred/timeline/@sourcecred/

But I'm definitely less active on discourse. On https://discourse.sourcecred.io/t/sneak-peek-sourcecred-discourse-plugin/171 I receive 12 cred. On the GitHub based cred this would be a 26th spot.

I.e. just supporting Discourse avatars I would show up twice in a widget. Somewhere on the first row and somewhere further down like the 3rd or 4th row (rows of 10). Instead we should have a "canonical identity" which has the total cred for a person. So in my case 216 from GitHub, 12 from Discourse, which would probably put me back around the 4th or 5th spot. This time without being further down as well.

I'm not sure how far along the solution for these shared / canonical identities is. But I do think that should be the starting point for updating the widgets code. Looking at the snapshot, there's already an avatar url template. This might mean part of the widgets code (finding the right avatar url) becomes a plugin responsibility and a similar avatar template might be in the canonical identity.

@decentralion can you tell us a bit about how far along this is?

@vsoch
Copy link
Contributor

vsoch commented Sep 9, 2019

How would the identities be matched? Email is the most logical thing, but many users choose to not expose their email addresses. An identical username / image could be correct most of the time, but I'm not sure most of the time is foolproof.

@teamdandelion
Copy link
Contributor

Heya! I'm actually actively working on this on the SourceCred side, with an intention to have a working solution by the end of the week.

Here's my plan:

  • Previously, the codebase assumed that there is a single type of node that represents user identities. However, with the Discourse plugin, this is no longer the case: there are Discourse users and GitHub users. So I've got some code in flight to change this, so that many different types can all be "user types". You can see the first piece PR'd here: Enable multiple scoring node types sourcecred#1361, and I have several more commits on this line that haven't been PR'd yet, but will merge soon.
  • After the changes above, SourceCred will be able to treat many different types of nodes as all being users, so e.g. Discourse users and GitHub users can co-exist happily on the scoreboard. This still won't handle identity resolution, though.
  • I'll then add a new user type, that of a "sourcecred user". People can create SourceCred users and configure how their node will display (e.g. I could make my node display as "Dandelion Mané (@decentralion)" rather than just @decentralion). SourceCred users will be specified by modifying a config file for the instance (so, in principle, anyone will be able to make a pull request to add their SourceCred user to the instance).
  • I'll then merge some graph re-writing logic, that will allow a user to map a set of node addresses to their SourceCred identity. So for example, I could map https://discourse.sourcecred.io/u/decentralion and https://github.com/decentralion to my SourceCred identity. Again, I expect that anyone will be able to make a pull request to the instance to update their mapping.

The net result will be a pretty flexible system for doing manual identity resolution. As we polish SourceCred we can build more convenient ways for doing this so that contributors don't need to make pull requests to a config file, but I think starting here will be fine.

@Beanow
Copy link
Collaborator Author

Beanow commented Sep 14, 2019

Related: #32

@Beanow Beanow added this to the 0.1.0 release milestone Oct 3, 2019
@Beanow Beanow added the enhancement New feature or request label Oct 3, 2019
@Beanow
Copy link
Collaborator Author

Beanow commented Oct 3, 2019

Identities are now implemented: sourcecred/sourcecred#1384

@Beanow Beanow changed the title Support future canonical identities Support new sourcecred identities Oct 3, 2019
@Beanow Beanow added the good first issue Good for newcomers label Jan 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants