Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check version in ci - fix precompilation #5024

Merged
merged 36 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
53ca5b0
speedup CI
t-bltg Nov 12, 2024
292b739
Merge branch 'v2' into faster-ci
t-bltg Nov 12, 2024
d02ad12
check julia version
t-bltg Nov 12, 2024
1976ed4
update
t-bltg Nov 12, 2024
690996c
update
t-bltg Nov 12, 2024
72387b5
update
t-bltg Nov 12, 2024
76f9be1
reduce calls
t-bltg Nov 12, 2024
cddf904
upd
t-bltg Nov 12, 2024
962cc6d
update tests
t-bltg Nov 12, 2024
6ee9f65
reduce `using`
t-bltg Nov 12, 2024
b51387e
update
t-bltg Nov 12, 2024
f97e756
fix precompilation
t-bltg Nov 12, 2024
63ab36f
fix PGFPLotsX extension
t-bltg Nov 12, 2024
0de8c73
checkpoint recursive
t-bltg Nov 12, 2024
731eadb
update
t-bltg Nov 13, 2024
ad47d73
fix hdf5 and unitful extensions
t-bltg Nov 13, 2024
5361eae
fix aspect_ratio
t-bltg Nov 13, 2024
71793c8
fix StatsPlots
t-bltg Nov 13, 2024
281caa7
fix test
t-bltg Nov 13, 2024
89d0024
update docs
t-bltg Nov 13, 2024
5c993f0
fix
t-bltg Nov 13, 2024
36f1486
remove stale dep (Aqua)
t-bltg Nov 13, 2024
d4ddc4a
format
t-bltg Nov 13, 2024
5a81586
fix project.toml
t-bltg Nov 13, 2024
b812332
update env variables
t-bltg Nov 13, 2024
6d4bcca
fix
t-bltg Nov 13, 2024
23fbbe7
update
t-bltg Nov 13, 2024
a779743
fix conflicts
t-bltg Nov 13, 2024
ef50737
fix weakdeps
t-bltg Nov 13, 2024
b02abd6
fix `GraphRecipes` and `StatsPlots`
t-bltg Nov 13, 2024
a16b984
change test order
t-bltg Nov 13, 2024
05d5b09
change dev order
t-bltg Nov 13, 2024
5f9b198
change env var
t-bltg Nov 13, 2024
9799415
restore debug code
t-bltg Nov 13, 2024
823cb56
fix typo
t-bltg Nov 13, 2024
0bbbef0
reorder
t-bltg Nov 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ jobs:
Pkg.develop([
(; path="./RecipesBase"),
(; path="./RecipesPipeline"),
(; path="./PlotThemes"),
(; path="./PlotsBase"),
(; path="."),
(; path="./GraphRecipes"),
(; path="./StatsPlots"),
(; path="./PlotThemes"),
(; path="."),
])

- name: Install conda based matplotlib
Expand All @@ -96,11 +96,11 @@ jobs:
${cmd[@]} -e 'using Pkg; Pkg.test([
"RecipesBase",
"RecipesPipeline",
"PlotThemes",
"PlotsBase",
"Plots",
"GraphRecipes",
"StatsPlots",
"PlotThemes",
"Plots",
]; coverage=true)'
- uses: julia-actions/julia-processcoverage@latest
if: startsWith(matrix.os, 'ubuntu')
Expand Down
8 changes: 5 additions & 3 deletions GraphRecipes/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "GraphRecipes"
uuid = "bd48cda9-67a9-57be-86fa-5b3c104eda73"
version = "1.0"
version = "1.0.0"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand All @@ -12,6 +12,7 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
NetworkLayout = "46757867-2c16-5918-afeb-47bfcb05e46a"
PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
PlotsBase = "c52230a3-c5da-43a3-9e85-260fcdfdc737"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Expand All @@ -29,17 +30,18 @@ Statistics = "1"
julia = "1.10"

[extras]
GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Markdown = "d6f4376e-aef5-505a-96c1-9c027394607a"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PlotsBase = "c52230a3-c5da-43a3-9e85-260fcdfdc737"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92"

[targets]
test = ["Gtk", "ImageMagick", "LinearAlgebra", "Logging", "Markdown", "Plots", "Random", "SparseArrays", "StableRNGs", "Test", "VisualRegressionTests"]
test = ["Gtk", "GR", "ImageMagick", "LinearAlgebra", "Logging", "Markdown", "PlotsBase", "Random", "SparseArrays", "StableRNGs", "Test", "VisualRegressionTests"]
4 changes: 3 additions & 1 deletion GraphRecipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ For a given graph, there are many legitimate ways to display and visualize the g
## An example
```julia
using GraphRecipes
using Plots
using PlotsBase

import GR; gr()

g = [0 1 1;
1 0 1;
Expand Down
8 changes: 4 additions & 4 deletions GraphRecipes/src/trees.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Wrap a tree-like object for plotting. Uses `AbstractTrees.children()` to recursi

```julia
using AbstractTrees, GraphRecipes
AbstractTrees.children(d::Dict) = [p for p in d]
AbstractTrees.children(p::Pair) = AbstractTrees.children(p[2])
function AbstractTrees.printnode(io::IO, p::Pair)
str = isempty(AbstractTrees.children(p[2])) ? string(p[1], ": ", p[2]) : string(p[1], ": ")
@eval AbstractTrees children(d::AnstractDict) = [p for p in d]
@eval AbstractTrees children(p::Pair) = AbstractTrees.children(p[2])
@eval AbstractTrees function printnode(io::IO, p::Pair)
str = isempty(children(p[2])) ? string(p[1], ": ", p[2]) : string(p[1], ": ")
print(io, str)
end

Expand Down
14 changes: 5 additions & 9 deletions GraphRecipes/test/functions.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using Plots
using StableRNGs
using GraphRecipes
using GraphRecipes.Colors
using GraphRecipes.AbstractTrees

function random_labelled_graph()
n = 15
rng = StableRNG(1)
Expand Down Expand Up @@ -172,11 +168,11 @@ julia_type_tree() = plot(
rng = StableRNG(1),
)

AbstractTrees.children(d::Dict) = [p for p ∈ d]
AbstractTrees.children(p::Pair) = AbstractTrees.children(p[2])
function AbstractTrees.printnode(io::IO, p::Pair)
@eval AbstractTrees children(d::AbstractDict) = [p for p ∈ d]
@eval AbstractTrees children(p::Pair) = AbstractTrees.children(p[2])
@eval AbstractTrees function printnode(io::IO, p::Pair)
str =
isempty(AbstractTrees.children(p[2])) ? string(p[1], ": ", p[2]) :
isempty(children(p[2])) ? string(p[1], ": ", p[2]) :
string(p[1], ": ")
print(io, str)
end
Expand Down
3 changes: 1 addition & 2 deletions GraphRecipes/test/parse_readme.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Markdown
using GraphRecipes
using Plots
using Markdown

cd(@__DIR__)

Expand Down
1 change: 0 additions & 1 deletion GraphRecipes/test/pkg_deps.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

module PkgDeps

using GraphRecipes
Expand Down
8 changes: 5 additions & 3 deletions GraphRecipes/test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
using VisualRegressionTests
using AbstractTrees
using LinearAlgebra
using Logging
using GraphRecipes.AbstractTrees
using GraphRecipes.Colors
using GraphRecipes
using SparseArrays
using ImageMagick
using StableRNGs
using PlotsBase
using Logging
using Graphs
using Plots
using Test
using Gtk # for popup

import Plots: PlotsBase
import GR; gr()

isci() = get(ENV, "CI", "false") == "true"
itol(tol = nothing) = something(tol, isci() ? 1e-3 : 1e-5)
Expand Down
25 changes: 15 additions & 10 deletions PlotsBase/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ version = "0.1"

[deps]
Base64 = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Contour = "d38c429a-6771-53c6-b99e-75d170b6e991"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
FFMPEG = "c87230d0-a227-11e9-1b43-d7ebe4e7570a"
FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93"
JLFzf = "1019f520-868f-41f5-a6de-eb00f4b6a39c"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Measures = "442fdcdd-2543-5da2-b0f3-8c86c306513e"
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
Expand All @@ -27,31 +24,34 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
RecipesPipeline = "01d81517-befc-4cb6-b9ec-a95719d0359c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
RelocatableFolders = "05181044-ff0b-4ac5-8273-598c1e38db00"
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
Showoff = "992d4aef-0814-514b-bc4d-f2e9a6c4116f"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
UnicodeFun = "1cfade01-22cf-5700-b092-accc4b62d6e1"
UnitfulLatexify = "45397f5d-5981-4c77-b2b3-fc36d6e9b728"
Unzip = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d"

[weakdeps]
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Contour = "d38c429a-6771-53c6-b99e-75d170b6e991"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
Gaston = "4b11ee91-296f-5714-9832-002c20994614"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
IJulia = "7073ff75-c697-5162-941a-fcdaad2a7d2a"
ImageInTerminal = "d8c32880-2388-543b-8c61-d9f865259254"
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
PlotlyKaleido = "f2990250-8cf9-495f-b13a-cce12b45703c"
PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
UnitfulLatexify = "45397f5d-5981-4c77-b2b3-fc36d6e9b728"

[extensions]
FileIOExt = "FileIO"
Expand All @@ -61,17 +61,19 @@ GeometryBasicsExt = "GeometryBasics"
HDF5Ext = "HDF5"
IJuliaExt = "IJulia"
ImageInTerminalExt = "ImageInTerminal"
PGFPlotsXExt = "PGFPlotsX"
PGFPlotsXExt = ["Colors", "Contour", "Latexify", "LaTeXStrings", "PGFPlotsX"]
PlotlyJSExt = "PlotlyJS"
PlotlyKaleidoExt = "PlotlyKaleido"
PythonPlotExt = "PythonPlot"
UnicodePlotsExt = "UnicodePlots"
UnitfulExt = "Unitful"
UnitfulExt = ["Latexify", "LaTeXStrings", "UnitfulLatexify", "Unitful"]

[compat]
Base64 = "1"
Colors = "0.12 - 0.13"
Contour = "0.6"
Dates = "1"
Downloads = "1"
FFMPEG = "0.4"
FixedPointNumbers = "0.8"
GR = "0.73"
Expand All @@ -88,7 +90,7 @@ Pkg = "1"
PlotThemes = "3"
PlotUtils = "1"
PlotlyJS = "0.18"
PlotlyKaleido = "2.2.2"
PlotlyKaleido = "2.2"
PrecompileTools = "1"
Preferences = "1"
Printf = "1"
Expand All @@ -98,7 +100,6 @@ REPL = "1"
RecipesBase = "1.3.1"
RecipesPipeline = "1"
Reexport = "1"
RelocatableFolders = "1"
Scratch = "1"
Showoff = "1"
SparseArrays = "1"
Expand All @@ -114,6 +115,7 @@ julia = "1.10"
[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Contour = "d38c429a-6771-53c6-b99e-75d170b6e991"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
Expand All @@ -125,6 +127,8 @@ Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
Expand All @@ -138,7 +142,8 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
UnitfulLatexify = "45397f5d-5981-4c77-b2b3-fc36d6e9b728"
VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92"

[targets]
test = ["Aqua", "Colors", "Distributions", "FileIO", "FilePathsBase", "FreeType", "Gaston", "GeometryBasics", "GR", "Gtk", "HDF5", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "PlotlyJS", "PlotlyKaleido", "PythonPlot", "RDatasets", "SentinelArrays", "StableRNGs", "StaticArrays", "Test", "TestImages", "UnicodePlots", "Unitful", "VisualRegressionTests"]
test = ["Aqua", "Colors", "Contour", "Distributions", "FileIO", "FilePathsBase", "FreeType", "Gaston", "GeometryBasics", "GR", "Gtk", "HDF5", "Images", "Latexify", "LaTeXStrings", "LibGit2", "OffsetArrays", "PGFPlotsX", "PlotlyJS", "PlotlyKaleido", "PythonPlot", "RDatasets", "SentinelArrays", "StableRNGs", "StaticArrays", "Test", "TestImages", "UnicodePlots", "Unitful", "UnitfulLatexify", "VisualRegressionTests"]
8 changes: 5 additions & 3 deletions PlotsBase/ext/GRExt.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module GRExt

import PlotsBase: PlotsBase, _cycle
import RecipesPipeline
import PlotsBase: PlotsBase, PrecompileTools, RecipesPipeline, _cycle

import NaNMath
import GR

Expand Down Expand Up @@ -2290,7 +2290,7 @@ function PlotsBase._display(plt::Plot{GRBackend})
GR.emergencyclosegks()
println(
"\033]1337;File=inline=1;preserveAspectRatio=0:",
base64encode(open(read, filepath)),
Base64.base64encode(open(read, filepath)),
"\a",
)
rm(filepath)
Expand All @@ -2303,4 +2303,6 @@ end

PlotsBase.closeall(::GRBackend) = GR.emergencyclosegks()

PlotsBase.@precompile_backend GR

end # module
6 changes: 3 additions & 3 deletions PlotsBase/ext/GastonExt.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module GastonExt

import RecipesPipeline
import PlotUtils
import PlotsBase
import PlotsBase: PlotsBase, PrecompileTools, RecipesPipeline, PlotUtils
import Gaston

using PlotsBase.Annotations
Expand Down Expand Up @@ -845,4 +843,6 @@ function gaston_enclose_tick_string(tick_string)
"$base^{$power}"
end

PlotsBase.@precompile_backend Gaston

end # module
4 changes: 3 additions & 1 deletion PlotsBase/ext/HDF5Ext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import PlotUtils: PlotUtils, Colors
import PlotUtils.ColorSchemes: ColorScheme
import PlotUtils.Colors: Colorant

import PlotsBase
import PlotsBase: PlotsBase, PrecompileTools

using PlotsBase.Annotations
using PlotsBase.DataSeries
Expand Down Expand Up @@ -580,4 +580,6 @@ PlotsBase.hdf5plot_read(path::AbstractString; name::String = "_unnamed") =
return _read_plot(HDF5.open_group(file, h5plotpath("_unnamed")))
end

PlotsBase.@precompile_backend HDF5

end # module
6 changes: 3 additions & 3 deletions PlotsBase/ext/IJuliaExt.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module IJuliaExt

import PlotsBase: PlotsBase, Plot
using Base64
import Base64

# NOTE: cannot use import IJulia
const IJulia =
Expand All @@ -28,7 +28,7 @@ function _ijulia_display_dict(plt::Plot)
out[mime] = sprint(show, MIME(mime), plt)
elseif output_type ≡ :png
mime = "image/png"
out[mime] = base64encode(show, MIME(mime), plt)
out[mime] = Base64.base64encode(show, MIME(mime), plt)
elseif output_type ≡ :svg
mime = "image/svg+xml"
out[mime] = sprint(show, MIME(mime), plt)
Expand All @@ -38,7 +38,7 @@ function _ijulia_display_dict(plt::Plot)
PlotsBase._ijulia__extra_mime_info!(plt, out)
elseif output_type ≡ :pdf
mime = "application/pdf"
out[mime] = base64encode(show, MIME(mime), plt)
out[mime] = Base64.base64encode(show, MIME(mime), plt)
else
error("Unsupported output type $output_type")
end
Expand Down
14 changes: 8 additions & 6 deletions PlotsBase/ext/PGFPlotsXExt.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module PGFPlotsXExt

import PlotsBase: PlotsBase, pgfx_sanitize_string
import PlotsBase:
PlotsBase, PrecompileTools, RecipesPipeline, PlotUtils, pgfx_sanitize_string, Plot
import LaTeXStrings: LaTeXString
import Printf: @sprintf

import RecipesPipeline
import PlotUtils
import PGFPlotsX
import Latexify
import Contour
import Contour # PGFPlotsX extension
import Colors # PGFPlotsX extension
import PGFPlotsX

using PlotsBase.Annotations
using PlotsBase.DataSeries
Expand Down Expand Up @@ -1302,7 +1302,7 @@ function pgfx_sanitize_plot!(plt)
end
elseif value isa Union{AbstractString,AVec{<:AbstractString}}
subplot.attr[key] = pgfx_sanitize_string.(value)
elseif value isa Axis
elseif value isa PlotsBase.Axis
for (k, v) ∈ value.plotattributes
if v isa Union{AbstractString,AVec{<:AbstractString}}
value.plotattributes[k] = pgfx_sanitize_string.(v)
Expand Down Expand Up @@ -1594,4 +1594,6 @@ function PlotsBase._display(plt::Plot{PGFPlotsXBackend})
display(PGFPlotsX.PGFPlotsXDisplay(), plt.o.the_plot)
end

PlotsBase.@precompile_backend PGFPlotsX

end # module
Loading