Skip to content

Find a block's rows by name, and load an authoring document built in code or unplaced - #68

Merged
1-Bart-1 merged 8 commits into
mainfrom
agent/SymbolicAWEModels.jl-421
Oct 20, 2026
Merged

1-Bart-1 merged 8 commits into
mainfrom
agent/SymbolicAWEModels.jl-421

Conversation

@1-Bort-1

@1-Bort-1 1-Bort-1 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

A tool reading a definition mostly knows its components by name: the kite point, the main tether, the wing. Until now a block was a plain vector, so finding one meant a search over its rows each time. Each block now also takes a row's name, and load_authoring returns its transforms the same way. Lookup by position works as before.

kite = system.points[findfirst(point -> point.name == "kite", system.points)]    # before
kite = system.points[:kite]    # after, or system.points["kite"]

load_authoring also takes an authoring document already parsed into a dictionary, beside a path to one. SymbolicAWEModels builds systems in code from rows, and it can now hand them to this loader. Tether expansion, wing mass, the design pose and placement then have one implementation, this one, rather than a second in SymbolicAWEModels.

load_authoring(...; place=false) returns the definition in its design pose: authored positions, tethers at their design length, no transform applied. SymbolicAWEModels builds its wings' aerodynamic meshes in the authored frame and places the structure itself, as it did before reading YAML through this loader. Built from the placed definition, the mesh and the structure only line up to rounding, and a mirror-symmetric kite then splits its panels between stations unevenly.

All three are additions: a block is still an AbstractVector of its rows and compares equal to a vector of the same rows, and the path method is unchanged. A lookup by a name no row has throws a KeyError.

OpenSourceAWE/SymbolicAWEModels.jl#421 builds on this: its tests read sys.points[:name] on almost 400 lines, and its in-code builder needs the dictionary method. It needs a release of this after v0.3.1.

Verification

  • Reproduced first: n/a, new feature
  • New testsets "a block's rows are found by their name as well as their position", "a parsed authoring document loads as its file does" and "place=false leaves every authored point where its YAML puts it" (the dictionary load writes the same document as the file and gives the same transform members); they cannot pass on main, where Rows and the dictionary method do not exist
  • Full test suite: Authoring 653, Log 2, Structure 165, Transforms 25, all pass (juliaserver), after merging latest main
  • Docs build clean (docs/make.jl)
  • _structure.jl regenerated by src/build.jl, no hand edits
  • REUSE lint: not run, reuse is not installed on this machine
  • Risk: a tool that relied on a block being exactly a Vector, e.g. by dispatching on Vector{Point}, no longer matches; AbstractVector methods are unaffected.

Opened by 1-Bort-1, an AI agent working for @1-Bart-1.
From OpenSourceAWE/SymbolicAWEModels.jl#421 · task SymbolicAWEModels.jl-421

Each table block of a SystemDefinition is Rows, an AbstractVector that
also takes a row's name: system.points[:kite]. load_authoring takes a
parsed authoring document as well as a path, and returns its transforms
as Rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bart-1

Copy link
Copy Markdown
Member

Similar to NamedCollection in SymAWE right? And the name is a symbol for efficiency?

@1-Bart-1

Copy link
Copy Markdown
Member

Also merge in latest main

# Conflicts:
#	CHANGELOG.md
#	test/test-structure.jl
@1-Bort-1

Copy link
Copy Markdown
Member Author

Same role as NamedCollection, yes: index by position or by name. But it keeps no name index. A row's name stays the String awesIO gives it, and a Symbol or String is matched against it by a linear scan. Rows are mutable and can be pushed, deleted or renamed, so a cached Dict would go stale, and lookup by name is a setup-time call (SAM's hot paths use indices). If you want NamedCollection's Dict{Symbol,Int}, it needs rebuilding on every push!/insert!/deleteat! and on a rename; say so and I'll add it.

@1-Bort-1

Copy link
Copy Markdown
Member Author

Merged latest main in a4de2a8. The two conflicts, CHANGELOG and test-structure, were independent additions, so I kept both. KiteGeometry suite 841/841.

@codecov-commenter

codecov-commenter commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.48148% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/rows.jl 63.15% 7 Missing ⚠️
src/build.jl 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

1-Bort-1 and others added 3 commits October 19, 2026 17:52
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 changed the title Find a block's rows by name, and load an authoring document built in code Find a block's rows by name, and load an authoring document built in code or unplaced Oct 19, 2026
1-Bort-1 and others added 3 commits October 20, 2026 12:01
A row's name, a transform's name and a reference by name (NameRef) are
Symbols. Documents and keyword constructors still take strings; writing
a document writes strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bart-1

Copy link
Copy Markdown
Member

Make sure duplicate names error correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants