From a3a0fbac9e36bbf56b33cd0913a0ae89e35cdb01 Mon Sep 17 00:00:00 2001 From: Patrick Jaap Date: Thu, 28 Nov 2024 12:40:38 +0100 Subject: [PATCH 1/4] Update encoding of CHANGELOG --- CHANGELOG.md | 62 ++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7eb5e29..0a5039b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,20 +60,20 @@ See also https://blog.makie.org/blogposts/v0.21/ - Gridscale etc (#20) -Some updates, fixes: - -* gridscale for plutovista, pyplot, makie,plots - -* Export vectorsample and quiverdata - -* Fix streamplot handling for Makie - -* spacing -> rasterpoints for quiver, streamplot - -* Ensure that colorbarticks are always shown and contain the function limits - -* Add customplot - +Some updates, fixes: + +* gridscale for plutovista, pyplot, makie,plots + +* Export vectorsample and quiverdata + +* Fix streamplot handling for Makie + +* spacing -> rasterpoints for quiver, streamplot + +* Ensure that colorbarticks are always shown and contain the function limits + +* Add customplot + ## [1.4.0] - 2023-12-05 @@ -121,22 +121,22 @@ Co-authored-by: Christian Merdon - Improved PyPlot backend: (#17) -* better fontsize recognition - -* correct fig sizes - -* tight_layout() also for SubVisualizer reveal - -* fixed rare clipping of last colorlevel in scalarplot - -* coordinate limits (xlimits etc.) are used in vectorsample (such that scaling only is applied to vectors in the clipped area) - -* new vector scaling method vconstant that scales all arrows equally - -* repaired streamplot (U and V arguments needed transposition) - -* added density argument to streamplot - +* better fontsize recognition + +* correct fig sizes + +* tight_layout() also for SubVisualizer reveal + +* fixed rare clipping of last colorlevel in scalarplot + +* coordinate limits (xlimits etc.) are used in vectorsample (such that scaling only is applied to vectors in the clipped area) + +* new vector scaling method vconstant that scales all arrows equally + +* repaired streamplot (U and V arguments needed transposition) + +* added density argument to streamplot + ## [1.1.0] - 2023-06-02 @@ -154,4 +154,4 @@ fix colorbarticks - Subgridplots (#16) -Handle plots of discontinuous functions in Makie,Pyplot, PlutoVista +Handle plots of discontinuous functions in Makie,Pyplot, PlutoVista From f637c5652834f151c8dcfa301b5bad7735cfb2a6 Mon Sep 17 00:00:00 2001 From: Jan Philipp Thiele Date: Thu, 28 Nov 2024 14:13:44 +0100 Subject: [PATCH 2/4] Add runic badge and remove formatter config --- .JuliaFormatter.toml | 7 ------- README.md | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 .JuliaFormatter.toml diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml deleted file mode 100644 index 0b5cfae..0000000 --- a/.JuliaFormatter.toml +++ /dev/null @@ -1,7 +0,0 @@ -style = "sciml" -pipe_to_function_call=false -always_for_in = false -separate_kwargs_with_semicolon = true -margin = 132 -yas_style_nesting=true -ignore = [".git"] diff --git a/README.md b/README.md index a7682ee..1e20def 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ [![Build status](https://github.com/WIAS-PDELib/GridVisualize.jl/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/WIAS-PDELib/GridVisualize.jl/actions/workflows/ci.yml?query=branch%3Amain) [![](https://img.shields.io/badge/docs-stable-blue.svg)](https://WIAS-PDELib.github.io/GridVisualize.jl/stable) [![](https://img.shields.io/badge/docs-dev-blue.svg)](https://WIAS-PDELib.github.io/GridVisualize.jl/dev) +[![code style: runic](https://img.shields.io/badge/code_style-%E1%9A%B1%E1%9A%A2%E1%9A%BE%E1%9B%81%E1%9A%B2-black)](https://github.com/fredrikekre/Runic.jl) GridVisualize ============= From 9dba4aee46624e6f98db054d04b8bee84734f749 Mon Sep 17 00:00:00 2001 From: Patrick Jaap Date: Thu, 28 Nov 2024 15:20:45 +0100 Subject: [PATCH 3/4] Add check for undocumented names; remove a dangling exported function --- CHANGELOG.md | 6 ++++++ src/GridVisualize.jl | 7 ++++++- src/makie.jl | 6 ++++++ src/plots.jl | 5 +++++ test/runtests.jl | 7 +++++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a5039b..3346e64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ - `gridplot` with `GLMakie` and `PyPlot` now annotates the color bars with `boundary regions` and `cell regions` +- unit test for undocumented names + +### Removed + +- dangling exported function `backend!` + ## [1.9.0] - 2024-11-25 ### Added diff --git a/src/GridVisualize.jl b/src/GridVisualize.jl index bb4ce24..4c0a1b7 100644 --- a/src/GridVisualize.jl +++ b/src/GridVisualize.jl @@ -1,3 +1,8 @@ +""" + GridVisualize + +$(read(joinpath(@__DIR__, "..", "README.md"), String)) +""" module GridVisualize using Printf @@ -31,7 +36,7 @@ export gridplot, gridplot! export vectorplot, vectorplot! export streamplot, streamplot! export customplot, customplot! -export save, reveal, backend! +export save, reveal export isplots, isvtkview, ispyplot, ismakie, isplutovista export GridVisualizer, SubVisualizer export plottertype, available_kwargs diff --git a/src/makie.jl b/src/makie.jl index f6148aa..7158176 100644 --- a/src/makie.jl +++ b/src/makie.jl @@ -77,6 +77,12 @@ function save(fname, scene, XMakie, ::Type{MakieType}) return isnothing(scene) ? nothing : XMakie.save(fname, scene) end + +""" + movie( func, vis::GridVisualizer, ::Type{MakieType}; file = nothing, format = "gif", kwargs... ) + +Record a movie with GLMakie backend. MP4 files and gifs can be created. +""" function movie( func, vis::GridVisualizer, diff --git a/src/plots.jl b/src/plots.jl index 4acb044..80fc255 100644 --- a/src/plots.jl +++ b/src/plots.jl @@ -46,6 +46,11 @@ function save(fname, scene, Plots, ::Type{PlotsType}) return isnothing(scene) ? nothing : Plots.savefig(scene, fname) end +""" + movie( func, vis::GridVisualizer, ::Type{PlotsType}; file = nothing, format = "gif", kwargs... ) + +Record a movie with Plots backend. MP4 files and gifs can be created. +""" function movie( func, vis::GridVisualizer, diff --git a/test/runtests.jl b/test/runtests.jl index b1ec744..4ca1fb7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -8,3 +8,10 @@ include("../docs/makeplots.jl") @testset "makeplots - CairoMakie" begin makeplots(mktempdir(); Plotter = CairoMakie, extension = ".svg") end + + +if isdefined(Docs, :undocumented_names) # >=1.11 + @testset "UndocumentedNames" begin + @test isempty(Docs.undocumented_names(GridVisualize)) + end +end From a2f9782d55cfc55dbb5027238a73125e6c0b5c9f Mon Sep 17 00:00:00 2001 From: Patrick Jaap Date: Thu, 28 Nov 2024 15:57:06 +0100 Subject: [PATCH 4/4] Add missing docs --- docs/src/api.md | 5 +++++ docs/src/index.md | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/src/api.md b/docs/src/api.md index d1cd5c5..78ef7d7 100644 --- a/docs/src/api.md +++ b/docs/src/api.md @@ -61,3 +61,8 @@ available_kwargs vectorsample quiverdata ``` + +## Creating movies +```@docs +movie +``` diff --git a/docs/src/index.md b/docs/src/index.md index 4b21d47..def7674 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,6 +1,5 @@ -````@eval -using Markdown -Markdown.parse(""" -$(read("../../README.md",String)) -""") -```` +# GridVisualize.jl + +```@docs +GridVisualize +```