Skip to content

Make calc_azimuth_east positive anti-clockwise, following KiteUtils 0.14 - #354

Draft
1-Bort-1 wants to merge 8 commits into
mainfrom
agent/353-move-to-kiteutils-0-14-and-document-calc
Draft

1-Bort-1 wants to merge 8 commits into
mainfrom
agent/353-move-to-kiteutils-0-14-and-document-calc

Conversation

@1-Bort-1

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

Copy link
Copy Markdown
Member

Depends-On: OpenSourceAWE/AtmosphericModels.jl#56

KiteUtils 0.14 turns the sign of its east azimuth around: it now grows anti-clockwise seen from above, like the north azimuth and the azimuth in the wind frame. This package's east azimuth is that function, so it flips with it. Nothing errors on the new version, so the docstring, a test and a changelog line are what tell a caller that the values are mirrored. A kite due north now reads +90° instead of -90°.

calc_azimuth_east(kps)   # kite due north: before -90°, after +90°

The branch is not ready to merge yet. KiteUtils 0.14 is registered, but the latest AtmosphericModels (0.3.12) and KitePodModels (0.4.2) only allow KiteUtils up to 0.13, so 0.14 cannot be installed here yet. Until then, the new test fails and the docstring describes a version the package cannot load. Once those are out, this branch gets the missing step in one commit: the KiteUtils bound moves to 0.14 only, in the package and in the docs, and both tracked manifests are re-resolved.

KiteUtils 0.13 will be dropped, not kept beside 0.14. The same function would otherwise return opposite signs depending on which version a user happened to resolve.

The parking example that plots the east azimuth needs no code change; its curve mirrors. KiteControllers has a copy of that example, which is for that repository.

Verification

  • Reproduced: azimuth_east of a kite due north is -π/2 on KiteUtils 0.13.3
  • test/test-azimuth.jl red on KiteUtils 0.13.3 (Evaluated: -90.00000000000003 ≈ 90.0, 303 passed, 1 failed); green on 0.14: not run yet, 0.14 cannot be installed
  • Local full suite (Julia 1.13, KiteUtils 0.13.3): FAIL at the new due-north test only (2 passed, 1 failed), every testset before it passes; expected until 0.14 resolves
  • GitHub CI (Julia 1, KiteUtils 0.13.3): FAIL at the new due-north test only (Evaluated: -90.00000000000003 ≈ 90.0; 3162 passed, 1 failed); docs build passes on 0.13.3, not run against 0.14
  • Up to date with main (v0.13.2); the changelog line sits under a new unreleased header, not in the v0.13.2 notes
  • REUSE lint clean (GitHub check); not run locally, reuse is not installed on this machine
  • Risk: a caller elsewhere in the ecosystem that reads this angle mirrors silently once it resolves 0.14.

Opened by 1-Bort-1, an AI agent working for @1-Bart-1.
Closes #353 · task KiteModels.jl-353

Rewrite the docstring, pin a kite due north at +90° in test-azimuth.jl,
note the sign change in the changelog and allow KiteUtils 0.14 in docs.

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

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

Copy link
Copy Markdown
Member 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: REQUEST CHANGES · 4 inline, 0 off the diff

Good

  • The new calc_azimuth_east docstring says the right thing for KiteUtils 0.14 (anti-clockwise, angle from the east axis), and it still reads as one statement rather than a correction of the old wording.
  • The new test is named after the behaviour it protects, reuses the existing new_model fixture in test-azimuth.jl, and pins the case named in the issue: a kite due north is at +90°.
  • The CHANGELOG entry is a compact BREAKING line under Unreleased and names the mirrored curve in examples_3d/parking_wind_dir.jl; rg shows that file is the only other caller of calc_azimuth_east in the repo.

Not good

  • test/test-azimuth.jl:118 — The root Project.toml still pins KiteUtils = "0.13", so this assertion fails on the only version the package can resolve (the agent's own log records 'Evaluated: -90.00000000000003 ≈ 90.0'). Merging this turns the test suite red.
  • src/KiteModels.jl:461 — Without the compat bump to 0.14 this docstring is wrong: on KiteUtils 0.13, calc_azimuth_east is still positive clockwise. Users would be told the opposite of what the function returns, and the bump has to land in the same PR as this text.
  • CHANGELOG.md:7 — 'which this version requires' is not true: nothing in the diff changes the package's KiteUtils compat. The entry describes a requirement that isn't there.
  • docs/Project.toml:16 — This widens the docs compat to 0.14 while the package being documented cannot load 0.14, which is the opposite of the plan's 'drop 0.13' and leaves the docs and package compat out of step.
  • There is no PR card, so it is not written down anywhere that 0.13 is being dropped, that the manifests still need re-resolving, or what the reviewer should wait for (KiteUtils 0.14.0 is still unregistered, General#172937).
  • docs/Project.toml gains 0.14 while the main package stays on 0.13 only, so the docs could resolve a KiteUtils version the package itself cannot load.
  • Neither Manifest-v1.12.toml.default nor Manifest-v1.13.toml.default is re-resolved, although the plan for #353 requires both.
  • The CHANGELOG line is long and has 'like calc_azimuth and calc_azimuth_north' in it, which is reasoning; the user-visible change is just the sign flip and the +90° example.

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

Comment thread test/test-azimuth.jl
find_steady_state!(s; upwind_dir=π)
@test pos_kite(s)[1] ≈ 0.0 atol=1e-6
@test pos_kite(s)[2] > 0.0
@test rad2deg(calc_azimuth_east(s)) ≈ 90.0 atol=1e-6

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

MAJOR: The root Project.toml still pins KiteUtils = "0.13", so this assertion fails on the only version the package can resolve (the agent's own log records 'Evaluated: -90.00000000000003 ≈ 90.0'). Merging this turns the test suite red.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. It stays red until KiteUtils 0.14 can resolve here (General#172937, AtmosphericModels.jl#56, and KitePodModels/WinchModels bounds). The compat bump lands in this PR, which stays draft until then; the test is not loosened.

Comment thread src/KiteModels.jl

Determine the azimuth_east angle of the kite in radian.
Positive clockwise when seen from above.
Determine the azimuth_east angle of the kite in radian: the angle of its horizontal position

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

MAJOR: Without the compat bump to 0.14 this docstring is wrong: on KiteUtils 0.13, calc_azimuth_east is still positive clockwise. Users would be told the opposite of what the function returns, and the bump has to land in the same PR as this text.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed. The bump to 0.14 lands in this PR, in the same commit as the manifests, before it leaves draft. The card now says so.

Comment thread CHANGELOG.md Resolved
Comment thread docs/Project.toml Resolved
@1-Bort-1 1-Bort-1 added agent:running Agent task state and removed agent:queued Agent task state labels Oct 22, 2026
@1-Bort-1

1-Bort-1 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member Author

Local full suite: FAIL (1 min, Julia 1.13.0, one cell of the matrix)

      KPS3, trim, azimuth -30.0°, upwind_dir 45.0°                       |   22           22   0.0s
      KPS4, trim, azimuth 30.0°, upwind_dir -90.0°                       |   22           22   0.1s
      KPS4, trim, azimuth 30.0°, upwind_dir 45.0°                        |   22           22   0.1s
      KPS4, trim, azimuth -30.0°, upwind_dir -90.0°                      |   22           22   0.1s
      KPS4, trim, azimuth -30.0°, upwind_dir 45.0°                       |   22           22   0.1s
      KPS3, init! at azimuth 30°                                         |    4            4   1.5s
      KPS4, init! at azimuth 30°                                         |    4            4   1.1s
      KPS3, turbulent wind at the turned kite position                   |    1            1   1.1s
      KPS3, azimuth 0° is unchanged                                      |    2            2   0.0s
      KPS4, azimuth 0° is unchanged                                      |    2            2   0.1s
      azimuth_east of a kite due north is +90°, anti-clockwise from east |    2     1      3   1.2s
RNG of the outermost testset: Random.Xoshiro(0x1a85fb02c07c8bfb, 0x61a22fb7cc6bd874, 0xf65e4b1ba59625f4, 0x57ff5f62929d94f4, 0x773f9d6663fde5c7)
ERROR: Package KiteModels errored during testing
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Types.jl:68
  [2] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:3148
  [3] test
    @ ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:3026 [inlined]
  [4] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@Kwargs{io::IOContext{IO}})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:586
  [5] kwcall(::@NamedTuple{io::IOContext{IO}}, ::typeof(Pkg.API.test), ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:562
  [6] test(pkgs::Vector{PackageSpec}; io::IOContext{IO}, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:172
  [7] test(pkgs::Vector{PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:161
  [8] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::PackageMode, subdir::Nothing, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:189
  [9] test()
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:178
 [10] top-level scope
    @ none:1
 [11] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [12] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:310
 [13] _start()
    @ Base ./client.jl:577

The docs [compat] for KiteUtils 0.14 moves with the package's own bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 changed the title Move to KiteUtils 0.14 and document calc_azimuth_east as anti-clockwise Make calc_azimuth_east positive anti-clockwise, following KiteUtils 0.14 Oct 22, 2026
@1-Bort-1 1-Bort-1 added agent:ci 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:queued Agent task state labels Oct 22, 2026
@1-Bort-1

1-Bort-1 commented Oct 22, 2026 •

Copy link
Copy Markdown
Member Author

CI: test / Julia 1 - ubuntu-latest - x64 - pull_request failed on 5bb43dce3.

https://github.com/OpenSourceAWE/KiteModels.jl/actions/runs/40171482022/job/121103036441

@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:running Agent task state agent:ci Agent task state and removed agent:ci Agent task state agent:queued Agent task state agent:running Agent task state labels Oct 22, 2026
@1-Bort-1 1-Bort-1 added agent:waiting-human Agent task state and removed agent:ci Agent task state labels Oct 23, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:waiting-human Agent task state and removed agent:waiting-human Agent task state agent:ci Agent task state labels Oct 23, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:waiting-human Agent task state and removed agent:waiting-human Agent task state agent:ci Agent task state labels Oct 25, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:queued Agent task state agent:running Agent task state and removed agent:waiting-human Agent task state agent:ci Agent task state agent:queued Agent task state labels Oct 29, 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 Oct 29, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:waiting-human Agent task state and removed agent:running Agent task state agent:ci Agent task state labels Oct 29, 2026

This branch has not been deployed

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

Labels

agent:waiting-human Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move to KiteUtils 0.14 and document calc_azimuth_east as anti-clockwise

1 participant