Skip to main content

Code Executable

Base type for executable code nodes (i.e. CodeChunk and CodeExpression).

Adds properties to the base Code node type that are necessary, or useful, for executable code. Also makes the programmingLanguage property required since that is necessary to be able to execute it.


Name@idTypeDescriptionInherited from
programmingLanguageschema:programmingLanguagestringThe programming language of the code.Code
textschema:textstringThe text of the code.Code
codeDependenciesstencila:codeDependenciesArray of (CodeChunk or Parameter)The upstream dependencies of the code. See note 1.CodeExecutable
codeDependentsstencila:codeDependentsArray of (CodeChunk or CodeExpression)The downstream dependents of the code. See note 2.CodeExecutable
compileDigeststencila:compileDigeststringA digest of the content, semantics and dependencies of the node.CodeExecutable
errorsstencila:errorsArray of CodeErrorErrors when compiling (e.g. syntax errors) or executing the chunk.CodeExecutable
executeCountstencila:executeCountintegerA count of the number of times that the node has been executed. See note 3.CodeExecutable
executeDigeststencila:executeDigeststringThe compileDigest of the node when it was last executed.CodeExecutable
executeDurationstencila:executeDurationnumberDuration in seconds of the last execution of the code.CodeExecutable
executeEndedstencila:executeEndedDateThe date-time that the the last execution of the code ended.CodeExecutable
executeRequiredstencila:executeRequired'No', 'NeverExecuted', 'SemanticsChanged', 'DependenciesChanged', 'DependenciesFailed'Whether, and why, a node requires execution or re-execution. See note 4.CodeExecutable
executeStatusstencila:executeStatus'Scheduled', 'ScheduledPreviouslyFailed', 'Running', 'RunningPreviouslyFailed', 'Succeeded', 'Failed', 'Cancelled'Status of the most recent, including any current, execution of the code.CodeExecutable
idschema:idstringThe identifier for this item.Entity
mediaTypeschema:encodingFormatstringMedia type, typically expressed using a MIME format, of the code. See note 5.Code
metastencila:metaobjectMetadata associated with this item.Entity


  1. codeDependencies : Note that this excludes CodeExpression nodes since they should not have side effects (e.g. assigning variables) that would cause another node to be dependent upon them.
  2. codeDependents : Note that in comparison to codeDependencies, this property does not allow for Parameter dependents (because parameters are never dependent upon others).
  3. executeCount : Intended to increment with each successive execution of the node, including across sessions. Note that this differs to the execution_count in Jupyter Notebook format which is the "code cell's prompt number" and which resets at the start of each new session.
  4. executeRequired : Derived from a comparison of compileDigest and executeDigest and the executeStatus of dependencies. No: no re-execution is required, the semantics of the code and its dependencies has not changed since it was last executed. NeverExecuted: execution is required because the code has never been executed (or any previous execution was not persisted in its state). SemanticsChanged: re-execution is required because the semantics of the code has changed since it was last executed. DependenciesChanged: the semantics of one or more dependencies (including transitive dependencies) changed since it was last executed. DependenciesFailed: one or more dependencies (including transitive dependencies) failed when it was last executed.
  5. mediaType : This property allows the differentiation of formats using the same programming language or variants of a programming language. An example is using programmingLanguage "json" and encodingFormat "application/ld+json" for JSON-LD code examples.

Available as


This documentation was generated from CodeExecutable.schema.yaml.