-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
267 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type: SoftwareApplication | ||
softwareRequirements: | ||
# Invalid - Just a list of strings | ||
- Some Package | ||
- Some Other Package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type: SoftwareSession | ||
# Missing property "environment". | ||
cpuResource: | ||
type: ResourceParameters | ||
# Invalid, requested must be > 0 | ||
requested: -1 | ||
# Invalid, limit but be > 0 | ||
limit: -2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type: SoftwareSourceCode | ||
maintainers: | ||
# invalid, should be People or Organizations not just strings | ||
- Joe Smith | ||
- Jane Doe | ||
|
||
# invalid, should be a URL | ||
codeRepository: my-repo.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
type: SoftwareApplication | ||
softwareRequirements: | ||
- type: SoftwareApplication | ||
name: SomePackage | ||
version: 1.2.3 | ||
- type: SoftwareApplication | ||
name: SomeOtherPackage | ||
version: 3.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
type: SoftwareSession | ||
environment: | ||
- name: StencilaMega | ||
volumeMounts: | ||
- type: VolumeMount | ||
mountSource: /foo/bar | ||
mountDestination: /baz/bax | ||
cpuResource: | ||
type: ResourceParameters | ||
requested: 500 | ||
limit: 1000 | ||
memoryResource: | ||
type: ResourceParameters | ||
requested: 1024 | ||
limit: 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type: SoftwareSourceCode | ||
codeRepository: https://github.com/stencila/schema |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
$schema: http://json-schema.org/draft-07/schema# | ||
$id: https://stencila.github.com/schema/Mount.schema.json | ||
'@id': stencila:Mount | ||
title: Mount | ||
description: | | ||
Describes a volume mount from a host to container. | ||
allOf: | ||
- $ref: Thing.schema.yaml | ||
- properties: | ||
mountSource: | ||
'@id': stencila:mountSource | ||
description: The mount source directory on the host. | ||
type: string | ||
mountDestination: | ||
'@id': stencila:mountDestination | ||
description: The mount location inside the container. | ||
type: string | ||
mountOptions: | ||
'@id': stencila:mountOptions | ||
type: array | ||
description: A list of options to use when applying the mount. | ||
items: | ||
- type: string | ||
mountType: | ||
'@id': stencila:mountType | ||
type: string | ||
description: The type of mount. | ||
required: | ||
- mountDestination |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
$schema: https://json-schema.org/draft-07/schema, | ||
$schema: http://json-schema.org/draft-07/schema# | ||
$id: https://stencila.github.com/schema/Package.schema.json | ||
title: Package | ||
description: A computational package. | ||
'@id': stencila:Package | ||
type: object | ||
properties: | ||
type: | ||
description: The type of document | ||
type: string | ||
const: Package | ||
name: | ||
'@id': schema:name | ||
description: The name of the environment. | ||
allOf: | ||
- $ref: name.schema.yaml | ||
additionalProperties: false | ||
allOf: | ||
- $ref: Thing.schema.yaml | ||
required: | ||
- name | ||
- name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# `ResourceParameters` | ||
|
||
## About | ||
|
||
`ResourceParameters` is a generic class for representing any kind of resource that has the concept of a requested or reserved amount and a limit. For example, reserving an amount of memory but not going over the limit. Both `resourceRequested` and `resourceLimit` are optional and can be omitted as appropriate for a particular use case. | ||
|
||
The values are just numbers and the application parsing application can interpret these however it needs. For example, for a memory limit these may be bytes, for a CPU limit they could be the proportion of CPU to use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
$schema: http://json-schema.org/draft-07/schema# | ||
$id: https://stencila.github.com/schema/ResourceParameters.schema.json | ||
title: ResourceParameters | ||
'@id': stencila:ResourceParameters | ||
description: | | ||
Describes limits or requested amounts for a particular resource (e.g. memory or CPU). | ||
properties: | ||
resourceLimit: | ||
'@id': stencila:resourceLimit | ||
description: The maximum amount of the resource that can be used. | ||
type: number | ||
minimum: 0 | ||
resourceRequested: | ||
'@id': stencila:resourceRequested | ||
description: The amount of the resource that has been requested (and possibly reserved). | ||
type: number | ||
minimum: 0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# `SoftwareApplication` | ||
|
||
## Extends | ||
|
||
`SoftwareApplication` extends `CreativeWork`. | ||
|
||
## About | ||
|
||
`SoftwareApplication` represents a software application that can be located by name and version. It may be fetched in binary format or some package manager (npm, pip, etc) could fetch and compile the source code. | ||
|
||
## Parsing/Interpretation | ||
|
||
Although by using the `softwareRequirements` property it is possible to represent a full hierarchy of required packages, normally it is adequate to only list the immediate dependencies and allow the system/language package manager to resolve the rest. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
$schema: http://json-schema.org/draft-07/schema# | ||
$id: https://stencila.github.com/schema/SoftwareApplication.schema.json | ||
title: SoftwareApplication | ||
description: | | ||
A software application. | ||
'@id': stencila:SoftwareApplication | ||
allOf: | ||
- $ref: CreativeWork.schema.yaml | ||
- properties: | ||
softwareRequirements: | ||
'@id': schema:softwareRequirements | ||
description: | | ||
Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (Examples: DirectX, Java or .NET runtime). | ||
type: array | ||
items: | ||
- $ref: SoftwareApplication.schema.yaml | ||
softwareVersion: | ||
'@id': schema:softwareVersion | ||
description: Version of the software instance. | ||
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# `SoftwareSession` | ||
|
||
## Extends | ||
|
||
`SoftwareSession` extends `Thing`. | ||
|
||
## Related | ||
|
||
### Open Containers Initiative | ||
|
||
This is "inspired" by the [OCI Runtime Config Schema](https://github.com/opencontainers/runtime-spec/blob/master/schema/config-schema.json) | ||
|
||
There are a number of properties that did not seem relevant to our use as well as some references that did not seem to be required. We try to stay consistent with the naming used but have dereferenced and combined the config schema and [Linux Schema](https://github.com/opencontainers/runtime-spec/blob/master/schema/defs-linux.json) to use the cpu and memory limits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
$schema: http://json-schema.org/draft-07/schema# | ||
$id: https://stencila.github.com/schema/SoftwareSession.schema.json | ||
title: SoftwareSession | ||
'@id': stencila:SoftwareSession | ||
description: | | ||
Represents a runtime session with the resources and image that is required by software to execute. | ||
allOf: | ||
- $ref: Thing.schema.yaml | ||
- properties: | ||
volumeMounts: | ||
'@id': stencila:volumeMount | ||
description: Volumes to mount in the session. | ||
type: array | ||
items: | ||
- $ref: Mount.schema.yaml | ||
cpuResource: | ||
'@id': stencila:cpuResource | ||
$ref: ResourceParameters.schema.yaml | ||
memoryResource: | ||
'@id': stencila:memoryResource | ||
$ref: ResourceParameters.schema.yaml | ||
environment: | ||
'@id': stencila:environment | ||
description: Definition of the environment to execute this session in. | ||
$ref: Environment.schema.yaml | ||
required: | ||
- environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# `SoftwareSourceCode` | ||
|
||
## Extends | ||
|
||
`SoftwareSourceCode` extends `CreativeWork`. | ||
|
||
## About | ||
|
||
Usually contains a link to a `codeRepository` where the code can be fetched from and then compiled. Normally using `SoftwareApplication` is preferred, if possible, however using `SoftwareSourceCode` allows for the installation of packages where no pre-built version is available. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
$schema: http://json-schema.org/draft-07/schema# | ||
$id: https://stencila.github.com/schema/SoftwareSourceCode.schema.json | ||
title: SoftwareSourceCode | ||
description: | | ||
Computer programming source code. Example: Full (compile ready) solutions, code snippet samples, scripts, templates. | ||
'@id': schema:SoftwareSourceCode | ||
allOf: | ||
- $ref: CreativeWork.schema.yaml | ||
- properties: | ||
codeRepository: | ||
'@id': schema:codeRepository | ||
description: | | ||
Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex) | ||
$ref: URL.schema.yaml | ||
codeSampleType: | ||
'@id': schema:codeSampleType | ||
description: | | ||
What type of code sample: full (compile ready) solution, code snippet, inline code, scripts, template. | ||
type: string | ||
maintainers: | ||
'@id': codemeta:maintainer | ||
description: | | ||
The people or organizations who maintain the software. | ||
type: array | ||
items: | ||
- $ref: Organization.schema.yaml | ||
- $ref: Person.schema.yaml | ||
programmingLanguages: | ||
'@id': schema:programmingLanguage | ||
description: | | ||
The computer programming language. | ||
type: array | ||
items: | ||
- type: string | ||
runtimePlatform: | ||
'@id': schema:runtimePlatform | ||
description: | | ||
Runtime platform or script interpreter dependencies (Example - Java v1, Python2.3, .Net Framework 3.0). | ||
type: array | ||
items: | ||
- type: string | ||
softwareRequirements: | ||
'@id': schema:softwareRequirements | ||
description: | | ||
Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (Examples: DirectX, Java or .NET runtime). | ||
type: array | ||
items: | ||
- $ref: SoftwareApplication.schema.yaml | ||
targetProducts: | ||
'@id': schema:targetProduct | ||
description: | | ||
Target Operating System / Product to which the code applies. If applies to several versions, just the product name can be used. | ||
type: array | ||
items: | ||
- $ref: SoftwareApplication.schema.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters