-
-
Notifications
You must be signed in to change notification settings - Fork 602
Fix CI documentation diff #39622
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 CI documentation diff #39622
Conversation
1f10bb6
to
2b1815d
Compare
tools/clean-doc-html
Outdated
-e 's;#L[0-9]*";";' \ | ||
-e 's;tab-set--[0-9]*-;tab-set-;' \ | ||
-e 's;"tab-set--[0-9]*";"tab-set";' \ | ||
"$@" |
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.
Not sure if this is more suitable to be put in .ci
instead. On the other hand it seems like something that is not that specific to CI?
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.
I suggest to put it in .github/workflows
. tools
is for developers (I have a hard time seeing why someone would like to run this script locally) and .ci
is mostly outdated.
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.
Oops, I misreads.
On the other hand
.ci is mostly outdated.
the problem is the substitute aren't good enough yet. For example test-new
takes only ≈ 15 minutes while meson test takes an hour. Meson doesn't have incremental build or documentation build or documentation diff either.
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.
I suggest to put it in
.github/workflows
.
Actually… this feels wrong somehow.
Argument to support it: there are already two scripts there.
Arguments against it: we're only using GitHub actions for CI, so GitHub workflows and CI should be synonymous. It is not a good idea to have two locations for the same purpose. (if we do this we might consider moving the scripts back as well, but I guess that's out of scope here)
What do you think?
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.
In #39642, I propose to remove the .ci
directory. What do you think?
2b1815d
to
8c2fff5
Compare
.github/workflows/doc-build.yml
Outdated
-e 's;#L[0-9]*";";' \ | ||
-e 's;tab-set--[0-9]*-;tab-set-;' \ | ||
&& true) | ||
find . -name "*.html" | xargs ../tools/clean-doc-html && 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.
The true
seems useless, but I keep it just in case.
Documentation preview for this PR (built with commit 3b83e4b; changes) is ready! 🎉 |
Not sure if I like this change or not. The rendering of code in markdown (eg here on github) is usually way better than in the docstrings in python files. |
That's true, but in principle that's only a technical issue rather than a practical one (e.g. normally there is Sphinx to render RST to HTML) In practice… either way is fine for me. |
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.
From my side this looks good. @kwankyu can you please have a look as well given your expertise in the doc-changeset business.
@kwankyu Do you have any comment? (I think we show not leave "view changes" broken for too long, yes it's my fault) For what it's worth the changes link for this PR (https://doc-pr-39622--sagemath.netlify.app/CHANGES.html) is working. (the page is empty though.) |
Bash scripts like ".github/workflows/clean-doc-html.sh" used for CI go into the General remark: The sed command has been carefully improved and battle-tested. Please test your changes to check for regressions. |
Uh, it's because of #39642 . I guess I can move it back (then maybe the other pull request if merged after this one can move it to .github/workflows again or something)
The command is not changed, just moved from one file to another to remove code duplication. |
The two sed commands are not identical. |
That's the point of this pull request, because of the code duplication I accidentally change one without change the other in #39542 (it was previously identical) which breaks the feature, so I decide to remove the code duplication to avoid possible issues in the future. (and in the meanwhile make the two commands identical again, obviously) |
Before #39542 :
versus
… okay yes they're different. I can't say I fully understand what they do so I'll just try my best to preserve the old behavior while removing code duplication. |
Before making diffs, the first sed command removes things specific to the doc for the last sage release, and the second sed command removes things specific to the doc for the PR branch. They cannot be the same. |
749f874
to
f93e1ef
Compare
f93e1ef
to
3b83e4b
Compare
I decide to just keep the old situation and fix both occurrences. Refactor etc. can be left for some day in the future. Seems like it's working now — I previously tried adding a code block and there isn't several spurious |
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.
LGTM.
sagemathgh-39622: Fix CI documentation diff As discussed in sagemath#39542 . Without this, the "Changes is ready!" feature will be broken. Also remove some outdated documentation (the requirement list in update- conda was wrong (toml missing), I just refer to README.md which contains the correct list) ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39622 Reported by: user202729 Reviewer(s): Kwankyu Lee, Tobias Diez, user202729
As discussed in #39542 . Without this, the "Changes is ready!" feature will be broken.
Also remove some outdated documentation (the requirement list in update-conda was wrong (toml missing), I just refer to README.md which contains the correct list)
📝 Checklist
⌛ Dependencies