a reputation protocol for open collaboration
Go to file
William Chargin 1083540d21
Parameterize `Graph` over node and edge payloads (#83)
Summary:
Closes #82. This affords clients type-safety without needing to
verbosely annotate every node or edge passed into the graph functions.
It also enables graph algorithms to be more expressive in their types:
for instance, the merge function now clearly indicates from its type
that the first graph’s nodes are passed as the first argument to the
node reducer, and the second graph’s nodes to the second. Clients can
upgrade immediately by using `Graph<*, *>`.

Thankfully, Flow supports variance well enough for this all to be
possible without too much trouble.

Test Plan:
Existing unit tests pass statically and at runtime. I added a test case
to demonstrate that merging works covariantly.

To see some failures, change `string` to an incompatible type, like
`number`, in the definitions of `makeGraph` in test functions for
conservatively rejecting graphs with conflicting nodes/edges
(ll. 446, 462).

wchargin-branch: parameterize-graph
2018-03-17 11:36:53 -07:00
config Move package json to root (#37) 2018-02-26 22:32:23 -08:00
experiments Tweak commit_graph_dump & store sample data. (#12) 2018-02-15 22:16:37 -08:00
flow-typed/npm Move package json to root (#37) 2018-02-26 22:32:23 -08:00
public Move package json to root (#37) 2018-02-26 22:32:23 -08:00
scripts Move package json to root (#37) 2018-02-26 22:32:23 -08:00
src Parameterize `Graph` over node and edge payloads (#83) 2018-03-17 11:36:53 -07:00
.flowconfig Move package json to root (#37) 2018-02-26 22:32:23 -08:00
.gitignore Move package json to root (#37) 2018-02-26 22:32:23 -08:00
.prettierignore Move package json to root (#37) 2018-02-26 22:32:23 -08:00
.prettierrc.json Move package json to root (#37) 2018-02-26 22:32:23 -08:00
.travis.yml Setup travis CI testing (#58) 2018-03-02 14:39:54 -08:00
LICENSE Add LICENSE 2018-02-03 17:58:49 -08:00
README.md Update README.md 2018-03-06 19:09:46 -08:00
package.json Fetch GitHub repos using the GitHub v4 API (#75) 2018-03-15 14:56:25 -07:00
yarn.lock Fetch GitHub repos using the GitHub v4 API (#75) 2018-03-15 14:56:25 -07:00

README.md

SourceCred

Build Status

The open-source community provides an enormous amount of value to the world. However, open-source contributors go largely unrewarded and unrecognized. SourceCred aims to help that situation, by building tools that enable quantitatively measuring the value that open-source contributors provide to individual projects, and to the community as a whole.

SourceCred will create a "Cred Graph", which is a graph that shows how the contributions that compose open-source projects are related to and derive value from each other. From this, we'll be able to assign "cred" to users based on how valuable their contributions are. Cred will be assigned based on a mixture of objective data (e.g. references between GitHub pull requests) and subjective feedback (e.g. projects' own judgments on how important different contributions were).

If you'd like to contribute, please follow along with our issues, as we are using issues to coordinate development and design decisions. We also have a slack.