Skip to content

Commit eecbf95

Browse files
github-actions[bot]CompatHelper Juliajagot
authored
CompatHelper: bump compat for FillArrays to 1, (keep existing compat) (#64)
* CompatHelper: bump compat for FillArrays to 1, (keep existing compat) * Bump LazyArrays compat * Bump BlockBandedMatrices compat * Bump version * Added Dependabot * Transition documentation plots to Python{Call,Plot} --------- Co-authored-by: CompatHelper Julia <compathelper_noreply@julialang.org> Co-authored-by: Stefanos Carlström <stefanos.carlstrom@gmail.com>
1 parent 1cba88a commit eecbf95

File tree

8 files changed

+40
-34
lines changed

8 files changed

+40
-34
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/" # Location of package manifests
6+
schedule:
7+
interval: "weekly"

.github/workflows/CI.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ jobs:
5757
julia --project=docs -e '
5858
using Pkg
5959
Pkg.instantiate()
60-
pkg"add https://github.com/jagot/Jagot.jl.git https://github.com/jagot/PyPlotRecipes.jl.git"
61-
pkg"build PyPlot"'
62-
env:
63-
PYTHON: ""
60+
pkg"add https://github.com/jagot/Jagot.jl.git"'
6461
- uses: julia-actions/julia-docdeploy@v1
6562
env:
6663
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ ltximg
1010
/docs/src/figures
1111
/docs/src/assets/logo.svg
1212
Manifest.toml
13+
.CondaPkg/

Project.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "CompactBases"
22
uuid = "2c0377a8-7469-4ebd-be0f-82e501f20078"
33
authors = ["Stefanos Carlström <stefanos.carlstrom@gmail.com>"]
4-
version = "0.3.13"
4+
version = "0.3.14"
55

66
[deps]
77
BandedMatrices = "aae01518-5342-5314-be14-df237901396f"
@@ -21,13 +21,13 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
2121
[compat]
2222
ArnoldiMethod = "0.2"
2323
BandedMatrices = "0.16,0.17"
24-
BlockBandedMatrices = "0.11"
24+
BlockBandedMatrices = "0.11, 0.12"
2525
ContinuumArrays = "0.10, 0.11, 0.12"
2626
FastGaussQuadrature = "0.4, 0.5"
27-
FillArrays = "0.12,0.13"
27+
FillArrays = "0.12,0.13, 1"
2828
Formatting = "0.4"
2929
IntervalSets = "0.5.1,0.6,0.7"
30-
LazyArrays = "0.22"
30+
LazyArrays = "0.22, 1"
3131
OffsetArrays = "1.1"
3232
PrettyTables = "2"
3333
ProgressMeter = "1.5"

docs/Project.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
44
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
55
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
7-
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
8-
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
7+
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
8+
PythonPlot = "274fc56d-3b97-40fa-a1cd-1b4a50311bf9"
99
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1010
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1111

1212
[compat]
13-
Documenter = "0.27"
1413
ArnoldiMethod = "0.2"
1514
Colors = "0.12"
15+
Documenter = "0.27"
1616
IntervalSets = "0.5.1,0.6,0.7"
17-
PyCall = "1.94"
18-
PyPlot = "2.11"
17+
PythonCall = "0.9"
18+
PythonPlot = "1"

docs/bspline_plots.jl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function bsplines_cardinal_splines()
2323
csubplot(5,1,k,nox=k<5) do
2424
for j = 1:size(χ,2)
2525
ϕ = view(χ, :, j)
26-
l=plot(x, ϕ)[1]
26+
l=first(plot(x, ϕ))
2727
Bspline_text(x, ϕ, j, k, l.get_color())
2828
end
2929
ylabel(latexstring("k = $k"))
@@ -68,7 +68,7 @@ function bsplines_full_multiplicity_splines()
6868
csubplot(5,1,k,nox=k<5) do
6969
for j = 1:size(χ,2)
7070
ϕ = view(χ, :, j)
71-
l=plot(x, ϕ)[1]
71+
l=first(plot(x, ϕ))
7272
Bspline_text(x, ϕ, j, k, l.get_color())
7373
end
7474
ylabel(latexstring("k = $k"))
@@ -101,7 +101,7 @@ function bsplines_spline1d()
101101
csubplot(312, nox=true) do
102102
for j = 1:size(χ,2)
103103
ϕ = view(χ, :, j)
104-
l=plot(x, ϕ)[1]
104+
l=first(plot(x, ϕ))
105105
Bspline_text(x, ϕ, j, k, l.get_color())
106106
end
107107
margins(0.1,0.1)
@@ -223,15 +223,15 @@ function bsplines_restricted_basis_interpolation()
223223
yl = nothing
224224
cfigure("restricted basis interpolation", figsize=(7,9)) do
225225
csubplot(321, nox=true) do
226-
l=plot(x, χ*c1)[1]
226+
l=first(plot(x, χ*c1))
227227
plot(x_avg, c1, "s:", color=l.get_color())
228-
l=plot(x, χ*c2)[1]
228+
l=first(plot(x, χ*c2))
229229
plot(x_avg, c2, "s:", color=l.get_color())
230230
end
231231
csubplot(322, nox=true) do
232-
l=plot(x, χ̃*c̃1)[1]
232+
l=first(plot(x, χ̃*c̃1))
233233
plot(x̃_avg, c̃1, "s:", color=l.get_color())
234-
l=plot(x, χ̃*c̃2)[1]
234+
l=first(plot(x, χ̃*c̃2))
235235
plot(x̃_avg, c̃2, "s:", color=l.get_color())
236236
axes_labels_opposite(:y)
237237
end
@@ -377,12 +377,12 @@ function bsplines_sine_derivative()
377377

378378
cfigure("derivatives", figsize=(7,9)) do
379379
csubplot(411,nox=true) do
380-
l=plot(x, χ*cf, label=L"\tilde{f}(x)")[1]
380+
l=first(plot(x, χ*cf, label=L"\tilde{f}(x)"))
381381
plot(x, f.(x), ":", label=L"f(x)")
382382
legend(framealpha=0.75)
383383
end
384384
csubplot(412,nox=true) do
385-
l=plot(x, (χ*cg), label=L"\tilde{g}(x)")[1]
385+
l=first(plot(x, (χ*cg), label=L"\tilde{g}(x)"))
386386
plot(x, g.(x), ":", label=L"g(x)")
387387
legend(framealpha=0.75)
388388
end
@@ -426,28 +426,28 @@ function bsplines_ode_hookes_law(xₘₐₓ, kspring, k, N)
426426

427427
cfigure("Hooke's law",figsize=(7,9)) do
428428
csubplot(411,nox=true) do
429-
l=plot(x, χ*cF, label=L"\tilde{F}(x)")[1]
429+
l=first(plot(x, χ*cF, label=L"\tilde{F}(x)"))
430430
plot(-x, -χ*cF, "--", color=l.get_color())
431431
plot(x_avg, cF, ".:", color=l.get_color(), label=L"c_F")
432432
plot(x, F.(x), ":", label=L"F(x)")
433433
legend(framealpha=0.75)
434434
end
435435
csubplot(412,nox=true) do
436-
l=plot(x, χ*cV, label=L"\tilde{V}(x)")[1]
436+
l=first(plot(x, χ*cV, label=L"\tilde{V}(x)"))
437437
plot(-x, χ*cV, "--", color=l.get_color())
438438
plot(x_avg, cV, ".:", color=l.get_color(), label=L"c_V")
439439
plot(x, V.(x), ":", label=L"V(x)")
440440
legend(framealpha=0.75)
441441
end
442442
csubplot(413,nox=true) do
443443
plot(x, χ*cV - V.(x))
444-
xl = xlim()
444+
xl = pyconvert(Tuple, xlim())
445445
xlim(-xl[2],xl[2])
446446
ylabel("Error")
447447
end
448448
csubplot(414) do
449449
plot(x, χ)
450-
xl = xlim()
450+
xl = pyconvert(Tuple, xlim())
451451
xlim(-xl[2],xl[2])
452452
xlabel(L"x")
453453
end

docs/fd_plots.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ function fd_compare_staggered_non_uniform()
6464

6565
cfigure("staggered non_uniform reconstruction") do
6666
csubplot(211,nox=true) do
67-
l = plot(x1, c1, ".:", label="Uniform coeffs")[1]
67+
l = first(plot(x1, c1, ".:", label="Uniform coeffs"))
6868
plot(ξ, f1, color=l.get_color(), label="Uniform reconstruction")
69-
l = plot(x2, c2, ".:", label="Non-uniform coeffs")[1]
69+
l = first(plot(x2, c2, ".:", label="Non-uniform coeffs"))
7070
plot(ξ, f2, "--", color=l.get_color(), label="Non-uniform reconstruction")
7171
plot(ξ, fe, ":", label="Exact")
7272
xscale("log")

docs/plots.jl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
using PyPlot
1+
using PythonPlot
22
using Jagot.plotting
33
plot_style("ggplot")
4-
using PyPlotRecipes
5-
using PyCall
4+
using PythonCall
65
PathEffects = pyimport("matplotlib.patheffects")
76
using Statistics
87
using Random
@@ -20,6 +19,8 @@ function mean_color(color::String)
2019
mean([c.r,c.g,c.b])
2120
end
2221

22+
mean_color(color::Py) = mean_color(pyconvert(String, color))
23+
2324
lerp(a,b,t) = (1-t)*a + t*b
2425

2526
mean_position(x, ϕ) = ϕ'*Diagonal(x)*ϕ/'ϕ)
@@ -30,7 +31,7 @@ function savedocfig(name,dir="figures")
3031
savefig(filename,
3132
transparent=true,
3233
facecolor=fig.get_facecolor())
33-
close(fig)
34+
PythonPlot.close("all")
3435
if isfile(filename)
3536
println("Saved $(name) to $(filename)")
3637
else
@@ -49,7 +50,7 @@ function logo()
4950
margins(0.1, 0.1)
5051
axis("off")
5152
end
52-
savefig("docs/src/assets/logo.svg", transparent=true)
53+
savedocfig("logo", "assets")
5354
end
5455

5556
function simple_example()
@@ -163,7 +164,7 @@ function densities()
163164
for ϕ in ϕ
164165
loglog(rr, abs.(ϕ-h.(rr)))
165166
end
166-
yl = ylim()
167+
yl = pyconvert(Tuple, ylim())
167168
ylim(max(yl[1],1e-15), yl[2])
168169
legend(["Finite-differences",
169170
"Log–linear finite-differences",

0 commit comments

Comments
 (0)