Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
81 changes: 37 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,20 @@ jobs:
ci:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
env:
GKS_ENCODING: "utf8"
GKSwstype: "nul"
JULIA_CONDAPKG_BACKEND: "MicroMamba"
PLOTS_PLOTLYJS_UNSAFE_ELECTRON: "true"
MPLBACKEND: "agg"
JULIA_PROJECT_CMD: julia --project=@. --check-bounds=yes --color=yes
GKS_ENCODING: utf8
GKS_WSTYPE: nul
JULIA_CONDAPKG_BACKEND: MicroMamba
PLOTS_PLOTLYJS_UNSAFE_ELECTRON: true
MPLBACKEND: agg
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- 'lts' # LTS, also minimum declared julia compat in `Project.toml`
- 'lts' # LTS, also minimum declared julia compat in `Project.toml`
- '1' # latest stable
experimental:
- false
Expand All @@ -42,14 +43,12 @@ jobs:
version: '1'
- os: ubuntu-latest
experimental: false
prefix: xvfb-run # add `xvfb-run` prefix julia-actions/julia-runtest/blob/master/README.md
- os: ubuntu-latest
experimental: true
prefix: xvfb-run
version: 'pre' # upcoming julia version, next `rc`

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Ubuntu LaTeX dependencies
if: startsWith(matrix.os, 'ubuntu')
Expand All @@ -68,42 +67,36 @@ jobs:
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@latest

- name: Run upstream RecipesBase & RecipesPipeline tests
shell: julia --project=@. --color=yes {0}
- name: dev pkgs and install mpl deps
env:
JULIA_PKG_PRECOMPILE_AUTO: 0
run: |
using Pkg
foreach(("RecipesBase", "RecipesPipeline")) do name
Pkg.develop(path=name); Pkg.test(name; coverage=true)
end
${{ env.JULIA_PROJECT_CMD }} -e '
using Pkg
Pkg.develop([
(; path="./RecipesBase"), # compat for LTS [sources], remove later
(; path="./RecipesPipeline"), # compat for LTS [sources], remove later
(; path="./Plots"), # compat for LTS [sources], remove later
])
include(joinpath(@__DIR__, "ci", "matplotlib.jl"))
Pkg.precompile() # // precompilation
'

- name: Install conda based matplotlib
shell: julia --project=@. --color=yes {0}
- name: test Plots stack
timeout-minutes: 90
run: |
using Pkg; Pkg.add("CondaPkg")
using CondaPkg; CondaPkg.resolve()
libgcc = if Sys.islinux()
# see discourse.julialang.org/t/glibcxx-version-not-found/82209/8
# julia 1.8.3 is built with libstdc++.so.6.0.29, so we must restrict to this version (gcc 11.3.0, not gcc 12.2.0)
# see gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html
specs = Dict(
v"3.4.29" => ">=11.1,<12.1",
v"3.4.30" => ">=12.1,<13.1",
v"3.4.31" => ">=13.1,<14.1",
v"3.4.32" => ">=14.1,<15.1",
v"3.4.33" => ">=15.1,<16.1",
# ... keep this up-to-date with gcc 16
)[Base.BinaryPlatforms.detect_libstdcxx_version()]
("libgcc-ng$specs", "libstdcxx-ng$specs")
else
()
end
CondaPkg.PkgREPL.add([libgcc..., "matplotlib"])
CondaPkg.status()

- uses: julia-actions/julia-runtest@latest
timeout-minutes: 60
with:
prefix: ${{ matrix.prefix }} # for `xvfb-run`
cmd=(${{ env.JULIA_PROJECT_CMD }} --depwarn=yes)
if [ "$RUNNER_OS" == "Linux" ]; then
cmd=(xvfb-run ${cmd[@]})
fi
echo ${cmd[@]}
${cmd[@]} -e '
using Pkg; Pkg.test([
"RecipesBase",
"RecipesPipeline",
"Plots",
]; coverage=true)
'

- name: Run downstream tests
if: startsWith(matrix.os, 'ubuntu')
Expand All @@ -112,14 +105,14 @@ jobs:
using Pkg
foreach(("StatsPlots", "GraphRecipes")) do name
Pkg.activate(tempdir())
foreach(path -> Pkg.develop(; path), ("RecipesBase", "RecipesPipeline", "."))
foreach(path -> Pkg.develop(; path), ("RecipesBase", "RecipesPipeline", "Plots"))
Pkg.add(name); Pkg.test(name; coverage=true)
end

- uses: julia-actions/julia-processcoverage@latest
if: startsWith(matrix.os, 'ubuntu')
with:
directories: RecipesBase/src,RecipesPipeline/src,src
directories: RecipesBase/src,RecipesPipeline/src,Plots/src
- uses: codecov/codecov-action@v4
if: startsWith(matrix.os, 'ubuntu')
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/compathelper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} # optional
run: julia -e 'using CompatHelper; CompatHelper.main()'
run: |
julia -e 'using CompatHelper; CompatHelper.main(
subdirs=["RecipesBase", "RecipesPipeline", "Plots"]
)'
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
DOCUMENTER_KEY: ${{secrets.DOCUMENTER_KEY}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@latest
- uses: julia-actions/cache@v2
- run: bash -c '. ci/build-docs.sh; install_ubuntu_deps'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tagbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.TAGBOT_KEY }}
branch: master
subdir: Plots
65 changes: 16 additions & 49 deletions Project.toml → Plots/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
UnicodeFun = "1cfade01-22cf-5700-b092-accc4b62d6e1"
Unzip = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d"

[sources]
RecipesBase = {path = "../RecipesBase"}
RecipesPipeline = {path = "../RecipesPipeline"}

[weakdeps]
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
Expand All @@ -55,79 +59,42 @@ ImageInTerminalExt = "ImageInTerminal"
UnitfulExt = "Unitful"

[compat]
Aqua = "0.8"
Base64 = "1"
Contour = "0.5 - 0.6"
Dates = "1"
Downloads = "1"
FFMPEG = "0.4.1"
FileIO = "1"
FixedPointNumbers = "0.6 - 0.8"
GeometryBasics = "0.5"
GR = "0.73"
Gaston = "1"
HDF5 = "0.16 - 0.17"
InspectDR = "0.4"
ImageInTerminal = "0.5"
JLFzf = "0.1"
JSON = "0.21, 1"
LaTeXStrings = "1"
Latexify = "0.16.9"
Measures = "0.3"
NaNMath = "0.3, 1"
PGFPlots = "3"
PGFPlotsX = "1"
Pkg = "1"
PlotThemes = "2, 3"
PlotUtils = "1"
PlotlyBase = "0.7 - 0.8"
PlotlyJS = "0.18"
PlotlyKaleido = "1,2"
PrecompileTools = "1"
PyPlot = "2"
PythonPlot = "1"
Printf = "1"
Random = "1"
REPL = "1"
RecipesBase = "1.3.1"
RecipesPipeline = "0.6.10"
Reexport = "0.2, 1"
RelocatableFolders = "0.3, 1"
Requires = "1"
Scratch = "1"
Showoff = "0.3.1, 1"
SparseArrays = "1"
Statistics = "1"
StatsBase = "0.33 - 0.34"
TOML = "1"
UnicodeFun = "0.4"
UnicodePlots = "3.4"
Unitful = "1.25"
Unzip = "0.1 - 0.2"
UUIDs = "1"
julia = "1.10"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
FreeType = "b38be410-82b0-50bf-ab77-7b57e271db43"
Gaston = "4b11ee91-296f-5714-9832-002c20994614"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
InspectDR = "d0351b0e-4b05-5898-87b3-e2a8edfddd1d"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
PGFPlots = "3b7a836e-365b-5785-a47d-02c71176b4aa"
PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925"
PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
PlotlyKaleido = "f2990250-8cf9-495f-b13a-cce12b45703c"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
SentinelArrays = "91c51154-3ec4-41a3-a24f-3f23e20d615c"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92"

[targets]
test = ["Aqua", "Colors", "Distributions", "FileIO", "FilePathsBase", "FreeType", "Gaston", "GeometryBasics", "Gtk", "ImageMagick", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "PlotlyJS", "PlotlyBase", "PyPlot", "PythonPlot", "PlotlyKaleido", "HDF5", "RDatasets", "SentinelArrays", "StableRNGs", "StaticArrays", "StatsPlots", "Test", "TestImages", "UnicodePlots", "Unitful", "VisualRegressionTests"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions src/backends.jl → Plots/src/backends.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ struct NoBackend <: AbstractBackend end

lazyloadPkg() = Base.require(@__MODULE__, :Pkg)

const _current_plots_version = VersionNumber(TOML.parsefile(normpath(@__DIR__, "..", "Project.toml"))["version"])
const _plots_compats = TOML.parsefile(normpath(@__DIR__, "..", "Project.toml"))["compat"]
const _toml_proj = TOML.parsefile(normpath(@__DIR__, "..", "Project.toml"))
const _toml_test = TOML.parsefile(normpath(@__DIR__, "..", "test", "Project.toml"))

const _current_plots_version = VersionNumber(_toml_proj["version"])
const _plots_compats = merge(_toml_proj["compat"], _toml_test["compat"])
const _plots_deps = merge(_toml_proj["deps"], _toml_test["deps"])

const _backendSymbol = Dict{DataType, Symbol}(NoBackend => :none)
const _backendType = Dict{Symbol, DataType}(:none => NoBackend)
const _backend_packages = Dict{Symbol, Symbol}()
const _initialized_backends = Set{Symbol}()
const _backends = Symbol[]

const _plots_deps = let toml = TOML.parsefile(normpath(@__DIR__, "..", "Project.toml"))
merge(toml["deps"], toml["extras"])
end

function _check_installed(backend::Union{Module, AbstractString, Symbol}; warn = true)
sym = Symbol(lowercase(string(backend)))
if warn && !haskey(_backend_packages, sym)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
61 changes: 61 additions & 0 deletions Plots/test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
FilePathsBase = "48062228-2e41-5def-b9a4-89aafe57970f"
FreeType = "b38be410-82b0-50bf-ab77-7b57e271db43"
Gaston = "4b11ee91-296f-5714-9832-002c20994614"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
ImageMagick = "6218d12a-5da1-5696-b52f-db25d2ecc6d1"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
InspectDR = "d0351b0e-4b05-5898-87b3-e2a8edfddd1d"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Latexify = "23fbe1c1-3f47-55db-b15f-69d7ec21a316"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
PGFPlots = "3b7a836e-365b-5785-a47d-02c71176b4aa"
PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925"
PlotlyBase = "a03496cd-edff-5a9b-9e67-9cda94a718b5"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
PlotlyKaleido = "f2990250-8cf9-495f-b13a-cce12b45703c"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
RecipesPipeline = "01d81517-befc-4cb6-b9ec-a95719d0359c"
SentinelArrays = "91c51154-3ec4-41a3-a24f-3f23e20d615c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsPlots = "f3b207a7-027a-5e70-b257-86293d7955fd"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"
UnicodePlots = "b8865327-cd53-5732-bb35-84acbb429228"
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
VisualRegressionTests = "34922c18-7c2a-561c-bac1-01e79b2c4c92"

[compat]
Aqua = "0.8"
Distributions = "0.25, 1"
Gaston = "1"
HDF5 = "0.16 - 0.17"
InspectDR = "0.4"
LibGit2 = "1"
OffsetArrays = "1"
PGFPlots = "3"
PGFPlotsX = "1"
PlotlyBase = "0.7 - 0.8"
PlotlyJS = "0.18"
PlotlyKaleido = "1, 2"
PyPlot = "2"
PythonPlot = "1"
UnicodePlots = "3.4"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/test_misc.jl → Plots/test/test_misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

@testset "Infrastructure" begin
@test_nowarn JSON.Parser.parse(
String(read(joinpath(dirname(pathof(Plots)), "..", ".zenodo.json"))),
String(read(joinpath(dirname(pathof(Plots)), "..", "..", ".zenodo.json"))),
)
end

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 0 additions & 7 deletions RecipesBase/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,3 @@ PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
[compat]
PrecompileTools = "1"
julia = "1.6"

[extras]
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["StableRNGs", "Test"]
3 changes: 3 additions & 0 deletions RecipesBase/test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[deps]
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
11 changes: 3 additions & 8 deletions RecipesPipeline/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"

[sources]
RecipesBase = {path = "../RecipesBase"}

[compat]
NaNMath = "0.3, 1"
PlotUtils = "0.6.5, 1"
RecipesBase = "1.3.1"
PrecompileTools = "1"
julia = "1.6"

[extras]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["BenchmarkTools", "StableRNGs", "Test"]
5 changes: 5 additions & 0 deletions RecipesPipeline/test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Loading
Loading