Skip to content

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

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

1-Bort-1 wants to merge 3 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 stay in ObjAdapter but now emit a deprecation warning pointing at SymbolicAWEModels, and are to be removed in the next breaking release. SymbolicAWEModels computes mesh mass properties with its own copies, so two copies of one inertia integral live in two packages; deprecating rather than deleting keeps this release non-breaking, as asked in review.

What changes for a caller

Nothing, apart from the warning. With --depwarn=yes (what Pkg.test and CI use) each call site warns once: `center_to_com!` is deprecated and will be removed in the next breaking release; SymbolicAWEModels computes mesh mass properties. With Julia's default --depwarn=no it is silent. The three docstrings say they are deprecated, calc_inertia_y_rotation gets the docstring it never had and joins the other two on private_functions.md. The changelog entry under ## Unreleased### Changed is a deprecation, not BREAKING:.

The message is built in one helper, depwarn_inertia(name), so the three functions cannot word it differently.

Who uses them

Nobody outside this repo. gh search code on OpenSourceAWE and 1-Bart-1, plus a shallow clone and grep of the repos where code search came back empty, found no import or call of VortexStepMethod's copies. SymbolicAWEModels (src/obj_adapter.jl:50, src/system_structure/rigid_body.jl:191) and StableAWEModels (rigid_body.jl:180) define their own, and SymbolicAWEModels takes only ObjAdapter.read_faces from here. BeyondTheSim examples/neuralfoil.jl:67 does using VortexStepMethod.ObjAdapter and never calls them. So the warning should reach nobody, and removal in the next breaking release should break nobody either.

Tests

The existing tests of the three functions stay and now wrap one call of each in @test_deprecated, so they assert the warning as well as the result. In test_kite_geometry.jl the "Interpolation Creation" testset also serialized an _info.bin of inertia tensor, COM and interpolants that nothing read; that block is gone, and with it Serialization from test/Project.toml. The .obj it writes stays, because "Alignment to principal frame" 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/: only their own testsets call them. They are unexported, and deleting them wants its own importer search; with the aim of keeping breaking changes down, they could be deprecated alongside these three in a follow-up.

Verification

  • Reproduced first: n/a, a deprecation. Red before: test_kite_geometry.jl under --depwarn=yes against main's obj_geometry.jl fails 3 × Log Test Failed … Log Pattern: (:warn, r"deprecated"i, Ignored(), :depwarn) (21 pass, 3 fail, 1 broken).
  • Green after, same run with this branch: 24 pass, 1 broken (the existing @test_skip), exit 0.
  • test/obj_adapter/test_obj_adapter.jl: 52/52 pass (juliaserver, test env, default depwarn)
  • Local full suite on e344c8e: PASS (7 min, Julia 1.12.7, one matrix cell, agent ci-local)
  • GitHub CI on e344c8e: 7/7 pass, Documentation included
  • Docs build: not run locally, the docs/ environment has no manifest; the CI Documentation job builds it
  • No merge conflict with current main @ 246237a, which now carries Give every untyped empty container its element type #338's typing of read_faces (git merge-tree)
  • REUSE lint: n/a, the repo does not use REUSE
  • Benchmark: n/a
  • Risk: a test suite run with --depwarn=error somewhere downstream would now error on these calls; the search above found no caller for that to hit.

Scope

+29 / −17 across 5 files against main: the helper, three depwarn_inertia calls, docstring lines, one private_functions.md line, the changelog entry, three @test_deprecated wrappers, and the dead _info.bin block with its Serialization dependency. Most open PRs also add to CHANGELOG.md, and #320, #340, #346, #351 and #352 to docs/src/private_functions.md; #350 edits test_obj_adapter.jl. 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 (9 min, Julia 1.12.7, 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:ci Agent task state 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.

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 and removed agent:running Agent task state agent:ci Agent task state labels Sep 16, 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