-
Notifications
You must be signed in to change notification settings - Fork 134
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
Run CI on experimental *.md
doc files
#4083
Conversation
*.md
doc files
Could we move the function doctestsetup()
link_experimental_docs(Oscar)
return :(using Oscar; Oscar.AbstractAlgebra.set_current_module(@__MODULE__))
end This would simplify running this locally and from OscarDevTools. |
I am puzzled about the missing setup. Shouldn't Edit: It probably only takes care of the doctests attached to functions, but not to the doctests in the |
Yeah, I always wondered why we have to put this in every file. |
|
I tried this now. If I put the CI runners back to the original state, they don't test the |
Did you maybe put the call inside the quoted expression? Otherwise this doesn't seem to make sense to me, but I will give it a try myself. |
I pushed now what I have. |
Thanks, I understand it now: Many markdown files have The issue with having extra code in the yml files is that it would need more extra treatment for Oscar to get this to run in the downstream tests in OscarDevTools. |
I try to make the "cleaning up" step of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also add a flag to make sure the linking is only done once.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4083 +/- ##
=======================================
Coverage 84.65% 84.65%
=======================================
Files 614 614
Lines 83332 83365 +33
=======================================
+ Hits 70543 70575 +32
- Misses 12789 12790 +1
|
Somehow nothing seems to work. I just pushed something to see the CI run. Please ignore it. |
So the reason why the first attempt worked, but nothing else is this magical line in
That's why it works if one includes |
cca20be
to
2966758
Compare
# We monkey-patch Base.walkdir to use true as default value for follow_symlinks | ||
# (normally false is the default), in order to "trick" the Documenter code into | ||
# following those symlinks. | ||
# See also: | ||
# https://github.com/JuliaDocs/Documenter.jl/pull/552 | ||
# https://github.com/JuliaLang/julia/blob/master/doc/make.jl#L19 | ||
Base.walkdir(str::String) = Base.walkdir(str; follow_symlinks=true) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that moving this to docs/documenter_helpers.jl
should be fine because that file is included in docs/make_work.jl
.
I think we introduced the deleting of all symlinks in #2215 because I started to switch branches and then some links weren't there anymore. With a global flag we would basically do the linking once per OSCAR session; I'm not sure that is stable in interactive use with Revise etc.? For now, I edited |
I have a version now which does not need to change the CI configuration. Could you have a look again @benlorenz? |
Thanks for working on this! I think the test-code is good now. Due to the |
# See also: | ||
# https://github.com/JuliaDocs/Documenter.jl/pull/552 | ||
# https://github.com/JuliaLang/julia/blob/master/doc/make.jl#L19 | ||
Base.walkdir(str::String) = Base.walkdir(str; follow_symlinks=true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, we only need this to make Documenter deal with symlinks to directories, right ? I think symlinks to files work, don't they?
That would suggest an alternative solution: recursively "closing" directories in the source by creating equally named dirs in the destination (if they are not there already) and then adding symlinks for all the files (and deleting stale symlinks). Quite a bit more work (though not really hard).
The main concern I have with the above is that Oscar.build_doc
loads this code and then Base.walkdir
is "tainted" in the whole session.
Of course this is existing code, so none of what I say here is relevant for merging this PR!
Anyway, I'll try and see if perhaps Documenter.jl is willing to just use follow_symlinks=true
in their code, see JuliaDocs/Documenter.jl#2573
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear this is not meant to block this PR
The CI doctests would not run on the examples included in any
*.md
file insideexperimental
as discovered in https://oscar-system.slack.com/archives/C5B2H11BQ/p1726048480750199 .This tries to fix this by linking the experimental documentation into
docs/src
as part of the CI runners. Currently, the tests are expected to fail because of missingDocTestSetup = Oscar.doctestsetup()
lines in some of the previously uncovered files. If this works and people are happy with my changes, I will fix those doctests.