A executable chunk of code.

Name @id Type Description Inherited from
text (required) schema:text string The text of the code. Code
type (required) schema:type enum{CodeChunk} The name of the type. Entity
alters stencila:alters array[string] Names of variables that the code chunk alters. CodeChunk
assigns stencila:assigns array[string | Variable] Variables that the code chunk assigns to. CodeChunk
caption schema:caption string | array[Node] A caption for the CodeChunk. CodeChunk
declares stencila:declares array[string | Variable | Function] 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[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. 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[string | SoftwareSourceCode | SoftwareApplication] 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[Node] Outputs from executing the chunk. CodeChunk
programmingLanguage schema:programmingLanguage string The programming language of the code. Code
reads stencila:reads array[string] Filesystem paths that this code chunk reads from. CodeChunk
uses stencila:uses array[string | Variable] Names of variables that the code chunk uses (but does not alter). CodeChunk

Parent: CodeBlock

Descendants: None


Note: This documentation was autogenerated from CodeChunk.schema.yaml. Please help improve these docs (and show how we humans 💁 can do better than bots 🤖!) by creating a Markdown documentation file🙏