A executable chunk of code.
Name | @id | Type | Description | Inherited from |
---|---|---|---|---|
text | schema:text | string | The text of the code. | Code |
alters | stencila:alters | Array of string | Names of variables that the code chunk alters. See note 2. | CodeChunk |
assigns | stencila:assigns | Array of (Variable or string) | Variables that the code chunk assigns to. See note 1. | CodeChunk |
caption | schema:caption | Array of BlockContent or string | A caption for the CodeChunk. See note 3. | CodeChunk |
declares | stencila:declares | Array of (Variable or Function or string) | Variables that the code chunk declares. | CodeChunk |
duration | stencila:duration | number | Duration in seconds of the last execution of the chunk. | CodeChunk |
errors | stencila:errors | Array of CodeError | Errors when compiling or executing the chunk. | CodeChunk |
exportFrom | stencila:exportFrom | string | A compilation directive giving the name of the variable to export into the content of the code block. | CodeBlock |
format | schema:encodingFormat | string | Media type, typically expressed using a MIME format, of the code. See note 4. | Code |
id | schema:id | string | The identifier for this item. | Entity |
importTo | stencila:importTo | string | A compilation directive giving the name of the variable to import the content of the code block as. | CodeBlock |
imports | stencila:imports | Array of (SoftwareSourceCode or SoftwareApplication or string) | Software packages that the code chunk imports | CodeChunk |
label | stencila:label | string | A short label for the CodeChunk. | CodeChunk |
meta | stencila:meta | object | Metadata associated with this item. | Entity |
outputs | stencila:outputs | Array of Node | Outputs from executing the chunk. | CodeChunk |
programmingLanguage | schema:programmingLanguage | string | The programming language of the code. | Code |
reads | stencila:reads | Array of string | Filesystem paths that this code chunk reads from. | CodeChunk |
uses | stencila:uses | Array of (Variable or string) | Names of variables that the code chunk uses (but does not alter). | CodeChunk |
declares
and uses
programmingLanguage
“json” and encodingFormat
“application/ld+json” for JSON-LD code examples.This documentation was generated from CodeChunk.schema.yaml.