Type, unify and simplify the code.
Related to T645
Differential D3650
storage*: Adapt origin_list(...) -> PagedResult[Origin] Authored by ardumont on Jul 30 2020, 2:32 PM. Tags None Subscribers None
Details
Type, unify and simplify the code. Related to T645 tox
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D3650 (id=12856)Could not rebase; Attempt merge onto b81f928fa7... Updating b81f928f..4d52fc1d Fast-forward swh/storage/algos/origin.py | 34 ++++++++++- swh/storage/algos/snapshot.py | 47 ++++++++++++++- swh/storage/cassandra/storage.py | 29 ++++++---- swh/storage/db.py | 7 ++- swh/storage/in_memory.py | 28 ++++----- swh/storage/interface.py | 13 ++--- swh/storage/storage.py | 33 +++++------ swh/storage/tests/algos/test_origin.py | 98 +++++++++++++++++++++++++++++++- swh/storage/tests/algos/test_snapshot.py | 64 ++++++++++++++++++++- swh/storage/tests/test_storage.py | 13 ++--- 10 files changed, 304 insertions(+), 62 deletions(-) Changes applied before testcommit 4d52fc1d076f26ba8aa6c4da7e4e30008a368df0
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date: Thu Jul 30 14:32:20 2020 +0200
storage*: Adapt origin_list(...) -> PagedResult[Origin]
Related to T645
commit 7beba93a970231e044d48b21491d7c0dbbd43116
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date: Thu Jul 30 09:58:40 2020 +0200
algos.snapshot: Open snapshot_id_get_from_revision
This leverages the latest change in origin_visit_get and
origin_visit_status_get to iterate over visit and visit status to detect a
snapshot targetting a revision.
This algo got used recently in the deposit. It may serve again.
Related to T645See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/625/ for more details. |