From 7b8d3c9aaddd170b79ba66db831574b80b22976f Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 1 Nov 2024 12:50:51 +0100 Subject: [PATCH 01/10] add codespell action --- .github/workflows/codespell.yml | 15 +++++++++++++++ .github/workflows/enforce_news.yml | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000000..173110e137c --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,15 @@ +name: Run codespell on source code + +on: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + codepsell: + uses: codespell-project/actions-codespell@v2 + with: + skip: '*.js,*.vert,*.ai,*.frag,*.geom' + only_warn: 1 diff --git a/.github/workflows/enforce_news.yml b/.github/workflows/enforce_news.yml index ada4270ad77..988e7f3c01d 100644 --- a/.github/workflows/enforce_news.yml +++ b/.github/workflows/enforce_news.yml @@ -1,4 +1,4 @@ -name: "Enforce changelog" +name: Enforce changelog on: pull_request: types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] From 1dbbce842635709c1990e30edfb117085cd8e49d Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 1 Nov 2024 12:57:12 +0100 Subject: [PATCH 02/10] correct yml --- .github/workflows/codespell.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 173110e137c..0ff3a1494e0 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -9,7 +9,8 @@ concurrency: jobs: codepsell: - uses: codespell-project/actions-codespell@v2 - with: - skip: '*.js,*.vert,*.ai,*.frag,*.geom' - only_warn: 1 + steps: + - uses: codespell-project/actions-codespell@v2 + with: + skip: '*.js,*.vert,*.ai,*.frag,*.geom' + only_warn: 1 From 46f550793ef00f9da2f3fc2ff1a831344d2bf64f Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 1 Nov 2024 12:59:04 +0100 Subject: [PATCH 03/10] upd --- .github/workflows/codespell.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 0ff3a1494e0..3b1df736a7f 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -10,6 +10,7 @@ concurrency: jobs: codepsell: steps: + - uses: actions/checkout@v4 - uses: codespell-project/actions-codespell@v2 with: skip: '*.js,*.vert,*.ai,*.frag,*.geom' From 62b738fbb72b3b15adfaffbcf3445702a4f1a2f1 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 1 Nov 2024 13:02:21 +0100 Subject: [PATCH 04/10] upd --- .github/workflows/codespell.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 3b1df736a7f..26a1d0d91ba 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -9,6 +9,7 @@ concurrency: jobs: codepsell: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: codespell-project/actions-codespell@v2 From 4330300303c742fce9b402f382d265c25893b0e6 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 1 Nov 2024 13:04:33 +0100 Subject: [PATCH 05/10] simplify --- .github/workflows/codespell.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 26a1d0d91ba..14a6723ca94 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -1,7 +1,6 @@ name: Run codespell on source code -on: - pull_request: +on: [pull_request] concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} From bc23028508002af96724c3c848a798db6bb8ebb7 Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 1 Nov 2024 13:18:19 +0100 Subject: [PATCH 06/10] update --- .github/workflows/codespell.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 14a6723ca94..69fee7d70ae 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -1,4 +1,4 @@ -name: Run codespell on source code +name: Run codespell on source files on: [pull_request] @@ -7,7 +7,7 @@ concurrency: cancel-in-progress: true jobs: - codepsell: + check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From d9cc1da6ffcd2ebfb9d25c49402b8f43d40cfc7f Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 1 Nov 2024 13:39:59 +0100 Subject: [PATCH 07/10] fix spelling take 2 --- .github/workflows/codespell.yml | 1 + CHANGELOG.md | 4 ++-- CairoMakie/src/utils.jl | 2 +- GLMakie/src/screen.jl | 4 ++-- ReferenceTests/src/tests/generic_components.jl | 2 +- ReferenceTests/src/tests/updating.jl | 2 +- WGLMakie/src/display.jl | 2 +- docs/src/explanations/specapi.md | 4 ++-- docs/src/reference/plots/datashader.md | 2 +- metrics/ttfp/run-benchmark.jl | 4 ++-- src/colorsampler.jl | 2 +- src/makielayout/lineaxis.jl | 4 ++-- src/specapi.jl | 18 +++++++++--------- test/specapi.jl | 4 ++-- 14 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 69fee7d70ae..8e38c5e1fe3 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -13,5 +13,6 @@ jobs: - uses: actions/checkout@v4 - uses: codespell-project/actions-codespell@v2 with: + ignore_words_list: indexin,Heros skip: '*.js,*.vert,*.ai,*.frag,*.geom' only_warn: 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index a3e4de0309d..a03440b2fac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,7 +29,7 @@ ## [0.21.13] - 2024-10-07 -- Optimize SpecApi, re-use Blocks better and add API to access the created block objects [#4354](https://github.com/MakieOrg/Makie.jl/pull/4354). +- Optimize SpecApi, reuse Blocks better and add API to access the created block objects [#4354](https://github.com/MakieOrg/Makie.jl/pull/4354). - Fixed `merge(attr1, attr2)` modifying nested attributes in `attr1` [#4416](https://github.com/MakieOrg/Makie.jl/pull/4416) - Fixed issue with CairoMakie rendering scene backgrounds at the wrong position [#4425](https://github.com/MakieOrg/Makie.jl/pull/4425) - Fixed incorrect inverse transformation in `position_on_plot` for lines, causing incorrect tooltip placement in DataInspector [#4402](https://github.com/MakieOrg/Makie.jl/pull/4402) @@ -243,7 +243,7 @@ ## [0.20.5] - 2024-01-25 -- Use plot plot instead of scene transform functions in CairoMakie, fixing missplaced h/vspan. [#3552](https://github.com/MakieOrg/Makie.jl/pull/3552) +- Use plot plot instead of scene transform functions in CairoMakie, fixing misplaced h/vspan. [#3552](https://github.com/MakieOrg/Makie.jl/pull/3552) - Fix error printing on shader error [#3530](https://github.com/MakieOrg/Makie.jl/pull/3530). - Update pagefind to 1.0.4 for better headline search [#3534](https://github.com/MakieOrg/Makie.jl/pull/3534). - Remove unnecessary deps, e.g. Setfield [3546](https://github.com/MakieOrg/Makie.jl/pull/3546). diff --git a/CairoMakie/src/utils.jl b/CairoMakie/src/utils.jl index fcf49b1d2ad..6e0f064bd92 100644 --- a/CairoMakie/src/utils.jl +++ b/CairoMakie/src/utils.jl @@ -484,7 +484,7 @@ to_uint32_color(c) = reinterpret(UInt32, convert(ARGB32, premultiplied_rgba(c))) # handle patterns function Cairo.CairoPattern(color::Makie.AbstractPattern) - # the Cairo y-coordinate are fliped + # the Cairo y-coordinate are flipped bitmappattern = reverse!(ARGB32.(Makie.to_image(color)); dims=2) cairoimage = Cairo.CairoImageSurface(bitmappattern) cairopattern = Cairo.CairoPattern(cairoimage) diff --git a/GLMakie/src/screen.jl b/GLMakie/src/screen.jl index 31bd584a089..bfb5ae3ede2 100644 --- a/GLMakie/src/screen.jl +++ b/GLMakie/src/screen.jl @@ -346,7 +346,7 @@ function singleton_screen(debugging::Bool) close(screen; reuse=false) else @debug("new singleton screen") - # reuse=false, because we "manually" re-use the singleton screen! + # reuse=false, because we "manually" reuse the singleton screen! screen = empty_screen(debugging; reuse=false) push!(SINGLETON_SCREEN, screen) end @@ -656,7 +656,7 @@ end close(screen::Screen; reuse=true) Closes screen and empties it. -Doesn't destroy the screen and instead frees it to be re-used again, if `reuse=true`. +Doesn't destroy the screen and instead frees it to be reused again, if `reuse=true`. """ function Base.close(screen::Screen; reuse=true) @debug("Close screen!") diff --git a/ReferenceTests/src/tests/generic_components.jl b/ReferenceTests/src/tests/generic_components.jl index d7aa43a6f29..8edd4c344ae 100644 --- a/ReferenceTests/src/tests/generic_components.jl +++ b/ReferenceTests/src/tests/generic_components.jl @@ -390,7 +390,7 @@ end #= - For Verfication + For Verification Note that the text only marks the index in the picking list. The position that is closest (that pick_sorted used) is somewhere else in the marked element. Check scene2 to see the pickable regions if unsure diff --git a/ReferenceTests/src/tests/updating.jl b/ReferenceTests/src/tests/updating.jl index b80a3b2ef12..16a0a125c06 100644 --- a/ReferenceTests/src/tests/updating.jl +++ b/ReferenceTests/src/tests/updating.jl @@ -97,7 +97,7 @@ end save(path, vso) compare_videos(reference, path, dir) end - # We re-use ramstepper, to add our array of frames to the reference image comparison + # We reuse ramstepper, to add our array of frames to the reference image comparison return Makie.RamStepper(fig, Makie.current_backend().Screen(fig.scene), reference, :png) end end diff --git a/WGLMakie/src/display.jl b/WGLMakie/src/display.jl index 16ebcb93588..ffb0cdf1556 100644 --- a/WGLMakie/src/display.jl +++ b/WGLMakie/src/display.jl @@ -77,7 +77,7 @@ end function render_with_init(screen::Screen, session::Session, scene::Scene) # Reference to three object which gets set once we serve this to a browser - # Make sure it's a new Channel, since we may re-use the screen. + # Make sure it's a new Channel, since we may reuse the screen. screen.plot_initialized = Channel{Any}(1) screen.session = session Makie.push_screen!(scene, screen) diff --git a/docs/src/explanations/specapi.md b/docs/src/explanations/specapi.md index 11c8d8ba232..071ee33a473 100644 --- a/docs/src/explanations/specapi.md +++ b/docs/src/explanations/specapi.md @@ -325,7 +325,7 @@ ax.then() do actual_axis_object end end ``` -Note, that the callback must be pure, since the objects will get re-used and the callback will be called again. +Note, that the callback must be pure, since the objects will get reused and the callback will be called again. To allow `on` or `onany`, one can return an array of `ObserverFunctions` or single one as in the above example. ```julia ax.then() do ax @@ -334,7 +334,7 @@ ax.then() do ax obs_array = onany(f3, some_obs1, some_obs2) return [obs1, obs2, obs_array...] end -This allows the SpecApi to clean up the callbacks on re-use. +This allows the SpecApi to clean up the callbacks on reuse. Note that things like `hidedecorations!(axis)` is not yet supported, since we will need some better book keeping of what got mutated by that call. One of the few functions that's already supported is `linkaxes!`: diff --git a/docs/src/reference/plots/datashader.md b/docs/src/reference/plots/datashader.md index f000f369a58..9c996665714 100644 --- a/docs/src/reference/plots/datashader.md +++ b/docs/src/reference/plots/datashader.md @@ -214,7 +214,7 @@ hidedecorations!(ax) fig ``` -We can also re-use the previous NYC example for a categorical plot: +We can also reuse the previous NYC example for a categorical plot: ```julia @time begin f = Figure(figure_padding=0, size=(1200, 600)) diff --git a/metrics/ttfp/run-benchmark.jl b/metrics/ttfp/run-benchmark.jl index c36efce30d1..161ea127985 100644 --- a/metrics/ttfp/run-benchmark.jl +++ b/metrics/ttfp/run-benchmark.jl @@ -1,6 +1,6 @@ #= TODOs 1) Use one GH-Action job in the end to merge all results and comment in one go (instead of merging with existing comment) -2) Improve analysis of benchmark resutls to account for the variance in the benchmarks. +2) Improve analysis of benchmark results to account for the variance in the benchmarks. 3) Upload raw benchmark data as artifacts to e.g. create plots from It =# @@ -43,7 +43,7 @@ end function make_project_folder(name) result = "$name-benchmark.json" - isfile(result) && rm(result) # remove old benchmark resutls + isfile(result) && rm(result) # remove old benchmark results project = joinpath(@__DIR__, "benchmark-projects", name) # It seems, that between julia versions, the manifest must be deleted to not get problems isdir(project) && rm(project; force=true, recursive=true) diff --git a/src/colorsampler.jl b/src/colorsampler.jl index f304e259c80..fecdd9a4560 100644 --- a/src/colorsampler.jl +++ b/src/colorsampler.jl @@ -334,7 +334,7 @@ function ColorMapping( T = _array_value_type(color) color_tight = Observable{T}(color) # We need to copy, to check for changes - # Since users may re-use the array when pushing updates + # Since users may reuse the array when pushing updates last_colors = copy(color) on(colors_obs) do new_colors if new_colors !== last_colors diff --git a/src/makielayout/lineaxis.jl b/src/makielayout/lineaxis.jl index 853c0d23408..e18491e0caa 100644 --- a/src/makielayout/lineaxis.jl +++ b/src/makielayout/lineaxis.jl @@ -153,7 +153,7 @@ function update_ticklabel_node( else Point2f(flipped ? ticklabelgap : -ticklabelgap, 0f0) end - # re-use already allocated array + # reuse already allocated array result = ticklabel_annotation_obs[] empty!(result) for i in 1:min(length(tickstrings), length(tickpositions)) @@ -168,7 +168,7 @@ end function update_tick_obs(tick_obs, horizontal::Observable{Bool}, flipped::Observable{Bool}, tickpositions, tickalign, ticksize, spinewidth) result = tick_obs[] - empty!(result) # re-use allocated array + empty!(result) # reuse allocated array sign::Int = flipped[] ? -1 : 1 if horizontal[] for tp in tickpositions diff --git a/src/specapi.jl b/src/specapi.jl index 8f4bf7dd11e..764c64e7128 100644 --- a/src/specapi.jl +++ b/src/specapi.jl @@ -142,7 +142,7 @@ end const Layoutable = Union{GridLayout,Block} const LayoutableSpec = Union{GridLayoutSpec,BlockSpec} const LayoutEntry = Pair{GridLayoutPosition,LayoutableSpec} -# We use this to decide if we can re-use a plot. +# We use this to decide if we can reuse a plot. # (nesting_level_in_layout, position_in_layout, spec) const LayoutableKey = Tuple{Int,GridLayoutPosition,LayoutableSpec} @@ -448,8 +448,8 @@ function update_plot!(obs_to_notify, plot::AbstractPlot, oldspec::PlotSpec, spec end end # Cycling needs to be handled separately sadly, - # since they're implicitly mutating attributes, e.g. if I re-use a plot - # that has been on cycling position 2, and now I re-use it for the first plot in the list + # since they're implicitly mutating attributes, e.g. if I reuse a plot + # that has been on cycling position 2, and now I reuse it for the first plot in the list # it will need to change to the color of cycling position 1 if haskey(plot, :cycle) cycle = get_cycle_for_plottype(plot.cycle[]) @@ -599,7 +599,7 @@ function diff_plotlist!(scene::Scene, plotspecs::Vector{PlotSpec}, obs_to_notify new_plots[plotspec] = plot_obj else @debug("updating old plot with spec") - # Delete the plots from reusable_plots, so that we don't re-use it multiple times! + # Delete the plots from reusable_plots, so that we don't reuse it multiple times! delete!(reusable_plots, old_spec) update_plot!(obs_to_notify, reused_plot, old_spec, plotspec) new_plots[plotspec] = reused_plot @@ -623,7 +623,7 @@ function update_plotspecs!(scene::Scene, list_of_plotspecs::Observable, plotlist # And at some point we may be able to optimize notify(list_of_observables) empty!(obs_to_notify) empty!(scene.cycler.counters) # Reset Cycler - # diff_plotlist! deletes all plots that get re-used from unused_plots + # diff_plotlist! deletes all plots that get reused from unused_plots # so, this will become our list of unused plots! new_plots = diff_plotlist!(scene, plotspecs, obs_to_notify, unused_plots, plotlist) # Next, delete all plots that we haven't used @@ -882,7 +882,7 @@ function update_gridlayout!(gridlayout::GridLayout, nesting::Int, oldgridspec::U push!(new_layoutables, (nesting, position, spec) => (new_layoutable, obs)) else @debug("updating old block with spec") - # Make sure we don't double re-use a layoutable + # Make sure we don't double reuse a layoutable splice!(previous_contents, idx) (_, _, old_spec) = old_key (layoutable, plot_obs) = layoutable_obs @@ -914,8 +914,8 @@ end function update_gridlayout!(target_layout::GridLayout, layout_spec::GridLayoutSpec, unused_layoutables, new_layoutables) - # For each update we look into `unused_layoutables` to see if we can re-use a layoutable (GridLayout/Block). - # Every re-used layoutable and every newly created gets pushed into `new_layoutables`, + # For each update we look into `unused_layoutables` to see if we can reuse a layoutable (GridLayout/Block). + # Every reused layoutable and every newly created gets pushed into `new_layoutables`, # while it gets removed from `unused_layoutables`. empty!(new_layoutables) @@ -947,7 +947,7 @@ function update_gridlayout!(target_layout::GridLayout, layout_spec::GridLayoutSp # return # end # Finally transfer all new_layoutables into reusable_layoutables, - # since in the next update they will be the once we re-use + # since in the next update they will be the once we reuse append!(unused_layoutables, new_layoutables) unique!(unused_layoutables) return diff --git a/test/specapi.jl b/test/specapi.jl index cea645640aa..ecd56e9a189 100644 --- a/test/specapi.jl +++ b/test/specapi.jl @@ -144,12 +144,12 @@ end @test first(ax.then_observers).f === println pl[1] = S.GridLayout(S.Axis(title="interaction")) - @test real_ax === f.content[1] # re-use axis + @test real_ax === f.content[1] # reuse axis @test length(mpos.listeners) == 1 @test mpos.listeners[1][2] !== println end -@testset "Blockspec re-use" begin +@testset "Blockspec reuse" begin ax1 = S.Axis(; title="Title 1") ax2 = S.Axis(; title="Title 2") ax3 = S.Axis(; title="Title 3") From 296a414e12e71da50eb92891849ca14ac3e9fa2b Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 1 Nov 2024 13:44:55 +0100 Subject: [PATCH 08/10] fix spelling --- .github/workflows/codespell.yml | 2 +- CHANGELOG.md | 2 +- GLMakie/experiments/shaderabstr.jl | 6 +++--- docs/src/reference/blocks/axis.md | 2 +- src/conversions.jl | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 8e38c5e1fe3..0e30fa4028f 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -13,6 +13,6 @@ jobs: - uses: actions/checkout@v4 - uses: codespell-project/actions-codespell@v2 with: - ignore_words_list: indexin,Heros + ignore_words_list: indexin,doubleclick,Heros skip: '*.js,*.vert,*.ai,*.frag,*.geom' only_warn: 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index a03440b2fac..ffa74c30712 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -619,7 +619,7 @@ All other changes are collected [in this PR](https://github.com/MakieOrg/Makie.j ## [0.15.2] - 2021-08-26 -- Reenabled Julia 1.3 support. +- Re-enabled Julia 1.3 support. - Use [MathTexEngine v0.2](https://github.com/Kolaru/MathTeXEngine.jl/releases/tag/v0.2.0). - Depend on new GeometryBasics, which changes all the Vec/Point/Quaternion/RGB/RGBA - f0 aliases to just f. For example, `Vec2f0` is changed to `Vec2f`. Old aliases are still exported, but deprecated and will be removed in the next breaking release. For more details and an upgrade script, visit [GeometryBasics#97](https://github.com/JuliaGeometry/GeometryBasics.jl/pull/97). - Added `hspan!` and `vspan!` functions [#1264](https://github.com/MakieOrg/Makie.jl/pull/1264). diff --git a/GLMakie/experiments/shaderabstr.jl b/GLMakie/experiments/shaderabstr.jl index 5dfe724fe48..9d976497cc3 100644 --- a/GLMakie/experiments/shaderabstr.jl +++ b/GLMakie/experiments/shaderabstr.jl @@ -58,7 +58,7 @@ disp = display(Makie.mesh(m, show_axis=false)); mesh_normals = GeometryBasics.normals(positions, triangles) coords = meta(positions, color=xyz_vertex_color, normals=mesh_normals) vertexcolor_mesh = GeometryBasics.Mesh(coords, triangles) -scren = mesh(vertexcolor_mesh, show_axis=false) |> display +screen = mesh(vertexcolor_mesh, show_axis=false) |> display function getter_function(io::IO, ::Fragment, sampler::Sampler, name::Symbol) @@ -116,13 +116,13 @@ texsampler = Makie.sampler(rand(RGBf, 4, 4), uv) coords = meta(positions, color=texsampler, normals=mesh_normals) texture_mesh = GeometryBasics.Mesh(coords, triangles) -scren = mesh(texture_mesh, show_axis=false) |> display +screen = mesh(texture_mesh, show_axis=false) |> display texsampler = Makie.sampler(:viridis, rand(length(positions))) coords = meta(positions, color=texsampler, normals=mesh_normals) texture_mesh = GeometryBasics.Mesh(coords, triangles) -scren = mesh(texture_mesh, show_axis=false) |> display +screen = mesh(texture_mesh, show_axis=false) |> display diff --git a/docs/src/reference/blocks/axis.md b/docs/src/reference/blocks/axis.md index c37cbee38d5..c696accf392 100644 --- a/docs/src/reference/blocks/axis.md +++ b/docs/src/reference/blocks/axis.md @@ -228,7 +228,7 @@ You can check which interactions are currently active by calling `interactions(a #### Activating and deactivating interactions -Often, you don't want to remove an interaction entirely but only disable it for a moment, then reenable it again. +Often, you don't want to remove an interaction entirely but only disable it for a moment, then re-enable it again. You can use the functions `activate_interaction!(ax, name::Symbol)` and `deactivate_interaction!(ax, name::Symbol)` for that. #### `Function` interaction diff --git a/src/conversions.jl b/src/conversions.jl index cfdd000a1ae..62a5125c682 100644 --- a/src/conversions.jl +++ b/src/conversions.jl @@ -586,7 +586,7 @@ function convert_arguments( end function convert_arguments(::Type{<:Mesh}, geom::GeometryPrimitive{N, T}) where {N, T <: Real} - # we convert to UV mesh as default, because otherwise the uv informations get lost + # we convert to UV mesh as default, because otherwise the uv information gets lost # - we can still drop them, but we can't add them later on m = GeometryBasics.mesh(geom; pointtype=Point{N,float_type(T)}, uv=Vec2f, normaltype=Vec3f, facetype=GLTriangleFace) return (m,) From eba782e94598e6506b3e2d015b13ca93571717ef Mon Sep 17 00:00:00 2001 From: t-bltg Date: Fri, 1 Nov 2024 13:49:24 +0100 Subject: [PATCH 09/10] rename --- GLMakie/src/GLAbstraction/GLInfo.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GLMakie/src/GLAbstraction/GLInfo.jl b/GLMakie/src/GLAbstraction/GLInfo.jl index c72c677807f..ff302f6b0bd 100644 --- a/GLMakie/src/GLAbstraction/GLInfo.jl +++ b/GLMakie/src/GLAbstraction/GLInfo.jl @@ -69,7 +69,7 @@ function getAttributesInfo(p::GLProgram) @show activeAttr = glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES) # get location and type for each attrib for i=0:activeAttr-1 - @show name, typ, siz = glGetActiveAttrib(program, i) + @show name, typ, size = glGetActiveAttrib(program, i) @show loc = glGetAttribLocation(program, name) end end From 2ab1192ba628188085a795a1c44529fa534a7541 Mon Sep 17 00:00:00 2001 From: ffreyer Date: Mon, 4 Nov 2024 15:04:09 +0100 Subject: [PATCH 10/10] clean up a few more spellings --- GLMakie/src/GLAbstraction/GLTexture.jl | 8 ++++---- docs/src/explanations/conversion_pipeline.md | 2 +- src/interfaces.jl | 2 +- src/scenes.jl | 4 ++-- src/utilities/texture_atlas.jl | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/GLMakie/src/GLAbstraction/GLTexture.jl b/GLMakie/src/GLAbstraction/GLTexture.jl index e0334e490f7..53191db832f 100644 --- a/GLMakie/src/GLAbstraction/GLTexture.jl +++ b/GLMakie/src/GLAbstraction/GLTexture.jl @@ -106,7 +106,7 @@ function Texture( texture::Texture{T, NDim} end export resize_nocopy! -function resize_nocopy!(t::Texture{T, ND}, newdims::NTuple{ND, Int}) where {T, ND} +function resize_nocopy!(t::Texture{T, NDim}, newdims::NTuple{NDim, Int}) where {T, NDim} bind(t) glTexImage(t.texturetype, 0, t.internalformat, newdims..., 0, t.format, t.pixeltype, C_NULL) t.size = newdims @@ -324,8 +324,8 @@ function gpu_setindex!{T}(target::Texture{T, 2}, source::Texture{T, 2}, fbo=glGe end =# # Implementing the GPUArray interface -function gpu_data(t::Texture{T, ND}) where {T, ND} - result = Array{T, ND}(undef, size(t)) +function gpu_data(t::Texture{T, NDim}) where {T, NDim} + result = Array{T, NDim}(undef, size(t)) unsafe_copy!(result, t) return result end @@ -370,7 +370,7 @@ function gpu_resize!(t::TextureBuffer{T}, newdims::NTuple{1, Int}) where T t end # Resize Texture -function gpu_resize!(t::Texture{T, ND}, newdims::NTuple{ND, Int}) where {T, ND} +function gpu_resize!(t::Texture{T, NDim}, newdims::NTuple{NDim, Int}) where {T, NDim} # dangerous code right here...Better write a few tests for this newtex = similar(t, newdims) old_size = size(t) diff --git a/docs/src/explanations/conversion_pipeline.md b/docs/src/explanations/conversion_pipeline.md index 92693f32761..2cb5ec2d301 100644 --- a/docs/src/explanations/conversion_pipeline.md +++ b/docs/src/explanations/conversion_pipeline.md @@ -240,7 +240,7 @@ The viewers position and orientation is set by either the the camera controller ## Coordinate spaces Currently `Makie` defines 4 coordinate spaces: :data, :clip, :relative and :pixel. -The example above shows te conversion pipeline for `space = :data`. +The example above shows the conversion pipeline for `space = :data`. For `space = :clip` we consider `plot.converted` to be in clip space, meaning that `transform_func`, `model`, `view` and `projection` can be skipped, and `Float32Convert` only does a cast to Float32. The x and y direction correspond to right and up, with z increasing towards the viewer. diff --git a/src/interfaces.jl b/src/interfaces.jl index 2d9905153f5..6690ce17509 100644 --- a/src/interfaces.jl +++ b/src/interfaces.jl @@ -132,7 +132,7 @@ We're separating this state from convert_arguments, to better apply `dim_convert """ expand_dimensions(trait, args...) = nothing -expand_dimensions(::PointBased, y::VecTypes) = nothing # VecTypes are nd points +expand_dimensions(::PointBased, y::VecTypes) = nothing # VecTypes are n dimensional points expand_dimensions(::PointBased, y::RealVector) = (keys(y), y) expand_dimensions(::PointBased, y::OffsetVector{<:Real}) = (OffsetArrays.no_offset_view(keys(y)), OffsetArrays.no_offset_view(y)) diff --git a/src/scenes.jl b/src/scenes.jl index 5903e5a9e7c..9b7fccd9997 100644 --- a/src/scenes.jl +++ b/src/scenes.jl @@ -584,8 +584,8 @@ end function center!(scene::Scene, padding=0.01, exclude = not_in_data_space) bb = boundingbox(scene, exclude) w = widths(bb) - padd = w .* padding - bb = Rect3d(minimum(bb) .- padd, w .+ 2padd) + pad = w .* padding + bb = Rect3d(minimum(bb) .- pad, w .+ 2pad) update_cam!(scene, bb) scene end diff --git a/src/utilities/texture_atlas.jl b/src/utilities/texture_atlas.jl index ef497fc7cdf..604722dee20 100644 --- a/src/utilities/texture_atlas.jl +++ b/src/utilities/texture_atlas.jl @@ -116,8 +116,8 @@ function write_array(io::IO, array::AbstractArray) end function read_array(io::IO, T) - nd = read(io, Int32) - size = Vector{Int32}(undef, nd) + ndims = read(io, Int32) + size = Vector{Int32}(undef, ndims) read!(io, size) array = Array{T}(undef, size...) read!(io, array) @@ -325,7 +325,7 @@ The padding is in units after downscaling! function sdistancefield(img, downsample, pad) # we pad before downsampling, so we need to have `downsample` as much padding pad = downsample * pad - # padd the image + # pad the image padded_size = size(img) .+ 2pad # for the downsampling, we need to make sure that