From 11975c4706ab4ed6b77104b50a947df71ab3425c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 23 Feb 2024 09:43:06 +0100 Subject: [PATCH] CompatHelper: bump compat for ArnoldiMethod to 0.4, (keep existing compat) (#7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * CompatHelper: bump compat for ArnoldiMethod to 0.4, (keep existing compat) * Updated CompatHelper workflow * Add new compat entry for Statistics * Updated TagBot workflow * Bump version * Imports of targets from ArnoldiMethod.jl * Transitioned documentation plot to Python{Call,Plot} * Upgraded Documenter compat * Fix test --------- Co-authored-by: CompatHelper Julia Co-authored-by: Stefanos Carlström --- .github/workflows/CI.yml | 2 +- .github/workflows/CompatHelper.yml | 37 ++++++++++++++++++++++++++---- .github/workflows/TagBot.yml | 18 +++++++++++++++ .gitignore | 2 ++ Project.toml | 5 ++-- docs/Project.toml | 2 +- docs/make.jl | 3 ++- docs/plots.jl | 2 +- docs/src/divided_differences.md | 8 +------ docs/src/funcv.md | 1 + docs/src/leja.md | 12 +++++----- docs/src/newton_polynomials.md | 8 +++++++ src/MatrixPolynomials.jl | 1 + test/newton.jl | 2 +- 14 files changed, 79 insertions(+), 24 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d8bfe0f..63b4379 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -51,7 +51,7 @@ jobs: - run: | julia --project=docs -e ' using Pkg - pkg"add PyCall PyPlot https://github.com/jagot/Jagot.jl.git https://github.com/jagot/PyPlotRecipes.jl.git Colors SpecialFunctions LinearAlgebra" + pkg"add PythonCall PythonPlot https://github.com/jagot/Jagot.jl.git Colors SpecialFunctions LinearAlgebra" Pkg.develop(PackageSpec(path=pwd())) Pkg.instantiate()' env: diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index cba9134..0918161 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -3,14 +3,43 @@ on: schedule: - cron: 0 0 * * * workflow_dispatch: +permissions: + contents: write + pull-requests: write jobs: CompatHelper: runs-on: ubuntu-latest steps: - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() + - name: Check if Julia is already available in the PATH + id: julia_in_path + run: which julia + continue-on-error: true + - name: Install Julia, but only if it is not already available in the PATH + uses: julia-actions/setup-julia@v1 + with: + version: '1' + arch: ${{ runner.arch }} + if: steps.julia_in_path.outcome != 'success' + - name: "Add the General registry via Git" + run: | + import Pkg + ENV["JULIA_PKG_SERVER"] = "" + Pkg.Registry.add("General") + shell: julia --color=yes {0} + - name: "Install CompatHelper" + run: | + import Pkg + name = "CompatHelper" + uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" + version = "3" + Pkg.add(; name, uuid, version) + shell: julia --color=yes {0} + - name: "Run CompatHelper" + run: | + import CompatHelper + CompatHelper.main() + shell: julia --color=yes {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} - run: julia -e 'using CompatHelper; CompatHelper.main()' + # COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index f49313b..90dc100 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -4,6 +4,22 @@ on: types: - created workflow_dispatch: + inputs: + lookback: + default: 3 +permissions: + actions: read + checks: read + contents: write + deployments: read + issues: read + discussions: read + packages: read + pages: read + pull-requests: read + repository-projects: read + security-events: read + statuses: read jobs: TagBot: if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' @@ -12,4 +28,6 @@ jobs: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + # Edit the following line to reflect the actual name of the GitHub Secret containing your private key ssh: ${{ secrets.DOCUMENTER_KEY }} + # ssh: ${{ secrets.NAME_OF_MY_SSH_PRIVATE_KEY_SECRET }} diff --git a/.gitignore b/.gitignore index ff26998..4b08d33 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ /docs/build/ /docs/site/ /docs/src/figures/ +/docs/Manifest.toml +.CondaPkg/ \ No newline at end of file diff --git a/Project.toml b/Project.toml index ae87e26..f08ed4b 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MatrixPolynomials" uuid = "bd52c179-449c-4965-a404-68b29a447f4b" authors = ["Stefanos Carlström "] -version = "0.1.2" +version = "0.1.3" [deps] ArnoldiMethod = "ec485272-7323-5ecc-a04f-4719b315124d" @@ -14,11 +14,12 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" UnicodeFun = "1cfade01-22cf-5700-b092-accc4b62d6e1" [compat] -ArnoldiMethod = "0.2.0" +ArnoldiMethod = "0.2.0, 0.4" Compat = "3.26.0, 4" Formatting = "0.4" Parameters = "0.12" SpecialFunctions = "1.3, 2" +Statistics = "1" UnicodeFun = "0.4" julia = "1.3" diff --git a/docs/Project.toml b/docs/Project.toml index 531318e..1814eb3 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -2,4 +2,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" [compat] -Documenter = "0.25" +Documenter = "1" diff --git a/docs/make.jl b/docs/make.jl index 832c207..d99b973 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -14,10 +14,11 @@ makedocs(; "Newton polynomials" => "newton_polynomials.md", "φₖ functions" => "phi_functions.md", ], - repo="https://github.com/jagot/MatrixPolynomials.jl/blob/{commit}{path}#L{line}", + repo=Remotes.GitHub("jagot", "MatrixPolynomials.jl"), sitename="MatrixPolynomials.jl", authors="Stefanos Carlström ", doctest=false, + checkdocs=:exports ) deploydocs(; diff --git a/docs/plots.jl b/docs/plots.jl index 6241bff..c076b67 100644 --- a/docs/plots.jl +++ b/docs/plots.jl @@ -1,4 +1,4 @@ -using PyPlot +using PythonPlot using Jagot.plotting plot_style("ggplot") diff --git a/docs/src/divided_differences.md b/docs/src/divided_differences.md index 0c65d9a..1cf2b97 100644 --- a/docs/src/divided_differences.md +++ b/docs/src/divided_differences.md @@ -56,7 +56,7 @@ i.e. the first row of the function ``f`` applied to the matrix &&&&\zeta_j}. \end{equation} ``` -The right-eigenvectors are given by [Opitz] +The right-eigenvectors are given by [^Opitz] ```math \begin{equation} \label{eqn:div-diff-mat-right-eigen} @@ -268,12 +268,6 @@ MatrixPolynomials.propagate_div_diff_sin_cos propagators. Computing, 80(2), 189–201. [DOI: 10.1007/s00607-007-0227-1](http://dx.doi.org/10.1007/s00607-007-0227-1) -[^Kandolf]: Kandolf, P., Ostermann, A., & Rainer, S. (2014). A - residual based error estimate for Leja interpolation of matrix - functions. Linear Algebra and its Applications, 456(nil), - 157–173. [DOI: - 10.1016/j.laa.2014.04.023](http://dx.doi.org/10.1016/j.laa.2014.04.023) - [^McCurdy]: McCurdy, A. C., Ng, K. C., & Parlett, B. N. (1984). Accurate computation of divided differences of the exponential function. Mathematics of Computation, 43(168), diff --git a/docs/src/funcv.md b/docs/src/funcv.md index f825482..c8db775 100644 --- a/docs/src/funcv.md +++ b/docs/src/funcv.md @@ -10,6 +10,7 @@ LinearAlgebra.mul!(w, funcv::MatrixPolynomials.FuncV, v) ```@docs MatrixPolynomials.spectral_range +MatrixPolynomials.hermitian_spectral_range ``` ### Shapes diff --git a/docs/src/leja.md b/docs/src/leja.md index e9223f9..b417414 100644 --- a/docs/src/leja.md +++ b/docs/src/leja.md @@ -34,12 +34,12 @@ interpolation points. MatrixPolynomials.jl provides two methods for generating the Leja points, [`MatrixPolynomials.Leja`](@ref) and -[`MatrixPolynomials.FastLeja`](@ref). The figure below illustrates the -distribution of Leja points using both methods, on the line -``[-2,2]``, for the [`MatrixPolynomials.Leja`](@ref), an underlying -discretization of 1000 points was employed, and 10 Leja points were -generated. The lower part of the plot shows the estimation of the -[capacity](https://en.wikipedia.org/wiki/Capacity_of_a_set), +[`MatrixPolynomials.FastLeja`](@ref)[^Baglama]. The figure below +illustrates the distribution of Leja points using both methods, on the +line ``[-2,2]``, for the [`MatrixPolynomials.Leja`](@ref), an +underlying discretization of 1000 points was employed, and 10 Leja +points were generated. The lower part of the plot shows the estimation +of the [capacity](https://en.wikipedia.org/wiki/Capacity_of_a_set), calculated as ```math C(\{\zeta_{1:m}\}) \approx diff --git a/docs/src/newton_polynomials.md b/docs/src/newton_polynomials.md index 6b6af6e..067e08c 100644 --- a/docs/src/newton_polynomials.md +++ b/docs/src/newton_polynomials.md @@ -1,4 +1,5 @@ # Newton polynomials +[^Kandolf] ```@docs MatrixPolynomials.NewtonPolynomial @@ -13,3 +14,10 @@ LinearAlgebra.mul!(w, nmp::MatrixPolynomials.NewtonMatrixPolynomial, A, v) MatrixPolynomials.NewtonMatrixPolynomialDerivative MatrixPolynomials.φₖResidualEstimator ``` +## Bibliography + +[^Kandolf]: Kandolf, P., Ostermann, A., & Rainer, S. (2014). A + residual based error estimate for Leja interpolation of matrix + functions. Linear Algebra and its Applications, 456(nil), + 157–173. [DOI: + 10.1016/j.laa.2014.04.023](http://dx.doi.org/10.1016/j.laa.2014.04.023) diff --git a/src/MatrixPolynomials.jl b/src/MatrixPolynomials.jl index d046c10..75a4d38 100644 --- a/src/MatrixPolynomials.jl +++ b/src/MatrixPolynomials.jl @@ -3,6 +3,7 @@ module MatrixPolynomials using Parameters using LinearAlgebra using ArnoldiMethod +using ArnoldiMethod: SR, SI, LR, LI using SpecialFunctions const Γ = gamma const lnΓ = loggamma diff --git a/test/newton.jl b/test/newton.jl index 5e3c82a..331285b 100644 --- a/test/newton.jl +++ b/test/newton.jl @@ -100,7 +100,7 @@ end @testset "Matrix polynomials" begin @testset "Inhomogeneous coupled ODEs, $kind" for (kind,m,tol) in [(:real,43,1e-12), (:complex,60,1e-12)] n = 10 # Number of ODEs - Y₀ = 1.0*ones(n) + Y₀ = 1.0*ones(kind == :real ? Float64 : ComplexF64, n) G = -3*ones(n) # Inhomogeneous terms n_discr = 1000 # Number of points spanning eigenspectrum interval