From de2297146757bd03039df330b435561e0cb01aa1 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Sun, 4 Jan 2026 07:21:34 -0500 Subject: [PATCH] Switch from JuliaFormatter to Runic.jl for code formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update CI workflow to use fredrikekre/runic-action@v1 - Remove .JuliaFormatter.toml configuration - Format all source files with Runic.jl 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .JuliaFormatter.toml | 3 --- .github/workflows/FormatCheck.yml | 19 +++++++++++++++++++ src/DimensionalPlotRecipes.jl | 18 ++++++++++-------- 3 files changed, 29 insertions(+), 11 deletions(-) delete mode 100644 .JuliaFormatter.toml create mode 100644 .github/workflows/FormatCheck.yml diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml deleted file mode 100644 index 3494a9f..0000000 --- a/.JuliaFormatter.toml +++ /dev/null @@ -1,3 +0,0 @@ -style = "sciml" -format_markdown = true -format_docstrings = true diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml new file mode 100644 index 0000000..6762c6f --- /dev/null +++ b/.github/workflows/FormatCheck.yml @@ -0,0 +1,19 @@ +name: format-check + +on: + push: + branches: + - 'master' + - 'main' + - 'release-' + tags: '*' + pull_request: + +jobs: + runic: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: fredrikekre/runic-action@v1 + with: + version: '1' diff --git a/src/DimensionalPlotRecipes.jl b/src/DimensionalPlotRecipes.jl index d7f1c75..57df725 100644 --- a/src/DimensionalPlotRecipes.jl +++ b/src/DimensionalPlotRecipes.jl @@ -6,30 +6,32 @@ using LinearAlgebra # Splits a complex matrix to its real and complex parts # Reals defaults solid, imaginary defaults dashed # Label defaults are changed to match the real-imaginary reference / indexing -@recipe function f(x::AbstractArray{T}, y::Array{Complex{T2}}; - transformation = :split3D) where {T <: Real, T2 <: Number} - if transformation==:split2D +@recipe function f( + x::AbstractArray{T}, y::Array{Complex{T2}}; + transformation = :split3D + ) where {T <: Real, T2 <: Number} + if transformation == :split2D A = real.(y) B = imag.(y) _y = [!iseven(i) ? A[:, i ÷ 2 + 1] : B[:, i ÷ 2] for i in 1:2size(A, 2)] linestyle --> reshape([!iseven(i) ? :solid : :dash for i in 1:2size(A, 2)], 1, 2size(A, 2)) label --> - reshape([!iseven(i) ? "Re(y$(i÷2+1))" : "Im(y$(i÷2))" for i in 1:2size(A, 2)], 1, 2size(A, 2)) + reshape([!iseven(i) ? "Re(y$(i ÷ 2 + 1))" : "Im(y$(i ÷ 2))" for i in 1:2size(A, 2)], 1, 2size(A, 2)) seriescolor --> - reshape([!iseven(i) ? i÷2+1 : i÷2 for i in 1:2size(A, 2)], 1, 2size(A, 2)) + reshape([!iseven(i) ? i ÷ 2 + 1 : i ÷ 2 for i in 1:2size(A, 2)], 1, 2size(A, 2)) retval = (x, _y) - elseif transformation==:split3D + elseif transformation == :split3D A = real.(y) B = imag.(y) ylabel --> "Re(y)" zlabel --> "Im(y)" retval = (x, A, B) - elseif transformation==:modulus + elseif transformation == :modulus _y = norm.(y) label --> reshape(["||y$(i)||" for i in 1:size(_y, 2)], 1, size(_y, 2)) retval = (x, _y) - elseif transformation==:modulus2 + elseif transformation == :modulus2 _y = abs2.(y) label --> reshape(["|y$(i)|^2" for i in 1:size(_y, 2)], 1, size(_y, 2)) retval = (x, _y)