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

support gap_to_julia(::AbstractVector) #989

Merged
merged 3 commits into from
May 15, 2024

Conversation

ThomasBreuer
Copy link
Member

It had been claimed already before the change that gap_to_julia(::BitVector) works, but this was not tested.

(The problem was uncovered because gap_to_julia(::JSON3.Array) did not work.)

This had been claimed already before the change,
but it was not tested.
@ThomasBreuer ThomasBreuer requested a review from fingolfin May 13, 2024 12:40
After generalizing the three-argument method of `julia_to_gap`
from `Vector` to `AbstractVector`,
the default method that discards the last two arguments is no longer
applicable to `AbstractRange{<:Integer}`,
hence the special one-argument method does not get called.

For the moment, install a three-argument method for `AbstractRange{<:Integer}`.

(And add tests that check whether we really get a GAP `IsRange` object in the end.)
Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.75%. Comparing base (ccec74a) to head (edbdb19).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #989      +/-   ##
==========================================
+ Coverage   75.74%   75.75%   +0.01%     
==========================================
  Files          51       51              
  Lines        4188     4190       +2     
==========================================
+ Hits         3172     3174       +2     
  Misses       1016     1016              
Files Coverage Δ
src/julia_to_gap.jl 96.11% <100.00%> (+0.07%) ⬆️
src/types.jl 80.00% <ø> (ø)

@ThomasBreuer
Copy link
Member Author

CI-failures with Julia nightly, concerning the way how Base.C_NULL gets printed; GAP reports the following.

Julia.Base.C_NULL;
# Expected output:
<Julia: Ptr{Nothing} @0x0000000000000000>
# But found:
<Julia: Ptr{Nothing}(0x0000000000000000)>

ThomasBreuer added a commit to ThomasBreuer/Oscar.jl that referenced this pull request May 13, 2024
add a `GAP.julia_to_gap(::JSON3.Array, ...)` method
until the fix from oscar-system/GAP.jl/pull/989 is available
@lgoettgens
Copy link
Member

CI-failures with Julia nightly, concerning the way how Base.C_NULL gets printed; GAP reports the following.

Julia.Base.C_NULL;
# Expected output:
<Julia: Ptr{Nothing} @0x0000000000000000>
# But found:
<Julia: Ptr{Nothing}(0x0000000000000000)>

This was changed in JuliaLang/julia#54305 and was first present in 1.12.0-DEV.497 (if you want to change this in the tests)

- do not show `C_NULL` but just its type (since printing has changed in Julia)
- fix a typo
fingolfin pushed a commit to oscar-system/Oscar.jl that referenced this pull request May 14, 2024
…) or `f.map` (for group homomorphisms) (#3681)

* use `GapObj` instead of `.values` access for group characters
* use `GapObj(f)` not `f.map` for `f::GAPGroupHomomorphism`
  (and replace more `.X` access by `GapObj`)
* replace `GAPTable` for char. tables by `GapObj`
* simplify recursive `GapObj` calls
* more `GapObj` calls using `recursive = true`
* add a `GAP.julia_to_gap(::JSON3.Array, ...)` method until the
  fix from oscar-system/GAP.jl/pull/989 is available
@fingolfin fingolfin merged commit c53585e into oscar-system:master May 15, 2024
14 checks passed
@ThomasBreuer ThomasBreuer deleted the TB_convert_AbstractVector branch May 15, 2024 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants