Page MenuHomeSoftware Heritage

Parse Maven licenses.
ClosedPublic

Authored by vlorentz on Fri, Nov 30, 4:58 PM.

Diff Detail

Repository
rDCIDX Object indexer
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz created this revision.Fri, Nov 30, 4:58 PM
zack requested changes to this revision.Sat, Dec 1, 3:51 PM
zack added a subscriber: zack.
zack added inline comments.
swh/indexer/metadata_dictionary.py
284

What happens when multiple <license> elements are present?

It would be nice to have:

  • a dedicated test case for that, and
  • a description of the general semantics of how that is handled in the docstirng of this method
This revision now requires changes to proceed.Sat, Dec 1, 3:51 PM
vlorentz updated this revision to Diff 2384.Mon, Dec 3, 10:48 AM
  • Add doc and tests for the Maven parser.
vlorentz updated this revision to Diff 2385.Mon, Dec 3, 10:49 AM
  • fix typo
vlorentz updated this revision to Diff 2386.Mon, Dec 3, 10:54 AM
  • Run doctests.
vlorentz marked 2 inline comments as done.Mon, Dec 3, 10:55 AM
vlorentz added inline comments.
swh/indexer/metadata_dictionary.py
284

This method always returns a list, so there's nothing interesting here. However, JSON-LD compaction happens later, so I added tests for that.

zack accepted this revision.Mon, Dec 3, 10:57 AM
zack added inline comments.
swh/indexer/metadata_dictionary.py
284

The fact that I wanted documented (in the docstring, type annotation, whatever) was precisely that it always returns a list :-)

This revision is now accepted and ready to land.Mon, Dec 3, 10:57 AM
vlorentz marked 2 inline comments as done.Mon, Dec 3, 11:47 AM
vlorentz added inline comments.
swh/indexer/metadata_dictionary.py
284

True. I added a task to remember to document all these methods further: T1403

This revision was automatically updated to reflect the committed changes.