AbstractAlgebra.jl icon indicating copy to clipboard operation
AbstractAlgebra.jl copied to clipboard

Add generic == error

Open lgoettgens opened this issue 1 year ago • 4 comments

Closes https://github.com/Nemocas/AbstractAlgebra.jl/pull/1800, resolves https://github.com/oscar-system/Oscar.jl/issues/4107.

This includes only the snippet from https://github.com/Nemocas/AbstractAlgebra.jl/pull/1800#issuecomment-2401919352

cc @joschmitt

lgoettgens avatar Oct 09 '24 10:10 lgoettgens

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.52%. Comparing base (502745e) to head (aad74a9). Report is 129 commits behind head on master.

Files with missing lines Patch % Lines
src/fundamental_interface.jl 0.00% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1853      +/-   ##
==========================================
+ Coverage   88.14%   89.52%   +1.37%     
==========================================
  Files         119      126       +7     
  Lines       30019    37540    +7521     
==========================================
+ Hits        26460    33607    +7147     
- Misses       3559     3933     +374     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Oct 09 '24 10:10 codecov[bot]

This causes several errors in OscarCI, which actually make me wonder if there is a bug in code there. Perhaps @ThomasBreuer can have a look? For reference this is the error I see in CI:

Automorphism group of a perm. group or a (sub) pc group: Error During Test at /home/runner/work/AbstractAlgebra.jl/AbstractAlgebra.jl/oscar-dev/Oscar/test/Groups/homomorphisms.jl:700
  Test threw exception
  Expression: !(g in A)
  == is not implemented for the given types
  Stacktrace:
   [1] error(s::String)
     @ Base ./error.jl:35
   [2] ==(::AutomorphismGroupElem{PermGroup}, ::GAPGroupHomomorphism{PermGroup, PcGroup})
     @ AbstractAlgebra ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/src/fundamental_interface.jl:8
   [3] in(x::GAPGroupHomomorphism{PermGroup, PcGroup}, itr::AutomorphismGroup{PermGroup})
     @ Base ./operators.jl:1293
   [4] eval_test(evaluated::Expr, quoted::Expr, source::LineNumberNode, negate::Bool)
     @ Test /opt/hostedtoolcache/julia/1.10.5/x64/share/julia/stdlib/v1.10/Test/src/Test.jl:355
   [5] macro expansion
     @ /opt/hostedtoolcache/julia/1.10.5/x64/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
   [6] macro expansion
     @ ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/oscar-dev/Oscar/test/Groups/homomorphisms.jl:700 [inlined]
   [7] macro expansion
     @ /opt/hostedtoolcache/julia/1.10.5/x64/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
   [8] top-level scope
     @ ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/oscar-dev/Oscar/test/Groups/homomorphisms.jl:660
Automorphism group of a perm. group or a (sub) pc group: Error During Test at /home/runner/work/AbstractAlgebra.jl/AbstractAlgebra.jl/oscar-dev/Oscar/test/Groups/homomorphisms.jl:700
  Test threw exception
  Expression: !(g in A)
  == is not implemented for the given types
  Stacktrace:
   [1] error(s::String)
     @ Base ./error.jl:35
   [2] ==(::AutomorphismGroupElem{PcGroup}, ::GAPGroupHomomorphism{PcGroup, PcGroup})
    @ Base ./asyncmap.jl:171
  [2] foreach(f::Base.var"#1033#1035", itr::Vector{Any})
    @ Base ./abstractarray.jl:3097
  [3] maptwice(wrapped_f::Function, chnl::Channel{Any}, worker_tasks::Vector{Any}, c::Vector{String})
    @ Base ./asyncmap.jl:171
  [4] wrap_n_exec_twice
    @ ./asyncmap.jl:147 [inlined]
  [5] #async_usemap#1018
    @ ./asyncmap.jl:97 [inlined]
  [6] async_usemap
    @ ./asyncmap.jl:78 [inlined]
  [7] #asyncmap#1017
    @ ./asyncmap.jl:75 [inlined]
  [8] asyncmap
    @ ./asyncmap.jl:74 [inlined]
  [9] pmap(f::Function, p::WorkerPool, c::Vector{String}; distributed::Bool, batch_size::Int64, on_error::Nothing, retry_delays::Vector{Any}, retry_check::Nothing)
    @ Distributed /opt/hostedtoolcache/julia/1.10.5/x64/share/julia/stdlib/v1.10/Distributed/src/pmap.jl:126
 [10] pmap(f::Function, p::WorkerPool, c::Vector{String})
    @ Distributed /opt/hostedtoolcache/julia/1.10.5/x64/share/julia/stdlib/v1.10/Distributed/src/pmap.jl:99
 [11] pmap(f::Function, c::Vector{String}; kwargs::@Kwargs{})
    @ Distributed /opt/hostedtoolcache/julia/1.10.5/x64/share/julia/stdlib/v1.10/Distributed/src/pmap.jl:156
 [12] top-level scope
    @ ~/work/AbstractAlgebra.jl/AbstractAlgebra.jl/oscar-dev/Oscar/test/runtests.jl:154
 [13] include(fname::String)
    @ Base.MainInclude ./client.jl:489
 [14] top-level scope
    @ none:6
in expression starting at /home/runner/work/AbstractAlgebra.jl/AbstractAlgebra.jl/oscar-dev/Oscar/test/runtests.jl:154
ERROR: Package Oscar errored during testing

fingolfin avatar Oct 09 '24 21:10 fingolfin

Perhaps @ThomasBreuer can have a look?

O.k.

I can reproduce the problem locally, and will create a pull request for Oscar.jl that fixes it.

ThomasBreuer avatar Oct 10 '24 07:10 ThomasBreuer

Note that this does not address all of the problems, since it is still possible to compare elements with the same type but different parents.

thofma avatar Mar 08 '25 12:03 thofma