Page MenuHomeSoftware Heritage

wip: collection api: Open filtering deposit per user and origin_url
AbandonedPublic

Authored by ardumont on Sep 7 2021, 5:22 PM.

Details

Summary

This would allow opening a cli to filter on origin_url and find the latest swhid.

Note: I'm not sold on this approach but I don't see how to actually implement the need
in the end.

todo:

  • escape input to avoid injection
  • allow inverting order result (typically, following through, the order on id should be inverted and even filtered on status done)

Related to T3192

Test Plan

tox
(should be happy)

Diff Detail

Repository
rDDEP Push deposit
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23425
Build 36554: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 36553: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6210 (id=22474)

Rebasing onto f87539ca37...

Current branch diff-target is up to date.
Changes applied before test
commit 84953624e579621ef2cc975a98b97f1d8fb2742d
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Sep 7 17:18:09 2021 +0200

    collection api: Open filtering deposit per user and origin_url
    
    This would allow opening a cli to filter on origin_url and find the latest swhid.
    
    Related to T3192

See https://jenkins.softwareheritage.org/job/DDEP/job/tests-on-diff/675/ for more details.

swh/deposit/api/collection.py
79

**kwargs is useless in the end, i'll drop it.

I'm more and more inclined towards using the web client instead.
See D6211