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

Fix printing guidelines #2769

Merged
merged 1 commit into from
Sep 6, 2023
Merged

Conversation

fingolfin
Copy link
Member

Properly explain how to reach each printing mode, and also explain what 'io' is

@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Merging #2769 (839b063) into master (4768797) will increase coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2769      +/-   ##
==========================================
+ Coverage   73.09%   73.10%   +0.01%     
==========================================
  Files         450      450              
  Lines       64177    64177              
==========================================
+ Hits        46909    46917       +8     
+ Misses      17268    17260       -8     

Properly explain how to reach each printing mode, and also explain what 'io' is
@@ -173,7 +175,7 @@ end

function Base.show(io::IO, b::B)
io = AbstractAlgebra.pretty(io)
print(io, LowercaseOff(), "Hilbert thing")
print(io, AbstractAlgebra.LowercaseOff(), "Hilbert thing")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe this is exported? Then AbstractAlgebra. is not necessary.

Copy link
Member

Choose a reason for hiding this comment

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

As far as I understand, LowercaseOff, Indent, Dedent, pretty are imported from AbstractAlgebra into Oscar, thus one need not write AbstractAlgebra. in code inside Oscar; but they are not exported from Oscar.

Copy link
Member Author

Choose a reason for hiding this comment

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

The example code uses an explicit AbstractAlgebra. everywhere else, and it should be consistent. With it there, a user can copy&paste the example code and start working with it, whether or not they have done using AbstractAlgebra (which is dangerous inside a package) or import AbstractAlgebra.

Anyway, my primary concern was to make it consistent. If someone prefers to drop the AbstractAlgebra. everywhere, that should be a seperate PR, IMHO

@thofma
Copy link
Collaborator

thofma commented Sep 5, 2023

Looks good, once the the namespace has been figured out.

@thofma thofma merged commit c76820b into oscar-system:master Sep 6, 2023
7 of 12 checks passed
@fingolfin fingolfin deleted the mh/fix-printing-docs branch September 10, 2023 22:00
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.

5 participants