Skip to content

Commit

Permalink
Merge pull request #186 from devmotion/dw/aqua
Browse files Browse the repository at this point in the history
Add Aqua tests and fix unbound type parameters
  • Loading branch information
Joel-Dahne authored Apr 19, 2024
2 parents 7699a5b + 07a77b8 commit 344a6a2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"

[compat]
Aqua = "0.8"
Documenter = "1"
FLINT_jll = "~300.100.100"
LinearAlgebra = "1.6"
Expand All @@ -21,8 +22,9 @@ Test = "1.6"
julia = "1.6"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Documenter", "Test"]
test = ["Aqua", "Documenter", "Test"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10081694.svg)](https://doi.org/10.5281/zenodo.10081694)
[![ci](https://github.com/kalmarek/Arblib.jl/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/kalmarek/Arblib.jl/actions/workflows/ci.yml?query=branch%3Amaster)
[![codecov](https://codecov.io/gh/kalmarek/Arblib.jl/graph/badge.svg?token=i1YYEc2Vht)](https://codecov.io/gh/kalmarek/Arblib.jl)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)

This package is a thin, efficient wrapper around
[Arb](http://arblib.org) - a C library for arbitrary-precision ball
Expand Down
6 changes: 3 additions & 3 deletions src/multi-argument.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for (jf, af) in [(:+, :add!), (:*, :mul!), (:min, :min!), (:max, :max!)]
end

for T in (ArfOrRef, ArbOrRef, AcbOrRef, ArbPoly, AcbPoly)
@eval @inline _precision(x::$T, y::$T, z::$T, rest::Vararg{S}) where {S<:$T} =
@eval @inline _precision(x::$T, y::$T, z::$T, rest::Vararg{$T}) =
max(precision(x), _precision(y, z, rest...))

for (jf, af) in [(:+, :add!), (:*, :mul!), (:min, :min!), (:max, :max!)]
Expand Down Expand Up @@ -68,9 +68,9 @@ for T in (ArfOrRef, ArbOrRef, AcbOrRef, ArbPoly, AcbPoly)
end

for T in (ArbSeries, AcbSeries)
@eval @inline _precision(x::$T, y::$T, z::$T, rest::Vararg{S}) where {S<:$T} =
@eval @inline _precision(x::$T, y::$T, z::$T, rest::Vararg{$T}) =
max(precision(x), _precision(y, z, rest...))
@eval @inline _degree(x::$T, y::$T, z::$T, rest::Vararg{S}) where {S<:$T} =
@eval @inline _degree(x::$T, y::$T, z::$T, rest::Vararg{$T}) =
min(degree(x), _degree(y, z, rest...))

for (jf, af) in [(:+, :add_series!), (:*, :mullow!)]
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ ENV["NEMO_THREADED"] = 1
using Arblib, Test, LinearAlgebra, Random, Serialization, SpecialFunctions
using Documenter

import Aqua

DocMeta.setdocmeta!(Arblib, :DocTestSetup, :(using Arblib); recursive = true)

@testset "Arblib" begin
doctest(Arblib)
Aqua.test_all(Arblib; ambiguities = (; broken = true))

include("ArbCall/runtests.jl")

Expand Down

0 comments on commit 344a6a2

Please sign in to comment.