Page MenuHomeSoftware Heritage

Always output valid JSON-LD.

Authored by vlorentz on Oct 29 2018, 3:24 PM.



Our metadata extraction used to export a nested dict structure
loosely based on JSON-LD with

This diff makes it output proper JSON-LD data.

Note that because of some issues (eg. and the impossibility to
represent a software entity without a specific version), I removed
softwareRequirements and softwareSuggestions from the output

As a side-effect, it resolves T1289

PS: Morane, don't review this diff today, it can wait until tomorrow :)

Diff Detail

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

Event Timeline

  • Simplify the normalization logic.
zack added inline comments.

This URI is here as a constant (good!) but its value is repeated in many places in the rest of this diff (bad :-)), violating DRY. It would be nice to remove other occurrences of this verbatim URI, e.g., using dictionary comprehension or string concatenation referencing this constant.

  • Deduplicate Codemeta's base URI.
  • Add CITATION for codemeta.jsonld.

Accepting because I accepted D620

This revision is now accepted and ready to land.Nov 5 2018, 5:31 PM
This revision was automatically updated to reflect the committed changes.