Page MenuHomeSoftware Heritage

Add a function to retrieve a full snapshot
ClosedPublic

Authored by olasd on Oct 18 2018, 4:57 PM.

Details

Summary

This function wraps the paginating branch listing API to do its work. It's in
swh.storage.algos because it should be done client-side rather than server-side.

The tests are fairly simple, and mostly add a bunch of tooling around hypothesis
to generate data that conforms to the swh data schema. Those things could
probably be adequately moved to a new submodule of swh.model.

Test Plan

new tests added

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

LGTM. The hypothesis module looks really interesting for writing better tests, I should document myself on it.

This revision is now accepted and ready to land.Oct 18 2018, 5:16 PM
This revision was automatically updated to reflect the committed changes.

Nice

Especially the 'generator' part in tests ;)