Skip to content

Proposal to add hasSourceCode property in schema.org #246

@moranegg

Description

@moranegg

This issue is part of the SCIWG CodeMeta task force aiming to add all additional properties into schema.org.

Text proposal for the adding the hasSourceCode property in schema.org and CodeMeta

It can be useful to unambiguously define the relationship between a softwareApplication and its softwareSourceCode. Adding an element to act as the inverse to the element “targetProduct” (Target Operating System / Product to which the code applies) would achieve this goal.

For example, unpaywall is a softwareApplication. One product to which unpaywall applies (its “targetProduct”) is the browser, Chrome. Put more simply, unpaywall is for Chrome. To define an inverse, it would be useful to designate where the softwareApplication is from. If a softwareApplication is like unpaywall, its source code is available on a public repository that could be identified using schema.org’s term “codeRepository.” If unpaywall’s source code was instead available in the appendix of an article, using the term “citation” (a reference to another creative work) would be ambiguous as it would not be possible to distinguish a “citation” to the source code appendix from a “citation” to a website or other publication about the code. For this reason we propose the addition of the term “hasSourceCode” to schema.org.

Furthermore there is the possibility to reference the archived software source code in Software Heritage using the SWHID and giving a direct access to the artifact itself, for example the Darktable repository snapshot (4 May 2017, GitHub) :swh:1:snp:c7c108084bc0bf3d81436bf980b46e98bd338453

The utility offered by “hasSourceCode” is similar to the utility offered by the terms “isPartOf” and “hasPart”— the former allows you to specify that a specific creative work is part of another creative work, while the latter is its inverse. “targetProduct” allows you to specify that a creative work applies to another creative work, while “hasSourceCode” allows you to specify that a creative work is executed from another creative work.

Note: following #198

  • This proposal was written in collaboration with @dbouquin

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions