Page MenuHomeSoftware Heritage

identifiers: Add to_dict method to SWHID class
ClosedPublic

Authored by anlambert on Jul 8 2020, 4:20 PM.

Details

Summary

This is needed for the /api/1/resolve/(swhid)/ endpoint implementation of swh-web (see D3467).

Diff Detail

Repository
rDMOD Data model
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 D3465 (id=12264)

Rebasing onto 52ef52ea46...

Current branch diff-target is up to date.
Changes applied before test
commit 0547a516e6b1d197c8a748b8b4d1fb4bacf3ab79
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Wed Jul 8 16:18:40 2020 +0200

    identifiers: Add to_dict method to SWHID class

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

This revision is now accepted and ready to land.Jul 8 2020, 5:05 PM

What's wrong with attr.asdict?

What's wrong with attr.asdict?

Nothing but I prefer to wrap its use in an utility method rather than importing the attr module in client code.