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

Add Aqua.jl for some static testing #437

Merged
merged 8 commits into from
May 24, 2023
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
8 changes: 6 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "0.9.1"
[deps]
BinaryWrappers = "f01c122e-0ea1-4f85-ad8f-907073ad7a9f"
CxxWrap = "1f15a43c-97ca-5a2a-ae31-89f07a497df4"
FLINT_jll = "e134572f-a0d5-539d-bddf-3cad8db41a82"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Mongoc = "4fe8b98c-fc19-5c23-8ec2-168ff83495f2"
Expand All @@ -27,6 +26,11 @@ BinaryWrappers = "~0.1.0"
CxxWrap = "~0.10.1, ~0.11, ~0.12, ~0.13.1"
JSON = "^0.20, ^0.21"
Mongoc = "~0.6.0, ~0.7.0, ~0.8.0, ~0.9.0"
Scratch = "1.1"
Ninja_jll = "^1.11.1"
Perl_jll = "^5.34.0"
Scratch = "^1.1"
TOPCOM_jll = "~0.17.8"
julia = "^1.6"
lib4ti2_jll = "^1.6.10"
libpolymake_julia_jll = "~0.9.0"
polymake_jll = "^400.900.0"
5 changes: 0 additions & 5 deletions src/Polymake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ using CxxWrap
using BinaryWrappers
using Scratch

# FLINT_jll now initializes the flint malloc functions
# to the corresponding julia functions.
# See also https://github.com/Nemocas/Nemo.jl/issues/788
using FLINT_jll

import Perl_jll
import Ninja_jll
import polymake_jll
Expand Down
3 changes: 2 additions & 1 deletion src/std/pairs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Base.iterate(p::StdPair) = first(p), Val{:first}()
Base.iterate(p::StdPair, ::Val{:first}) = last(p), Val{:last}()
Base.iterate(p::StdPair, ::Val{:last}) = nothing

Base.:(==)(p::Union{StdPair{S, T}, Pair{S, T}}, q::Union{StdPair{U, V}, Pair{U, V}}) where {S, T, U, V} = convert(Pair{S, T}, p) == convert(Pair{U, V}, q)
Base.:(==)(p::StdPair{S, T}, q::Union{StdPair{U, V}, Pair{U, V}}) where {S, T, U, V} = convert(Pair{S, T}, p) == convert(Pair{U, V}, q)
Base.:(==)(p::Pair, q::StdPair{S, T}) where {S, T} = p == convert(Pair{S, T}, q)
19 changes: 19 additions & 0 deletions test/Aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Aqua

@testset "Aqua.jl" begin
Aqua.test_all(
Polymake;
# this check is disabled as it returns thousands of ambiguities from
# libcxxwrap defined interfaces where we can't really do anything about
# (at least until someone has time to work on CxxWrap for this)
ambiguities=false,
unbound_args=true,
undefined_exports=true,
project_extras=true,
stale_deps=true,
deps_compat=true,
project_toml_formatting=true,
# this is also disabled to to the way libcxxwrap defines c++ function mappings
piracy=false,
)
end
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Aqua = "0.6"
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ end

struct MyInt x::Int end # needed in test/convert.jl

include("Aqua.jl")

@testset "Polymake" begin
include("integers.jl")
include("rationals.jl")
Expand Down