Home

Code Chunk

Properties

The CodeChunk type has these properties:

NameDescriptionTypeInherited from
idThe identifier for this item.StringEntity
executionModeUnder which circumstances the node should be executed.ExecutionModeExecutable
compilationDigestA digest of the content, semantics and dependencies of the node.CompilationDigestExecutable
compilationMessagesMessages generated while compiling the code.CompilationMessage*Executable
executionDigestThe compilationDigest of the node when it was last executed.CompilationDigestExecutable
executionDependenciesThe upstream dependencies of this node.ExecutionDependency*Executable
executionDependantsThe downstream dependants of this node.ExecutionDependant*Executable
executionTagsTags in the code which affect its execution.ExecutionTag*Executable
executionCountA count of the number of times that the node has been executed.IntegerExecutable
executionRequiredWhether, and why, the code requires execution or re-execution.ExecutionRequiredExecutable
executionStatusStatus of the most recent, including any current, execution.ExecutionStatusExecutable
executionInstanceThe id of the kernel instance that performed the last execution.StringExecutable
executionEndedThe timestamp when the last execution ended.TimestampExecutable
executionDurationDuration of the last execution.DurationExecutable
executionMessagesMessages emitted while executing the node.ExecutionMessage*Executable
codeThe code.CordCodeExecutable
programmingLanguageThe programming language of the code.StringCodeExecutable
executionBoundsThe environment in which code should be executed.ExecutionBoundsCodeExecutable
executionBoundedThe execution bounds, if any, on the last execution.ExecutionBoundsCodeExecutable
authorsThe authors of the executable code.Author*CodeExecutable
provenanceA summary of the provenance of the code.ProvenanceCount*CodeExecutable
labelTypeThe type of the label for the chunk.LabelType-
labelA short label for the chunk.String-
labelAutomaticallyWhether the label should be automatically updated.Boolean-
captionA caption for the chunk.Block*-
outputsOutputs from executing the chunk.Node*-
isEchoedWhether the code should be displayed to the reader.Boolean-
isHiddenWhether the outputs should be hidden from the reader.Boolean-
executionPureWhether the code should be treated as side-effect free when executed.Boolean-

Related

The CodeChunk type is related to these types:

Bindings

The CodeChunk type is represented in:

Testing

During property-based (a.k.a generative) testing, the properties of the CodeChunk type are generated using the following strategies.

PropertyComplexityDescriptionStrategy
codeMin+Generate a simple fixed string of code.Cord::from("code")
Low+Generate a random string of up to 10 alphanumeric characters (excludes whitespace whichcan be problematic in Markdown).r"[a-zA-Z0-9]{1,10}".prop_map(Cord::from)
High+Generate a random string of up to 100 characters (excluding control characters).r"[^\p{C}]{1,100}".prop_map(Cord::from)
MaxGenerate an arbitrary string.String::arbitrary().prop_map(Cord::from)
programmingLanguageMin+Generate a simple fixed string.Some(String::from("lang"))
Low+Generate one of the well known programming language short names.option::of(r"(cpp)|(js)|(py)|(r)|(ts)")
High+Generate a random string of up to 10 alphanumeric characters.option::of(r"[a-zA-Z0-9]{1,10}")
MaxGenerate an arbitrary string.option::of(String::arbitrary())
labelTypeMin+No label typeNone
Low+Generate either FigureLabel or TableLabeloption::of(prop_oneof![Just(LabelType::FigureLabel), Just(LabelType::TableLabel)])
labelMin+No labelNone
Low+Generate a simple labeloption::of(r"[a-zA-Z0-9]+")
MaxGenerate an arbitrary stringoption::of(String::arbitrary())
captionMin+No captionNone
Low+Generate up to two arbitrary paragraphs.option::of(vec_paragraphs(2))

This documentation was generated from CodeChunk.yaml by docs_types.rs.

© 2026 Stencila