Repository navigation
Accept KiteUtils 0.13, support Julia 1.12/1.13 only, test every line of src/ - #26
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26 +/- ##
============================================
+ Coverage 57.53% 100.00% +42.46%
============================================
Files 3 3
Lines 73 90 +17
============================================
+ Hits 42 90 +48
+ Misses 31 0 -31 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
KiteUtils only supports julia 1.12 and 1.13, so this PR should also update to julia 1.12 and 13, and change the CI to only test these julia versions |
|
And improve the code coverage |
julia compat 1.12, 1.13; CI matrix 1.12 and 1.13; bin/install accepts those two and drops the 1.11 sub-project manifest branch; Manifest-v1.13.toml.default (seeded from 1.12's, resolved under 1.13.0) replaces Manifest-v1.11.toml.default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TorqueControlledMachine, calc_set_torque and smooth_sign had no tests; AsyncMachine's brake hysteresis, downward rate limit and above-synchronous-speed branch were never run. 43 -> 90 of 90 lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Done in 1-Bort-1/WinchModels.jl@6ddf251: julia compat "1.12, 1.13", CI matrix 1.12 and 1.13 only, bin/install accepts those two, Manifest-v1.13.toml.default replaces the 1.11 one. Pkg.test() passes on 1.12.7 and 1.13.0. |
|
Done in 1-Bort-1/WinchModels.jl@e058ea7: 9 new testsets, line coverage of src/ 43/90 -> 90/90. TorqueControlledMachine and calc_set_torque had no tests before; each new testset fails under a one-line mutation of the code it covers. |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Address the compatibility bounds, regenerate the Julia 1.12 manifest, fix test settings resolution, and update the stale documentation reference.
Review effort: Lite
Findings: None
What changed in this PR
Updates WinchModels for KiteUtils 0.13 and Julia 1.12/1.13, while expanding behavioral test coverage.
Changes:
- Updates compatibility, CI, installer, documentation, and manifests.
- Replaces the Julia 1.11 manifest with a Julia 1.13 manifest.
- Adds tests for torque control, braking, rate limiting, and field weakening.
| File | Summary |
|---|---|
test/runtests.jl |
Adds comprehensive model and controller tests; settings path should explicitly use repository data. |
README.md |
Updates supported Julia versions. |
Project.toml |
Updates compatibility; Julia bounds should use tilde ranges, and the 1.12 manifest should be regenerated. |
Manifest-v1.13.toml.default |
Adds the Julia 1.13 dependency manifest. |
Manifest-v1.11.toml.default |
Removes the obsolete Julia 1.11 manifest. |
CLAUDE.md |
Updates guidance, but a later compatibility reference remains stale. |
CHANGELOG.md |
Documents the compatibility and testing changes. |
bin/install |
Restricts installation to Julia 1.12/1.13. |
.gitignore |
Updates ignored manifest names. |
.github/workflows/CI.yml |
Updates the CI version matrix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
TL;DR
WinchModels now accepts KiteUtils 0.13 and supports exactly the Julia versions KiteUtils does, 1.12 and 1.13. Without the compat bump nothing that depends on WinchModels can install KiteUtils 0.13 — KiteModels (OpenSourceAWE/KiteModels.jl#321), and through it KiteViewers (OpenSourceAWE/KiteViewers.jl#56).
KiteUtils 0.13 changed reference frames and
SysState. WinchModels uses neither: it reads only winch fields ofSettings(drum_radius,gear_ratio,f_coulomb,c_vf,sample_freq,max_acc,max_force,inertia_total,p_speed,i_speed), and 0.13 leaves those alone.Julia 1.12 and 1.13
juliacompat"1.11, 1.12"→"1.12, 1.13".1.11,1,pre→1.12,1.13; the Windows and macOS jobs pin1.13instead of1.bin/installaccepts 1.12 and 1.13. The branch that seeded separateexamples/andtest/manifests existed only for 1.11, which has no workspaces, so it goes.Manifest-v1.11.toml.defaultgoes;Manifest-v1.13.toml.defaultis new, seeded from the 1.12 one and resolved under 1.13.0. That resolve moved only stdlibs and their bundled JLLs (LinearAlgebra,Pkg,SHA,LibCURL,OpenBLAS_jll, …); every registered package kept its 1.12 version..gitignoreswaps the 1.11 manifests forManifest-v1.13.toml.The KiteUtils compat still lists 0.10–0.12, which also resolve on 1.12/1.13; narrowing it was not asked for.
CI.ymlstill carriesfail-fast: false; I left it, as removing it is a separate cleanup.Coverage
Before this PR the tests ran 43 of the 90 lines Julia counts in
src/.TorqueControlledMachine,calc_set_torqueandWinchSpeedControllernever ran at all. InAsyncMachinethe brake hysteresis, the downward rate limit and the above-synchronous-speed branch were never reached. Nine new testsets bring it to 90/90. Each one asserts a property rather than a recorded number:r/n·τ/Jand(r/n)²·F/J;max_acc/sample_freqin both directions;0.9·v_minand1.1·v_min;ω_sn²/ω_sync²;calc_set_torqueopposes the tether force when on the set speed.To check that they bite, I ran six single-line mutations of
src/(listed under Verification). Each one fails the testset written for it. New tests build their ownSettings("system.yaml")instead of usingdeepcopy. The existing testsets are unchanged.Order: this one first. OpenSourceAWE/KiteViewers.jl#56 cannot leave draft until a registered WinchModels release accepts 0.13, and KiteModels needs one too.
Verification
Pkg.test()from the tracked.defaults (KiteUtils 0.12.0): Julia 1.12.7 and 1.13.0 both exit 0,calc_force3/3,WinchModels.jl15 pass + 3 broken. The 3 broken are the@test_brokenlines already onmain(test/runtests.jl:44-46).test/runtests.jlagainst KiteUtils 0.13.0 on Julia 1.12.7, this checkoutdev'd: same counts.Pkg.test(coverage=true), 1.12.7):src/43/90 → 90/90 lines; the 9 new testsets pass on 1.12.7 and 1.13.0.omega_sync^2→omega_sn^2(async), downward rate limit removed (async and torque),set_torque*K→*2K,0.0*set_force→1.0*set_force, hysteresis1.1·v_min→0.9·v_min../bin/installon Julia 1.13.0: exit 0 (it failed before withJulia 1.13 is not supported).Scope
test/runtests.jl+103 (tests only, nosrc/change);Project.toml,CI.yml,bin/install(−47 lines),.gitignore, README, CLAUDE.md, CHANGELOG, and the manifest swap (Manifest-v1.11.toml.defaultout,Manifest-v1.13.toml.defaultin).Opened by
1-Bort-1, an AI agent working for @1-Bart-1.From OpenSourceAWE/KiteViewers.jl#54 · task
KiteViewers.jl-54