sourcecred/sharness
Dandelion Mané 7efcc13618
Automatically run pagerank on `sourcecred load` (#1115)
This commit updates the `sourcecred load` command so that it also
automatically runs PageRank on completion.

The implementation is slightly hacky, in that it prints two sets of
task status headers/footers to console, for reasons described in a
comment in the source code. The user-visible effect of this hack can
be seen below:

```
❯ node bin/sourcecred.js load sourcecred/example-github

Starting tasks
  GO   load-git
  GO   load-github
 DONE  load-github
 DONE  load-git

Overview
Final result:  SUCCESS

Starting tasks
  GO   run-pagerank
 DONE  run-pagerank

Overview
Final result:  SUCCESS
```

It would be good to clean this up, but for now I think it's acceptable.

Note that it is not safe to assume that a PagerankGraph always exists
for repos that are included in the RepoIdRegistry. The repo gets added
to the registry before the pagerank task runs. Consumers that are
loading the `PagerankGraph` can just check that the file exists, though.

Test plan: I've added unit tests that verify that the right tasks are
generated. Most importantly, the snapshot of the results of `sourcecred
load` now include a snapshotted pagerank graph.
(The snapshot was updated via `UPDATE_SNAPSHOT=1 yarn test --full`.)

Further progress on #967.
2019-04-11 21:21:29 +02:00
..
__snapshots__/example-github-load Automatically run pagerank on `sourcecred load` (#1115) 2019-04-11 21:21:29 +02:00
.gitignore Add a `.gitignore` for Sharness (#673) 2018-08-15 16:31:00 -07:00
Makefile Add `sharness` for shell-based testing (#597) 2018-08-06 12:56:25 -07:00
SHARNESS_LICENSE Add `sharness` for shell-based testing (#597) 2018-08-06 12:56:25 -07:00
aggregate-results.sh Add `sharness` for shell-based testing (#597) 2018-08-06 12:56:25 -07:00
dummy.t Add `sharness` for shell-based testing (#597) 2018-08-06 12:56:25 -07:00
sharness.sh Add `sharness` for shell-based testing (#597) 2018-08-06 12:56:25 -07:00
test_build_static_site.t core: allow repo ID registry to store metadata (#1003) 2018-11-09 17:28:39 -08:00
test_js_tests_have_top_level_describe_block_with_filename.t test: check that JS tests describe their filenames (#802) 2018-09-06 20:44:59 -07:00
test_load_example_github.t test: fix `test_load_example_github` (#959) 2018-10-31 11:12:36 -07:00