Skip to content

Commit

Permalink
Merge branch 'master' into tex
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Jul 9, 2022
2 parents 366af9b + e87cd4f commit f607f6a
Show file tree
Hide file tree
Showing 40 changed files with 608 additions and 526 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/SnoopCompile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- x64
steps:
# Setup environment
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
version: ${{matrix.version}}
Expand All @@ -53,7 +53,7 @@ jobs:
free
df -h
julia --project -e 'using Pkg; Pkg.instantiate()'
julia -e 'using Pkg; Pkg.add(PackageSpec(name="CompileBot", version="1")); Pkg.develop(PackageSpec(; path=pwd())); using CompileBot; CompileBot.addtestdep()'
julia -e 'using Pkg; Pkg.add(PackageSpec(name="CompileBot", version="1")); Pkg.develop(path=pwd()); using CompileBot; CompileBot.addtestdep()'
# TESTCMD
- name: Default TESTCMD
Expand All @@ -64,14 +64,14 @@ jobs:

# Generate precompile files
- name: Generating precompile files
run: $TESTCMD --project -e 'include("deps/SnoopCompile/snoop_bot.jl")' # NOTE: must match path
run: timeout --preserve-status 1h $TESTCMD --project -e 'include("deps/SnoopCompile/snoop_bot.jl")' # NOTE: must match path

# Run benchmarks
- name: Running Benchmark
run: $TESTCMD --project -e 'include("deps/SnoopCompile/snoop_bench.jl")' # NOTE: optional, if have benchmark file

- name: Upload all
uses: actions/upload-artifact@v2.0.1
uses: actions/upload-artifact@v2
with:
path: ./

Expand All @@ -80,7 +80,7 @@ jobs:
needs: SnoopCompile
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Download all
uses: actions/download-artifact@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
version: '1.7'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:

steps:
# Setup environment
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
Expand Down Expand Up @@ -68,9 +68,9 @@ jobs:
$TESTCMD -e 'using Pkg; Pkg.activate(tempdir()); Pkg.develop(path=abspath(".")); Pkg.add("GraphRecipes"); Pkg.test("GraphRecipes")'
# Codecov
- uses: julia-actions/julia-processcoverage@v1
- uses: julia-actions/julia-processcoverage@latest
if: startsWith(matrix.os,'ubuntu')
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v3
if: startsWith(matrix.os,'ubuntu')
with:
file: lcov.info
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
Build_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
repository: JuliaPlots/PlotDocs.jl
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@latest
- name: Cache artifacts
uses: actions/cache@v1
uses: actions/cache@v3
env:
cache-name: cache-artifacts
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@latest
- name: Install dependencies
run: |
using Pkg
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install JuliaFormatter and format
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Unzip = "41fe7b60-77ed-43a1-b4f0-825fd5a5650d"
Contour = "0.5 - 0.6"
FFMPEG = "0.2 - 0.4"
FixedPointNumbers = "0.6 - 0.8"
GR = "0.64"
GR = "0.64 - 0.66"
GeometryBasics = "0.2, 0.3.1, 0.4"
JSON = "0.21, 1"
Latexify = "0.14 - 0.15"
Expand All @@ -53,7 +53,7 @@ PlotlyBase = "0.7"
PlotlyJS = "0.18"
PyPlot = "2"
RecipesBase = "1.2"
RecipesPipeline = "0.5"
RecipesPipeline = "0.5 - 0.6"
Reexport = "0.2, 1"
Requires = "1"
Scratch = "1"
Expand Down
71 changes: 66 additions & 5 deletions deps/SnoopCompile/precompile/1.6/precompile_Plots.jl

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deps/SnoopCompile/precompile/1.7/precompile_Plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function __lookup_kwbody__(mnokw::Method)
ast = Base.uncompressed_ast(mnokw)
if isa(ast, Core.CodeInfo) && length(ast.code) >= 2
callexpr = ast.code[end-1]
if isa(callexpr, Expr) && callexpr.head == :call
if isa(callexpr, Expr) && callexpr.head === :call
fsym = callexpr.args[1]
if isa(fsym, Symbol)
f = getfield(fmod, fsym)
Expand Down
46 changes: 23 additions & 23 deletions src/Plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -229,29 +229,29 @@ include("backends/web.jl")

include("shorthands.jl")

let PlotOrSubplot = Union{Plot,Subplot}
global title!(plt::PlotOrSubplot, s::AbstractString; kw...) = plot!(plt; title = s, kw...)
global xlabel!(plt::PlotOrSubplot, s::AbstractString; kw...) = plot!(plt; xlabel = s, kw...)
global ylabel!(plt::PlotOrSubplot, s::AbstractString; kw...) = plot!(plt; ylabel = s, kw...)
global xlims!(plt::PlotOrSubplot, lims::Tuple{<:Real,<:Real}; kw...) = plot!(plt; xlims = lims, kw...)
global ylims!(plt::PlotOrSubplot, lims::Tuple{<:Real,<:Real}; kw...) = plot!(plt; ylims = lims, kw...)
global zlims!(plt::PlotOrSubplot, lims::Tuple{<:Real,<:Real}; kw...) = plot!(plt; zlims = lims, kw...)
global xlims!(plt::PlotOrSubplot, xmin::Real, xmax::Real; kw...) = plot!(plt; xlims = (xmin, xmax), kw...)
global ylims!(plt::PlotOrSubplot, ymin::Real, ymax::Real; kw...) = plot!(plt; ylims = (ymin, ymax), kw...)
global zlims!(plt::PlotOrSubplot, zmin::Real, zmax::Real; kw...) = plot!(plt; zlims = (zmin, zmax), kw...)
global xticks!(plt::PlotOrSubplot, ticks::TicksArgs; kw...) = plot!(plt; xticks = ticks, kw...)
global yticks!(plt::PlotOrSubplot, ticks::TicksArgs; kw...) = plot!(plt; yticks = ticks, kw...)
global xticks!(plt::PlotOrSubplot, ticks::AVec{<:Real}, labels::AVec{<:AbstractString}; kw...) = plot!(plt; xticks = (ticks, labels), kw...)
global yticks!(plt::PlotOrSubplot, ticks::AVec{<:Real}, labels::AVec{<:AbstractString}; kw...) = plot!(plt; yticks = (ticks, labels), kw...)
global xgrid!(plt::PlotOrSubplot, args...; kw...) = plot!(plt; xgrid = args, kw...)
global ygrid!(plt::PlotOrSubplot, args...; kw...) = plot!(plt; ygrid = args, kw...)
global annotate!(plt::PlotOrSubplot, anns...; kw...) = plot!(plt; annotation = anns, kw...)
global annotate!(plt::PlotOrSubplot, anns::AVec{<:Tuple}; kw...) = plot!(plt; annotation = anns, kw...)
global xflip!(plt::PlotOrSubplot, flip::Bool = true; kw...) = plot!(plt; xflip = flip, kw...)
global yflip!(plt::PlotOrSubplot, flip::Bool = true; kw...) = plot!(plt; yflip = flip, kw...)
global xaxis!(plt::PlotOrSubplot, args...; kw...) = plot!(plt; xaxis = args, kw...)
global yaxis!(plt::PlotOrSubplot, args...; kw...) = plot!(plt; yaxis = args, kw...)
end
const PlotOrSubplot = Union{Plot,Subplot}

title!(plt::PlotOrSubplot, s::AbstractString; kw...) = plot!(plt; title = s, kw...)
xlabel!(plt::PlotOrSubplot, s::AbstractString; kw...) = plot!(plt; xlabel = s, kw...)
ylabel!(plt::PlotOrSubplot, s::AbstractString; kw...) = plot!(plt; ylabel = s, kw...)
xlims!(plt::PlotOrSubplot, lims::Tuple{<:Real,<:Real}; kw...) = plot!(plt; xlims = lims, kw...)
ylims!(plt::PlotOrSubplot, lims::Tuple{<:Real,<:Real}; kw...) = plot!(plt; ylims = lims, kw...)
zlims!(plt::PlotOrSubplot, lims::Tuple{<:Real,<:Real}; kw...) = plot!(plt; zlims = lims, kw...)
xlims!(plt::PlotOrSubplot, xmin::Real, xmax::Real; kw...) = plot!(plt; xlims = (xmin, xmax), kw...)
ylims!(plt::PlotOrSubplot, ymin::Real, ymax::Real; kw...) = plot!(plt; ylims = (ymin, ymax), kw...)
zlims!(plt::PlotOrSubplot, zmin::Real, zmax::Real; kw...) = plot!(plt; zlims = (zmin, zmax), kw...)
xticks!(plt::PlotOrSubplot, ticks::TicksArgs; kw...) = plot!(plt; xticks = ticks, kw...)
yticks!(plt::PlotOrSubplot, ticks::TicksArgs; kw...) = plot!(plt; yticks = ticks, kw...)
xticks!(plt::PlotOrSubplot, ticks::AVec{<:Real}, labels::AVec{<:AbstractString}; kw...) = plot!(plt; xticks = (ticks, labels), kw...)
yticks!(plt::PlotOrSubplot, ticks::AVec{<:Real}, labels::AVec{<:AbstractString}; kw...) = plot!(plt; yticks = (ticks, labels), kw...)
xgrid!(plt::PlotOrSubplot, args...; kw...) = plot!(plt; xgrid = args, kw...)
ygrid!(plt::PlotOrSubplot, args...; kw...) = plot!(plt; ygrid = args, kw...)
annotate!(plt::PlotOrSubplot, anns...; kw...) = plot!(plt; annotations = collect(anns), kw...)
annotate!(plt::PlotOrSubplot, anns::AVec{<:Tuple}; kw...) = plot!(plt; annotations = anns, kw...)
xflip!(plt::PlotOrSubplot, flip::Bool = true; kw...) = plot!(plt; xflip = flip, kw...)
yflip!(plt::PlotOrSubplot, flip::Bool = true; kw...) = plot!(plt; yflip = flip, kw...)
xaxis!(plt::PlotOrSubplot, args...; kw...) = plot!(plt; xaxis = args, kw...)
yaxis!(plt::PlotOrSubplot, args...; kw...) = plot!(plt; yaxis = args, kw...)

# ---------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions src/animation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ function _animate(forloop::Expr, args...; callgif = false)
# no filter... every iteration gets a frame
true

elseif args[1] == :every
elseif args[1] === :every
# filter every `freq` frames (starting with the first frame)
@assert n == 2
freq = args[2]
freqassert = :(@assert isa($freq, Integer) && $freq > 0)
:(mod1($countersym, $freq) == 1)

elseif args[1] == :when
elseif args[1] === :when
# filter on custom expression
@assert n == 2
args[2]
Expand Down
Loading

0 comments on commit f607f6a

Please sign in to comment.