Repository navigation
Prepare node edits for growing columnar trees - #115
Merged
Merged
Conversation
8 of 10 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on #114. It lets a growing simulation prepare edits against the column types of its existing tree. The plan borrows that tree's attribute store. Node count, organ names and attribute values can change as the simulation runs.
The optional named tuple on insertion contains MTG attributes. XPalm can keep its initial ages, thermal time and other simulation variables in PSE's
initial_status. The public preparedattributeoverload reads optional tree attributes. Removing a newborn uses the ordinary deletion rules, including promotion and relinking of children. Column types for an insertion are checked before the node becomes visible. The ordinary and prepared methods share their storage and topology operations.Use
attribute_type(plant, :kind)to read the union of the declared column types across organ symbols. This includes declarations for organs that have yet to grow. For example, if a flower inherits akindvalue of a new type, declare the flower column before preparing the simulation. Readback on trees with several column types also preserves explicitly storednothingvalues.The complete local MTG suite passed 6,851 assertions on Julia 1.13.3. Coverage includes attribute-free insertion, absent attributes and explicitly stored
nothing, foreign trees, duplicate IDs, incompatible column types and deletion with an existing child, numeric conversion and preparation after declaring a new column.A separate application built with JuliaC 0.3.12 in safe mode on Julia 1.13.3 used revision
bcc58a863and a real XPalm tree. The executable ran twice. Each time it inserted a leaf and a reproductive organ with empty MTG attributes, attached a child, read an absent attribute and checked child promotion, links and node IDs after removal. This covers the graph operations used during growth. Full plant simulation is tracked in PSE #247.At
b3b39f5d3, the local documentation built and the PSE integration passed 121 assertions. A stock JuliaC safe executable exercised mixed column types and organ creation twice. All 107 tracked files of this revision matched the sources used in that qualification.