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

Update v2 #4913

Merged
merged 7 commits into from
Apr 1, 2024
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
61 changes: 41 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: ci

on:
pull_request:
push:
branches: [master]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -22,27 +22,42 @@ jobs:
JULIA_CONDAPKG_BACKEND: "MicroMamba"
MPLBACKEND: "agg"
name: Julia ${{ matrix.version }} - ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
fail-fast: false
matrix:
version:
- '1.9' # (minimal declared julia compat in `Project.toml`)
- '1.10' # latest stable
- '1.6' # LTS (minimal declared julia compat in `Project.toml`)
- '1' # latest stable
experimental:
- false
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x64]
include:
# - os: ubuntu-latest
# prefix: xvfb-run
# version: '1.9' # only test intermediate release on `ubuntu` to spare resources
# - os: ubuntu-latest
# prefix: xvfb-run
# version: '~1.11.0-0' # upcoming julia version, next `rc`
- os: ubuntu-latest
experimental: false
prefix: xvfb-run # julia-actions/julia-runtest/blob/master/README.md
- os: ubuntu-latest
experimental: false
prefix: xvfb-run
version: '1.7' # only test intermediate release on `ubuntu` to spare resources
- os: ubuntu-latest
experimental: false
prefix: xvfb-run
version: '1.8' # only test intermediate release on `ubuntu` to spare resources
- os: ubuntu-latest
experimental: false
prefix: xvfb-run
version: '1.9' # only test intermediate release on `ubuntu` to spare resources
- os: ubuntu-latest
experimental: true
prefix: xvfb-run
version: '~1.11.0-0' # upcoming julia version, next `rc`
- os: ubuntu-latest
experimental: true
prefix: xvfb-run
version: 'nightly'
allow_failure: true # `nightly` often breaks

steps:
- uses: actions/checkout@v4
Expand All @@ -62,19 +77,14 @@ jobs:
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v1
- name: Use local RecipesBase/RecipesPipeline
shell: julia --project=@. --color=yes {0}
run: |
using Pkg
Pkg.develop([(; path="./RecipesBase"), (; path="./RecipesPipeline")])
- uses: julia-actions/julia-buildpkg@latest

- name: Run upstream RecipesBase & RecipesPipeline tests
- name: Run upstream RecipesBase, RecipesPipeline tests
shell: julia --project=@. --color=yes {0}
run: |
using Pkg
foreach(("RecipesBase", "RecipesPipeline")) do name
Pkg.test(name; coverage=true)
Pkg.develop(path=name); Pkg.test(name; coverage=true)
end

- name: Install conda based matplotlib
Expand All @@ -90,14 +100,25 @@ jobs:
v"3.4.29" => ">=11.1,<12.1",
v"3.4.30" => ">=12.1,<13.1",
v"3.4.31" => ">=13.1,<14.1",
# ... keep this up-to-date with gcc 14
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()

- name: Run upstream PlotsBase tests
shell: julia --project=@. --color=yes {0}
run: |
using Pkg
foreach(("PlotsBase",)) do name
Pkg.develop(path=name); Pkg.test(name; coverage=true)
end

- uses: julia-actions/julia-runtest@latest
timeout-minutes: 60
with:
Expand All @@ -118,7 +139,7 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')
with:
directories: RecipesBase/src,RecipesPipeline/src,src
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
if: startsWith(matrix.os, 'ubuntu')
with:
file: lcov.info
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ test/tmpplotsave.hdf5
/.benchmarkci
/benchmark/*.json
.vscode/
.CondaPkg/
140 changes: 140 additions & 0 deletions PlotsBase/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name = "PlotsBase"
uuid = "c52230a3-c5da-43a3-9e85-260fcdfdc737"
version = "1.41.0"

[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"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
PlotThemes = "ccf2f8ad-2431-5c83-bf29-c5338b663b6a"
PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
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]
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"
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"

[extensions]
FileIOExt = "FileIO"
GRExt = "GR"
GastonExt = "Gaston"
GeometryBasicsExt = "GeometryBasics"
HDF5Ext = "HDF5"
IJuliaExt = "IJulia"
ImageInTerminalExt = "ImageInTerminal"
PGFPlotsXExt = "PGFPlotsX"
PlotlyJSExt = "PlotlyJS"
PlotlyKaleidoExt = "PlotlyKaleido"
PythonPlotExt = "PythonPlot"
UnicodePlotsExt = "UnicodePlots"
UnitfulExt = "Unitful"

[compat]
Base64 = "1"
Contour = "0.5 - 0.6"
Dates = "1"
FFMPEG = "0.2 - 0.4"
FixedPointNumbers = "0.6 - 0.8"
GR = "0.69.5 - 0.73"
Gaston = "1"
HDF5 = "0.16 - 0.17"
JLFzf = "0.1"
JSON = "0.21, 1"
LaTeXStrings = "1"
Latexify = "0.14 - 0.16"
Measures = "0.3"
NaNMath = "0.3, 1"
PGFPlotsX = "1"
Pkg = "1"
PlotThemes = "2, 3"
PlotUtils = "1"
PlotlyJS = "0.18"
PlotlyKaleido = "2.2.2"
Printf = "1"
PythonPlot = "1"
Random = "1"
REPL = "1"
RecipesBase = "1.3.1"
RecipesPipeline = "1"
Reexport = "0.2, 1"
RelocatableFolders = "0.3, 1"
Scratch = "1"
Showoff = "0.3.1, 1"
SparseArrays = "1"
Statistics = "1"
StatsBase = "0.33 - 0.34"
UnicodeFun = "0.4"
UnicodePlots = "3"
UnitfulLatexify = "1"
Unzip = "0.1 - 0.2"
UUIDs = "1"
julia = "1.6"

[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"
GR = "28b8d3ca-fb5f-59d9-8090-bfdbd6d07a71"
Gaston = "4b11ee91-296f-5714-9832-002c20994614"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
PGFPlotsX = "8314cec4-20b6-5062-9cdb-752b83310925"
PlotlyJS = "f0f68f2c-4968-5e81-91da-67840de0976a"
PlotlyKaleido = "f2990250-8cf9-495f-b13a-cce12b45703c"
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"
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", "GR", "Gtk", "HDF5", "Images", "LibGit2", "OffsetArrays", "PGFPlotsX", "PlotlyJS", "PlotlyKaleido", "PythonPlot", "RDatasets", "SentinelArrays", "StableRNGs", "StaticArrays", "Test", "TestImages", "UnicodePlots", "Unitful", "VisualRegressionTests"]
10 changes: 5 additions & 5 deletions ext/FileIOExt.jl → PlotsBase/ext/FileIOExt.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module FileIOExt

import Plots: Plots, Plot, @ext_imp_use
@ext_imp_use :import FileIO
import PlotsBase: PlotsBase, Plot
import FileIO

_fileio_load(@nospecialize(filename::AbstractString)) =
FileIO.load(filename::AbstractString)
Expand All @@ -12,7 +12,7 @@ function _show_pdfbackends(io::IO, ::MIME"image/png", plt::Plot)
fn = tempname()

# first save a pdf file
Plots.pdf(plt, fn)
PlotsBase.pdf(plt, fn)

# load that pdf into a FileIO Stream
s = _fileio_load("$fn.pdf")
Expand All @@ -28,10 +28,10 @@ end
# Possibly need to create another extension that has both pgfplotsx and showio
# delete for now, as testing for pgfplotsx is hard; TODO restore later at @2.0
# for be in (
# Plots.PGFPlotsBackend, # NOTE: I guess this can be removed in Plots@2.0
# PlotsBase.PGFPlotsBackend, # NOTE: I guess this can be removed in PlotsBase@2.0
# )
# showable(MIME"image/png"(), Plot{be}) && continue
# @eval Plots._show(io::IO, mime::MIME"image/png", plt::Plot{$be}) =
# @eval PlotsBase._show(io::IO, mime::MIME"image/png", plt::Plot{$be}) =
# _show_pdfbackends(io, mime, plt)
# end

Expand Down
Loading
Loading