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

doctest_fix: try setting fixed default terminal size #4171

Merged
merged 2 commits into from
Oct 2, 2024

Conversation

benlorenz
Copy link
Member

These should be the correct defaults, I tried this with a few functions and it did not modify the output.
Would be great if someone else could try as well!

cc: @HechtiDerLachs

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

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

Project coverage is 84.69%. Comparing base (2fe164e) to head (5d2eb7a).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/utils/docs.jl 0.00% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4171      +/-   ##
==========================================
+ Coverage   84.68%   84.69%   +0.01%     
==========================================
  Files         628      628              
  Lines       84471    84581     +110     
==========================================
+ Hits        71533    71636     +103     
- Misses      12938    12945       +7     
Files with missing lines Coverage Δ
src/utils/docs.jl 18.34% <0.00%> (-0.52%) ⬇️

... and 5 files with indirect coverage changes

Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

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

Good idea and seems sensible to me, but I have not (yet) tested it myself.

@benlorenz benlorenz marked this pull request as ready for review October 2, 2024 07:52
@HechtiDerLachs HechtiDerLachs mentioned this pull request Oct 2, 2024
@joschmitt
Copy link
Member

I just tried this and Oscar.build_doc(doctest = :fix) still produces changes like this for me:

--- a/experimental/FTheoryTools/src/AbstractFTheoryModels/attributes.jl
+++ b/experimental/FTheoryTools/src/AbstractFTheoryModels/attributes.jl
@@ -1677,7 +1677,8 @@ julia> components_of_dual_graph(qsm_model)
  "C7"
  "C8"
  "C9"
- ⋮
+ "C13"
+ "C14"
  "C16"
  "C17"
  "C21"

(It also adds stacktraces to several intentional errors.)

@benlorenz
Copy link
Member Author

I just tried this and Oscar.build_doc(doctest = :fix) still produces changes like this for me:

--- a/experimental/FTheoryTools/src/AbstractFTheoryModels/attributes.jl
+++ b/experimental/FTheoryTools/src/AbstractFTheoryModels/attributes.jl
@@ -1677,7 +1677,8 @@ julia> components_of_dual_graph(qsm_model)
  "C7"
  "C8"
  "C9"
- ⋮
+ "C13"
+ "C14"
  "C16"
  "C17"
  "C21"

(It also adds stacktraces to several intentional errors.)

I only touched the Oscar.doctest_fix function and not build_doc, but I guess that would also make sense. Not sure if we can do anything about the stacktraces.

@joschmitt
Copy link
Member

I just tried this and Oscar.build_doc(doctest = :fix) still produces changes like this for me:

--- a/experimental/FTheoryTools/src/AbstractFTheoryModels/attributes.jl
+++ b/experimental/FTheoryTools/src/AbstractFTheoryModels/attributes.jl
@@ -1677,7 +1677,8 @@ julia> components_of_dual_graph(qsm_model)
  "C7"
  "C8"
  "C9"
- ⋮
+ "C13"
+ "C14"
  "C16"
  "C17"
  "C21"

(It also adds stacktraces to several intentional errors.)

I only touched the Oscar.doctest_fix function and not build_doc, but I guess that would also make sense. Not sure if we can do anything about the stacktraces.

Oh, sorry, my mistake.

@joschmitt
Copy link
Member

I can confirm that doctest_fix works better with this pull request.

@HechtiDerLachs
Copy link
Collaborator

Thank you @benlorenz ! I didn't try it, yet, but I will eventually.

@benlorenz
Copy link
Member Author

benlorenz commented Oct 2, 2024

I added the environment variables to build_doc as well. Running the whole docs with :fix now only caused the stacktraces to appear (which is a known documenter issue) but no other changes.

@joschmitt
Copy link
Member

Thank you! Works on my machine.

@joschmitt joschmitt enabled auto-merge (squash) October 2, 2024 09:52
@joschmitt joschmitt merged commit f8edfcb into master Oct 2, 2024
29 checks passed
@joschmitt joschmitt deleted the bl/doctest_termsize branch October 2, 2024 10:55
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.

4 participants