Page MenuHomeSoftware Heritage

identifiers.gen_swhid: Use QualifiedSWHID instead of the deprecated swhid() function.
ClosedPublic

Authored by vlorentz on Mar 1 2021, 12:39 PM.

Details

Summary

Also fix tests using it with the wrong argument type (a dict with an
"id" key, instead of just the object id).

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5169 (id=18483)

Could not rebase; Attempt merge onto 8c7829a8a4...

Merge made by the 'recursive' strategy.
 swh/web/api/views/graph.py                     |  14 ++--
 swh/web/common/identifiers.py                  |  25 ++++--
 swh/web/misc/badges.py                         |  71 +++++++---------
 swh/web/tests/browse/views/test_content.py     |  31 +++++--
 swh/web/tests/browse/views/test_directory.py   |  27 ++++--
 swh/web/tests/browse/views/test_identifiers.py |   2 +-
 swh/web/tests/misc/test_badges.py              | 109 ++++++++++---------------
 7 files changed, 145 insertions(+), 134 deletions(-)
Changes applied before test
commit cadda99c76d378dad188f6bd76451f7a470a74d0
Merge: 8c7829a8 f9ecd937
Author: Jenkins user <jenkins@localhost>
Date:   Mon Mar 1 11:39:35 2021 +0000

    Merge branch 'diff-target' into HEAD

commit f9ecd937470754e7743d55698b09ba73fa935d08
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 12:34:35 2021 +0100

    identifiers.gen_swhid: Use QualifiedSWHID instead of the deprecated swhid() function.
    
    Also fix tests using it with the wrong argument type (a dict with an
    "id" key, instead of just the object id).

commit 8694a779a485dc2cc37ac90cbdd8b099972a3949
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 12:11:44 2021 +0100

    badges: Use QualifiedSWHID instead of the old SWHID class.
    
    Also drops support for swh:1:ori: badges, because we shouldn't
    support them anyway.

commit 0b974c8923f53d63cb69a8cb89f672540526a00a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 12:07:04 2021 +0100

    graph: Use ExtendedSWHID instead of the old SWHID class.

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

anlambert added a subscriber: anlambert.
anlambert added inline comments.
swh/web/common/identifiers.py
66–76

How about using a single try block here ?

This revision is now accepted and ready to land.Mar 1 2021, 1:45 PM

Build is green

Patch application report for D5169 (id=18486)

Could not rebase; Attempt merge onto 3b1ee65790...

Updating 3b1ee657..9203797f
Fast-forward
 swh/web/common/identifiers.py                  |  25 ++++--
 swh/web/misc/badges.py                         |  71 +++++++---------
 swh/web/tests/browse/views/test_content.py     |  31 +++++--
 swh/web/tests/browse/views/test_directory.py   |  27 ++++--
 swh/web/tests/browse/views/test_identifiers.py |   2 +-
 swh/web/tests/misc/test_badges.py              | 109 ++++++++++---------------
 6 files changed, 137 insertions(+), 128 deletions(-)
Changes applied before test
commit 9203797fe45e93e9a459a50e80c8fa6371ff0cd2
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 12:34:35 2021 +0100

    identifiers.gen_swhid: Use QualifiedSWHID instead of the deprecated swhid() function.
    
    Also fix tests using it with the wrong argument type (a dict with an
    "id" key, instead of just the object id).

commit a9298c4193bf43008501f52c734586b1dce44ebc
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 12:11:44 2021 +0100

    badges: Use QualifiedSWHID instead of the old SWHID class.
    
    Also drops support for swh:1:ori: badges, because we shouldn't
    support them anyway.

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

Build is green

Patch application report for D5169 (id=18490)

Could not rebase; Attempt merge onto 3b1ee65790...

Updating 3b1ee657..65fd22bb
Fast-forward
 swh/web/common/identifiers.py                  |  21 +++--
 swh/web/misc/badges.py                         |  71 +++++++---------
 swh/web/tests/browse/views/test_content.py     |  31 +++++--
 swh/web/tests/browse/views/test_directory.py   |  27 ++++--
 swh/web/tests/browse/views/test_identifiers.py |   2 +-
 swh/web/tests/misc/test_badges.py              | 109 ++++++++++---------------
 6 files changed, 132 insertions(+), 129 deletions(-)
Changes applied before test
commit 65fd22bb64cddae825c1b028cba9e39da702efad
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 12:34:35 2021 +0100

    identifiers.gen_swhid: Use QualifiedSWHID instead of the deprecated swhid() function.
    
    Also fix tests using it with the wrong argument type (a dict with an
    "id" key, instead of just the object id).

commit a9298c4193bf43008501f52c734586b1dce44ebc
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 12:11:44 2021 +0100

    badges: Use QualifiedSWHID instead of the old SWHID class.
    
    Also drops support for swh:1:ori: badges, because we shouldn't
    support them anyway.

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

Build is green

Patch application report for D5169 (id=18494)

Could not rebase; Attempt merge onto 3b1ee65790...

Updating 3b1ee657..777d7e6a
Fast-forward
 swh/web/common/identifiers.py                  | 21 ++++---
 swh/web/misc/badges.py                         | 58 ++++++++---------
 swh/web/tests/browse/views/test_content.py     | 31 +++++++---
 swh/web/tests/browse/views/test_directory.py   | 27 +++++---
 swh/web/tests/browse/views/test_identifiers.py |  2 +-
 swh/web/tests/misc/test_badges.py              | 86 +++++++++++++-------------
 6 files changed, 127 insertions(+), 98 deletions(-)
Changes applied before test
commit 777d7e6ad9d94b62b0978458e413f4381e91fac7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 12:34:35 2021 +0100

    identifiers.gen_swhid: Use QualifiedSWHID instead of the deprecated swhid() function.
    
    Also fix tests using it with the wrong argument type (a dict with an
    "id" key, instead of just the object id).

commit fc8ac013e9970772e46017506a67c17c56de01b6
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 1 12:11:44 2021 +0100

    badges: Use QualifiedSWHID instead of the old SWHID class.
    
    Also drops support for swh:1:ori: badges, because we shouldn't
    support them anyway.

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