Skip to content

fix show for AutomorphismGroup #5165

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ThomasBreuer
Copy link
Member

Print Automorphism group of ... only if the group knows that it is the full automorphism group of the group in question. Otherwise print Group of automorphisms of ....

Print `Automorphism group of ...` only if the group knows
that it is the *full* automorphism group of the group in question.
Otherwise print `Group of automorphisms of ...`.
@ThomasBreuer ThomasBreuer requested a review from thofma July 30, 2025 14:57
@ThomasBreuer ThomasBreuer added bug Something isn't working topic: groups release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels Jul 30, 2025
end

function Base.show(io::IO, ::MIME"text/plain", A::AutomorphismGroup{T}) where T <: Union{FinGenAbGroup, GAPGroup}
io = pretty(io)
println(io, "Automorphism group of", Indent())
if hasproperty(A, :is_known_to_be_full) && A.is_known_to_be_full
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hasproperty does not work as you want it here, as is_known_to_be_full is a bitstype. Due to being a bitstype, it gets initialized in any case (with false in this case), so any hasproperty call will return true.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Then everything is o.k. if I omit the hasproperty call.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really: "The initial contents of a plain data type is undefined."
Now this is fixed.

Copy link

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.88%. Comparing base (b07705e) to head (829941f).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5165   +/-   ##
=======================================
  Coverage   84.88%   84.88%           
=======================================
  Files         710      710           
  Lines       95524    95519    -5     
=======================================
- Hits        81082    81079    -3     
+ Misses      14442    14440    -2     
Files with missing lines Coverage Δ
src/Groups/abelian_aut.jl 98.61% <100.00%> (ø)
src/Groups/homomorphisms.jl 92.20% <100.00%> (+0.02%) ⬆️
src/Groups/types.jl 85.09% <100.00%> (ø)

... and 29 files with indirect coverage changes

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

"The initial contents of a plain data type is undefined."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes topic: groups
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants