Skip to content

Commit bbe622f

Browse files
committed
Support for versions and first version
1 parent d7dd2e3 commit bbe622f

4 files changed

Lines changed: 399 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,3 +209,7 @@ Many vocabularies exist to describe software or its constituent parts, e.g., the
209209
This work was indirectly and partially funded through the [CLARIAH-PLUS project](https://clariah.nl).
210210

211211
This work has been supported by the Madrid Government (Comunidad de Madrid-Spain) under the Multiannual Agreement with Universidad Politécnica de Madrid in the line Support for R&D projects for Beatriz Galindo researchers, in the context of the V PRICIT (Regional Programme of Research and Technological Innovation)
212+
213+
## Versions
214+
215+
The development version of software types is what you will find in the root folder of this repository. Different stable versions can be found on the `releases` folder.

release/1.0.0/README.md

Lines changed: 211 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,211 @@
1+
# Software Types
2+
3+
Schema.org profile for specifying software application types, used for software metadata descriptions.
4+
5+
**Authors**: Maarten van Gompel and Daniel Garijo
6+
7+
**Profile available at**: [https://w3id.org/software-types](https://w3id.org/software-types)
8+
9+
**Supported serializations**: JSON-LD (`application/ld+json`), Turtle (`text/turtle`) and HTML. See the code snippet below for an example on how to retrieve the profile in Turtle with a `curl` command:
10+
11+
```
12+
curl -sH "accept:text/turtle" -L https://w3id.org/software-types
13+
```
14+
15+
## Introduction
16+
17+
This profile describes vocabulary terms needed to describe the metadata of software application types (e.g., command line, desktop, software package, software library, etc.). The profile is meant to be used
18+
with [schema.org](https://schema.org/) and [codemeta](https://codemeta.github.io). Our goal is to introduce
19+
as little additional vocabulary as possible and only extend where schema.org
20+
and codemeta leave representation gaps.
21+
22+
## Why do we need a schema.org profile for software types?
23+
24+
Software applications are ubiquitous in our society, ranging simple desktop applications in personal desktops to packages, libraries or containers deployed in servers. In fact, schema.org partly acknowledges the importance of software by having the term `schema:SoftwareApplication` as the target of `schema:SoftwareSourceCode`. This is because software applications typically offers one or more interfaces through which
25+
users or machines can interact with it. Schema.org includes popular types of ``schema:SoftwareApplication``
26+
like ``schema:WebApplication``, ``schema:MobileApplication``, and even
27+
``schema:VideoGame``. However, we find that schema.org subtypes for software applications are quite lacking when we look at them from a software development perspective. Here we attempt to fill the gaps and define further (sub)types
28+
such as command-line applications, desktops applications (GUIs) and programming libraries.
29+
30+
This availability of explicit software interface type information allows for
31+
more accurate software metadata descriptions. Implementing these as types, in
32+
line with what schema.org already does, allows for further type-specific
33+
refinements. A good example is the
34+
[WebAPI](https://github.com/schemaorg/schemaorg/issues/1423) type that is in
35+
development which allows for describing Web APIs, though not a subtype of
36+
``schema:SoftwareApplication``.
37+
38+
**Disclaimer**: this work aims to create a profile that may be incorporated into codemeta or schema.org. The profile has persistent identifiers, but, if standardized, the classes and properties defined here may be absorbed into other initiatives.
39+
40+
## Software types profile: Classes
41+
42+
We define the following additional classes to describe software based on
43+
interface type. All proposed classes extend `schema:SoftwareApplication`.
44+
45+
* ``CommandLineApplication`` - A software application requiring a command-line interface as the primary means of interaction. Examples are popular tools like: ``grep``, ``sed``, ``git``.
46+
* ``DesktopApplication`` - A software application requiring a desktop graphical user interface. Examples include popular software like Firefox, Microsoft Word, Facetime.
47+
* ``NotebookApplication`` - A web application in the form of a notebook (e.g. Jupyter Notebook, R Notebook) or data story.
48+
* ``ServerApplication`` - A software application running as a daemon providing a service, either locally or over a network, running in the background. Examples are software like nginx, MySQL, postfix
49+
* ``SoftwareImage`` - A software application in the form of an image (such as a container image or virtual machine image) that distributes the application along with its wider dependency context.
50+
* ``SoftwareLibrary`` - A software application offering an Application Programming Interface (API) for developers. Examples include software like openssl, libxml2, blas, Huggingface transformers, python-requests.
51+
* ``SoftwarePackage`` - A software application in the form of a package for any particular package manager. It distributes the application but not necessarily its wider dependency context.
52+
* ``TerminalApplication`` - A software application requiring an interactive terminal text-based user interface. Examples include popular tools like vim, mutt, htop, tmux, ncmpcpp, mc, etc.
53+
54+
55+
## Software types profile: Properties
56+
57+
### Executable name
58+
59+
The name of the executable within a certain run-time context (e.g. an
60+
executable filename or name of an importable module). This documents on a
61+
fairly high level by what name software is invoked from a certain run-time
62+
context. The run-time context itself is turn loosely determined by properties
63+
such as ``schema:runtimePlatform`` and ``schema:operatingSystem``.
64+
65+
We include this property to make a clear distinction between the human readable
66+
name of the software, and the identifier used in invocation of the software.
67+
The two may regularly differ with one being more verbose or have stricter
68+
casing than the other.
69+
70+
Examples for this property are:
71+
72+
* The name of the invoked executable as invoked from the command line
73+
* The name of the library as used in the linking stage for compiled languages
74+
* The highest-level name of the module as invoked in an ``import`` or ``include`` statement in languages such as Python, R, Perl, Java.
75+
* The name of the package as passed to a certain package manager (for ``SoftwarePackage``)
76+
* The name of the container as known to a certain container registry (for ``SoftwareImage``)
77+
78+
Examples of this property are also shown in the code snippets A and B.
79+
80+
Note that the executable name should typically not contain any
81+
platform/runtime-specific extensions which may differ across systems
82+
(``.exe``,``.so``,``.dll``,``.dylib``). However, such extensions may be
83+
included if they are static over all possible systems and needed to invoke the
84+
software (``.jar``,``.sh``) and a necessary component in invoking the software
85+
from a specific context.
86+
87+
## How are software types terms used with codemeta?
88+
89+
Codemeta, building upon schema.org, describes software metadata focused on the
90+
software's source code (`schema:SoftwareSourceCode`). We call the various
91+
artefacts that can be produced by the source code **target products** and use
92+
use the existing `schema:targetProduct` property to link the source code
93+
description to one or more target products (see discussion
94+
[here](https://github.com/codemeta/codemeta/issues/267)). These target products
95+
take one of the types defines in our profile, or one of the existing ones
96+
already in schema.org.
97+
98+
Example A (JSON-LD): An application named [WIDOCO](https://github.com/dgarijo/Widoco/) is both a command line application in Java (JAR), but also a library:
99+
100+
```json
101+
{
102+
"@context": [
103+
"https://raw.githubusercontent.com/codemeta/codemeta/2.0/codemeta.jsonld",
104+
"https://raw.githubusercontent.com/schemaorg/schemaorg/main/data/releases/13.0/schemaorgcontext.jsonld",
105+
"https://w3id.org/software-types"
106+
],
107+
"@type": "SoftwareSourceCode",
108+
"name": "WIDOCO",
109+
"version": "1.14.17",
110+
"codeRepository": "https://github.com/dgarijo/Widoco",
111+
...,
112+
"targetProduct": [
113+
{
114+
"type": "CommandLineApplication",
115+
"name": "WIDOCO",
116+
"executableName": "Widoco-1.14.17-jar-with-dependencies.jar",
117+
"runtimePlatform": "Linux"
118+
},
119+
{
120+
"type": "SoftwareLibrary",
121+
"executableName": "es.oeg.Widoco",
122+
"name": "WIDOCO",
123+
"runtimePlatform": "Linux"
124+
},
125+
]
126+
}
127+
```
128+
129+
Example B: A python package ([Chowlk](https://github.com/oeg-upm/Chowlk)) can be run as a web service, online (note that example links are provided):
130+
131+
```json
132+
{
133+
"@context": [
134+
"https://raw.githubusercontent.com/codemeta/codemeta/2.0/codemeta.jsonld",
135+
"https://raw.githubusercontent.com/schemaorg/schemaorg/main/data/releases/13.0/schemaorgcontext.jsonld",
136+
"https://w3id.org/software-types"
137+
],
138+
"@type": "SoftwareSourceCode",
139+
"name": "Chowlk",
140+
"codeRepository": "https://github.com/oeg-upm/Chowlk",
141+
...,
142+
"targetProduct": [
143+
{
144+
"type": "WebApplication",
145+
"executableName": "chowlk-webapp",
146+
"provider": {
147+
"@type": "Organization",
148+
"name": "Ontology Engineering Group"
149+
}
150+
"url": "https://example.org/chwolk-ws"
151+
},
152+
{
153+
"type": "WebAPI",
154+
"provider": {
155+
"@type": "Organization",
156+
"name": "Ontology Engineering Group"
157+
}
158+
"endpointUrl": {
159+
"@type": "EntryPoint",
160+
"url": "https://example.org/chowlk-service",
161+
"contentType": "application/json"
162+
},
163+
"endpointDescription": {
164+
{
165+
"@type": "CreativeWork",
166+
"encodingFormat": "application/json",
167+
"url": "https://example.org/chowlk-service/info?version=v1"
168+
},
169+
},
170+
"conformsTo": "https://jsonapi.org/format/1.0/",
171+
"documentation": "https://example.org/chowlk-service/docs",
172+
},
173+
]
174+
}
175+
```
176+
177+
## Software as a Service
178+
179+
The vocabulary we propose here allows to express a link between software
180+
metadata and instances of that software running as a service somewhere. Example B shows ``schema:WebAPI`` and ``schema:WebApplication`` used to
181+
describe instances of software as a service. We use ``schema:WebAPI`` with a
182+
proposed extension as formulated
183+
[here](https://webapi-discovery.github.io/rfcs/rfc0001.html) and discussed
184+
[here](https://github.com/schemaorg/schemaorg/issues/1423). These are **not** new properties proposed in this profile.
185+
186+
The link between `SoftwareSourceCode` and subclasses of `SoftwareApplication`,
187+
`WebAPI`, `WebPage` or `WebSite` is established using the `targetProduct`
188+
property. There is also a reverse property for this called
189+
``codemeta:hasSourceCode`` (see discussion
190+
[here](https://github.com/codemeta/codemeta/pull/229)) that can be used in case of need.
191+
192+
193+
## Implementations
194+
195+
Support for our `software_types` extension to codemeta/schema.org is
196+
implemented in the following software:
197+
198+
* [codemetapy](https://github.com/proycon/codemetapy) - Python library and command-line tool for converting to codemeta and creating/manipulating existing codemeta descriptions.
199+
* [codemeta-harvester](https://github.com/proycon/codemeta-harvester) - Automatically harvests and converts software metadata to codemeta
200+
* [somef](https://github.com/KnowledgeCaptureAndDiscovery/somef) ([work in progress](https://github.com/KnowledgeCaptureAndDiscovery/somef/issues/486)) - A Python package for automated software metadata extraction.
201+
* [c2t](https://github.com/osoc-es/c2t) ([work in progress](https://github.com/osoc-es/c2t/issues/34)), a python package for converting software images into triples (extracting their dependencies)
202+
203+
## Related approaches
204+
205+
Many vocabularies exist to describe software or its constituent parts, e.g., the [software description ontology](https://w3id.org/okn/o/sd/), [description of a project vocabulary](http://usefulinc.com/ns/doap#), [hydra](https://www.hydra-cg.com/spec/latest/core/) (for API description), the common workflow language (description of inputs and outputs of software components, etc.), etc. Our proposed profile does not aim to redefine any new term related to software, but propose a lightweight profile that can be easily incorporated into schema.org or codemeta.
206+
207+
## Acknowledgement
208+
209+
This work was indirectly and partially funded through the [CLARIAH-PLUS project](https://clariah.nl).
210+
211+
This work has been supported by the Madrid Government (Comunidad de Madrid-Spain) under the Multiannual Agreement with Universidad Politécnica de Madrid in the line Support for R&D projects for Beatriz Galindo researchers, in the context of the V PRICIT (Regional Programme of Research and Technological Innovation)
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"@context": {
3+
"stype": "https://w3id.org/software-types#",
4+
"schema": "http://schema.org/",
5+
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
6+
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
7+
"CommandLineApplication": { "@id": "stype:CommandLineApplication" },
8+
"DesktopApplication": { "@id": "stype:DesktopApplication" },
9+
"TerminalApplication": { "@id": "stype:TerminalApplication" },
10+
"ServerApplication": { "@id": "stype:ServerApplication" },
11+
"SoftwareImage": { "@id": "stype:SoftwareImage" },
12+
"SoftwarePackage": { "@id": "stype:SoftwarePackage" },
13+
"NotebookApplication": { "@id": "stype:NotebookApplication" },
14+
"executableName": { "@id": "stype:executableName" },
15+
"targetProduct": { "@id": "schema:targetProduct" },
16+
"hasSourceCode": { "@id": "schema:hasSourceCode" },
17+
"WebAPI": { "@id": "schema:WebAPI" },
18+
"SoftwareApplication": { "@id": "schema:SoftwareApplication" },
19+
"subClassOf": { "@id": "rdfs:subClassOf" },
20+
"label": { "@id": "rdfs:label" },
21+
"Class": { "@id": "rdfs:Class" },
22+
"comment": { "@id": "rdfs:comment" },
23+
"Property": { "@id": "rdf:Property" }
24+
},
25+
"@graph": [
26+
{
27+
"@id": "stype:CommandLineApplication",
28+
"@type": "Class",
29+
"subClassOf": "SoftwareApplication",
30+
"label": "Command-line Application",
31+
"comment": "A software application offering a command-line interface."
32+
},
33+
{
34+
"@id": "stype:DesktopApplication",
35+
"@type": "Class",
36+
"subClassOf": "SoftwareApplication",
37+
"label": "Desktop Application",
38+
"comment": "A software application offering a graphical user interface on the desktop."
39+
},
40+
{
41+
"@id": "stype:TerminalApplication",
42+
"@type": "Class",
43+
"subClassOf": "SoftwareApplication",
44+
"label": "Terminal Application",
45+
"comment": "A software application offering a terminal text-based user interface (e.g. ncurses)."
46+
},
47+
{
48+
"@id": "stype:ServerApplication",
49+
"@type": "Class",
50+
"subClassOf": "ServerApplication",
51+
"label": "Server Application",
52+
"comment": "A software application running as a daemon providing a service, either locally or over a network, running in the background."
53+
},
54+
{
55+
"@id": "stype:SoftwareLibrary",
56+
"@type": "Class",
57+
"subClassOf": "SoftwareApplication",
58+
"label": "Software Library",
59+
"comment": "A software application offering an Application Programming Interface (API) for developers"
60+
},
61+
{
62+
"@id": "stype:SoftwareImage",
63+
"@type": "Class",
64+
"subClassOf": "SoftwareApplication",
65+
"label": "Software Image",
66+
"comment": "A software application in the form of an image (such as a container image or virtual machine image), distributes the application along with its wider dependency context."
67+
},
68+
{
69+
"@id": "stype:SoftwarePackage",
70+
"@type": "Class",
71+
"subClassOf": "SoftwareApplication",
72+
"label": "Software Package",
73+
"comment": "A software application in the form of a package for any particular package manager, distributes the application but not its wider dependency context."
74+
},
75+
{
76+
"@id": "stype:NotebookApplication",
77+
"@type": "Class",
78+
"subClassOf": "WebApplication",
79+
"label": "Notebook Application",
80+
"comment": "A web application in the form of a notebook (e.g. Jupyter Notebook, R Notebook) or data story."
81+
},
82+
{
83+
"@id": "stype:executableName",
84+
"@type": "Property",
85+
"label": "Executable Name",
86+
"comment": "The name of the executable within a certain run-time context (e.g. an executable filename or name of an importable module)."
87+
}
88+
]
89+
}

0 commit comments

Comments
 (0)