Page MenuHomeSoftware Heritage

Add support for keywords in PKG-INFO.
ClosedPublic

Authored by vlorentz on Mar 15 2019, 11:18 AM.

Diff Detail

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

Event Timeline

Wouldn't we want to deduplicate and sort the values?

Apart from that, the implementation looks sensible :-)

This function outputs JSON-LD arrays, which are unordered.

I don't think it's useful to deduplicate, as these keywords are written by a human, so duplicates would be intentional.

This function outputs JSON-LD arrays, which are unordered.

I don't think it's useful to deduplicate, as these keywords are written by a human, so duplicates would be intentional.

That's fair enough.

.oO(what's the point of an unordered array with duplicate values? :P)

This revision is now accepted and ready to land.Mar 15 2019, 11:45 AM
In D1248#26558, @olasd wrote:

.oO(what's the point of an unordered array with duplicate values? :P)

Multisets have their uses in math, but I don't see any use case in JSON-LD.

This revision was automatically updated to reflect the committed changes.

This function outputs JSON-LD arrays, which are unordered.

I don't think it's useful to deduplicate, as these keywords are written by a human, so duplicates would be intentional.

I'm not sure that's the right judgment criterion here. A more pertinent one, AFAICT, is: does the resulting codemeta property wants/supports duplicate keyword or note? In translating we should make sure the result is consistent, no matter what were the properties of the original metadata provider.

In D1248#26600, @zack wrote:

does the resulting codemeta property wants/supports duplicate keyword or note?

They don't give any specific as to what it should look like. The only "specification" I can find is: "Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas." https://schema.org/keywords