Skip to content

Delete ObjAdapter's copy of the mesh inertia integral; SymbolicAWEModels owns it - #325

Open
1-Bort-1 wants to merge 6 commits into
mainfrom
agent/324-bring-ramairkite-jl-onto-symbolicawemode
Open

1-Bort-1 wants to merge 6 commits into
mainfrom
agent/324-bring-ramairkite-jl-onto-symbolicawemode

Conversation

@1-Bort-1

@1-Bort-1 1-Bort-1 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

TL;DR

center_to_com!, calculate_inertia_tensor and calc_inertia_y_rotation are removed from ObjAdapter, with their export, their tests and their private_functions.md entries. SymbolicAWEModels computes mesh mass properties from its own copies of the same integral, so two packages held one piece of physics and nothing would ever have reported that they had drifted apart.

What changes for a caller

The three names no longer exist and are no longer exported; read_faces, which is all SymbolicAWEModels actually takes from ObjAdapter, is untouched. The changelog entry under ## Unreleased### Changed is BREAKING:.

An earlier round of this branch deprecated the three instead, on review; review then said the next release is breaking anyway, so that round is reverted and they go.

Who uses them

Nobody. The search was repeated on 2026-09-20, immediately before this push: gh search code for each of the three names across OpenSourceAWE and 1-Bart-1, then a shallow clone and rg of all 43 repositories in those two accounts, private ones included. No importer. SymbolicAWEModels (src/obj_adapter.jl:50, src/system_structure/rigid_body.jl:191) and StableAWEModels (src/system_structure/rigid_body.jl:180) define their own copies and call those; SymbolicAWEModels' only call into here is ObjAdapter.read_faces at src/obj_adapter.jl:75. BeyondTheSim examples/neuralfoil.jl:67 does a bare using VortexStepMethod.ObjAdapter, which would have pulled the three names into scope, and calls none of them.

Tests

Their testsets go with them: "Center of Mass Calculation", "Inertia Tensor Calculation" and "Alignment to principal frame" in test_kite_geometry.jl, and "center_to_com! rejects non-triangular faces" in test_obj_adapter.jl. The "Interpolation Creation" testset also serialized an _info.bin of inertia tensor, COM and interpolants that nothing ever read; that block is gone too, and with it Serialization from test/Project.toml and Interpolations from the test's imports — the file's last user of each. The .obj written there stays, because "OBJ File Reading" reads it back.

Found on the way, not changed here

  • find_circle_center_and_radius and create_interpolations, the other two ObjWing leftovers in obj_geometry.jl, have no caller in src/ or ext/ either: only their own testsets call them. They are unexported, so deleting them is not breaking, but it wants its own importer search and belongs in its own diff.

Verification

Scope

+6 / −214 across 7 files against main, all of it deletion apart from the three-line changelog entry. #350 also edits test_obj_adapter.jl, and #320 and #346 also edit docs/src/private_functions.md; every open PR touches CHANGELOG.md. Whichever merges later may need a small textual merge.

Closes #324 · task VortexStepMethod.jl-324

…dels

center_to_com!, calculate_inertia_tensor and calc_inertia_y_rotation are
removed from ObjAdapter with their export, tests and docs entry. read_faces
stays. Also drops the test scaffolding only they used: the serialized
_info.bin, the .obj the alignment test read back, and the Serialization test
dependency.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:running Agent task state agent:ci Agent task state and removed agent:running Agent task state labels Sep 16, 2026

@1-Bort-1 1-Bort-1 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (advisory)

Verdict: APPROVE · 0 inline, 0 off the diff

Good

  • The diff matches the card: all three functions are removed along with their export, tests and docs entry, and read_faces stays. The commit stat is +11/−213 across 7 files, as the card says.
  • No uses remain: grepping src/, test/, docs/ and *.toml finds no reference to center_to_com!, calculate_inertia_tensor or calc_inertia_y_rotation. Only the untracked .agent/ notes mention them.
  • using NonlinearSolve is still needed because find_circle_center_and_radius calls NewtonRaphson at obj_geometry.jl:89. LinearAlgebra is still needed for norm at obj_geometry.jl:211 and in obj_slice.jl.
  • It is safe to drop Serialization from test/Project.toml: no test uses serialize now, and the root Project.toml:31 still lists it, so the manifest does not change.
  • The cleanup in the "Interpolation Creation" testset keeps behaviour: the faces, .obj write and _info.bin it removes are not used later in the testset. The read_aero_matrix and create_interpolations assertions are unchanged.
  • No test was weakened: the only removed assertions tested the deleted functions, and the existing @test_skip is untouched.
  • This is removal the rubric asks for: §2 wants one source per equation and nothing kept in case, and the other copy lives in SymbolicAWEModels, which takes only read_faces from here.
  • The BREAKING: changelog entry goes under a new ## Unreleased, and the version in Project.toml is not bumped.

Not good

  • The changelog line says the names are no longer exported and then "they are gone", which says the same thing twice. "ObjAdapter drops center_to_com!, …" would be enough.
  • The docs build was not run locally, so the CI Documentation job is the only check. The risk is low: only two @docs entries were removed, and calc_inertia_y_rotation had no docstring or docs entry.
  • test_obj_path is now written and read only by the "OBJ File Reading" testset. It could move inside that testset, but that is optional.

claude, rubric CLEAN_CODE.md. A different lab from the implementer
on purpose: a reviewer sharing its blind spots would not flag its mistakes.

@1-Bort-1

1-Bort-1 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Local full suite: PASS (5 min, Julia 1.13.0, one cell of the matrix)

@codecov

codecov Bot commented Sep 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@1-Bort-1 1-Bort-1 added agent:review Agent task state and removed agent:ci Agent task state labels Sep 16, 2026
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:review Agent task state agent:queued Agent task state labels Sep 16, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:running Agent task state agent:queued Agent task state labels Sep 16, 2026
@1-Bort-1 1-Bort-1 mentioned this pull request Sep 16, 2026
3 tasks
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:running Agent task state agent:queued Agent task state labels Sep 16, 2026
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:running Agent task state agent:queued Agent task state labels Sep 16, 2026
@1-Bort-1 1-Bort-1 added agent:review Agent task state and removed agent:ci Agent task state labels Sep 16, 2026
Comment thread CHANGELOG.md Outdated

### Changed

- BREAKING: `ObjAdapter` no longer exports `center_to_com!`, `calculate_inertia_tensor`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the functions, mark them deprecated, and rm them in the next breaking release, because otherwise we have too many breaking changes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in e344c8e: the three functions are back with their export, tests and docs, each emits a deprecation warning, and the changelog entry is a deprecation instead of BREAKING.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok fine we are going breaking already anyways. Just mark them breaking and not backwards compatible.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So remove them anyways.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 8880556: the changelog entry is BREAKING again.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed in 8880556, reverting the deprecation round.

Per review, center_to_com!, calculate_inertia_tensor and
calc_inertia_y_rotation come back with their export, tests and docs entry,
and each now emits a deprecation warning naming SymbolicAWEModels. Their
tests assert the warning with @test_deprecated. The changelog entry is a
deprecation rather than BREAKING; removal waits for the next breaking release.
The dead _info.bin serialization in test_kite_geometry.jl and the
Serialization test dependency stay removed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state and removed agent:running Agent task state agent:queued Agent task state labels Sep 16, 2026
@1-Bort-1 1-Bort-1 changed the title Delete ObjAdapter's copy of the mesh inertia integral; SymbolicAWEModels owns it Deprecate ObjAdapter's copy of the mesh inertia integral; SymbolicAWEModels owns it Sep 16, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:review Agent task state agent:queued Agent task state agent:running Agent task state and removed agent:running Agent task state agent:ci Agent task state agent:review Agent task state agent:queued Agent task state labels Sep 16, 2026
1-Bort-1 and others added 3 commits September 20, 2026 20:53
Reverts e344c8e. Per review the next release is breaking anyway, so
center_to_com!, calculate_inertia_tensor and calc_inertia_y_rotation go
rather than deprecate: the export, their tests and their private_functions.md
lines are removed with them, and the changelog entry is BREAKING again.
SymbolicAWEModels owns the mesh inertia integral and uses read_faces, which
stays.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The file's only Interpolations names went with the inertia testsets; `I(3)` is
LinearAlgebra's. Verified in a fresh process, not the warm session where an
earlier include had leaked the names into Main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 changed the title Deprecate ObjAdapter's copy of the mesh inertia integral; SymbolicAWEModels owns it Delete ObjAdapter's copy of the mesh inertia integral; SymbolicAWEModels owns it Sep 20, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:review Agent task state and removed agent:running Agent task state agent:ci Agent task state labels Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:review Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bring RamAirKite.jl onto SymbolicAWEModels v0.18: Delete the duplicated inertia integral from VortexStepMethod

2 participants