Repository navigation
Build Metadata by keyword, with defaults for the fields a writer does not choose - #58
Merged
Merged
Conversation
A writer building a SystemDefinition from a model had to pass all seven Metadata fields positionally and read the non-public AWESIO_VERSION. The keyword constructor names each field and defaults the four a writer does not choose. The authoring path and the tests use it. Refs #49 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 17, 2026
1-Bort-1
added a commit
to OpenSourceAWE/KiteModels.jl
that referenced
this pull request
Oct 19, 2026
OpenSourceAWE/KiteGeometry.jl#58 conflicted with KiteGeometry main after v0.3.0; its branch now merges main (ea27241). Point [sources] at that commit and raise compat to 0.3. The manifests move only the KiteGeometry entry and project_hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1-Bort-1
added a commit
to OpenSourceAWE/KiteModels.jl
that referenced
this pull request
Oct 22, 2026
OpenSourceAWE/KiteGeometry.jl#58 (the keyword Metadata constructor) is released in 0.3.1, so the [sources] pin to ea27241 goes. The bound is 0.3.2: that release makes row names Symbols, which the test now asserts. Both default manifests move only the KiteGeometry entry and project_hash; the 1.13 one keeps main's Julia 1.13.2 standard-library entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A package that builds a system definition from its own model has to fill the definition's metadata. Until now that meant passing all seven fields in order, including two empty strings, the schema file name and the awesIO version. The version was read from a constant this package does not export. A reviewer of such a call cannot tell which string is which. Now the metadata can be built from a name and a point count, and every other field can be given by name. The description and note default to empty, the version to the one this package reads, the schema to the structure schema, and the connectivity checksum to empty, which stands for one not yet computed.
The package's own authoring path and its tests now use it. Nothing that already calls the positional form changes.
It does not compute the connectivity checksum for the caller. A writer that wants one still builds the definition, takes its checksum, and passes it in by name. That second half of #49 is left open.
OpenSourceAWE/KiteModels.jl#327 uses this to build the metadata of the KPS3 and KPS4 definitions. It needs a release carrying this change, so this merges and is released first, as v0.2.1.
Verification
MethodError: no method matching Metadata(; name::String, n_points::Int64), from Build a KiteGeometry SystemDefinition from KPS3 and KPS4 and carry it in the log KiteModels.jl#327's definition test.test/test-structure.jlasserts the keyword form equals the positional one with the defaults. Suite on this branch, on top of v0.2.0: Authoring 431, Log 2, Structure 149, all pass (Julia 1.13.0,testproject).docs/make.jl; the only warnings are the existing size warning on the structure page and the skipped deploy).Refs #49
🤖 Generated with Claude Code