Docs and Web: Add to the master branch and build with each push#764
Docs and Web: Add to the master branch and build with each push#764yarda merged 13 commits intoredhat-performance:masterfrom
Conversation
|
@yarda, technically, the static webpage files could be kept in the |
85e4c16 to
65c5e73
Compare
|
I changed my opinion: it is probably neater to keep the static files in I also opened #765 which should be merged alongside this PR. When the PRs are merged, the repository also needs a manual update of the settings to make it build the website using the workflow. |
|
I did some minor changes to the docs themselves, e.g., updates from |
6187cca to
499611c
Compare
71986e7 to
c705a09
Compare
|
CentOS 7 CI failure is unrelated and was already fixed. |
Fothsid
left a comment
There was a problem hiding this comment.
LGTM, though revnumber/revdate needs to be changed for the actual current release (and a rebase would be nice), or maybe introduce a way to pass down the version from the spec to the doc during build.
doc/manual/master.adoc
Outdated
| @@ -1,5 +1,5 @@ | |||
| :revnumber: 2.24.1 | |||
| :revdate: 2024-10-09 | |||
| :revnumber: 2.25.1 | |||
There was a problem hiding this comment.
Is there any nice way to sync actual tuned version and the version here in the doc?
There was a problem hiding this comment.
Not that I'm aware of.
There was a problem hiding this comment.
What about:
--- Makefile 2026-03-16 15:21:55.344066816 +0100
+++ Makefile.new 2026-03-16 15:17:10.926639024 +0100
@@ -1,9 +1,12 @@
.PHONY: clean
+DOCVER=$(shell cd ../..; $$PYTHON -c 'import tuned.version as v; print(v.TUNED_VERSION_STR)')
+DOCDATE=$(shell date '+%Y-%m-%d')
+
index.html: master.adoc assemblies/*.adoc meta/*.adoc modules/performance/*.adoc ../../tuned/plugins/plugin_*.py ../../tuned/profiles/functions/function_*.py
$(PYTHON) ./compile_plugin_docs.py ../../tuned/plugins plugin_ Plugin modules/performance/ref_available-tuned-plug-ins_intro.adoc modules/performance/ref_available-tuned-plug-ins.adoc
$(PYTHON) ./compile_plugin_docs.py ../../tuned/profiles/functions function_ Function modules/performance/ref_built-in-functions-available-in-tuned-profiles_intro.adoc modules/performance/ref_built-in-functions-available-in-tuned-profiles.adoc
- asciidoctor -o index.html master.adoc || asciidoc -d book -o index.html master.adoc
+ asciidoctor -a revnumber=$(DOCVER) -a revdate=$(DOCDATE) -o index.html master.adoc || asciidoc -a revnumber=$(DOCVER) -a revdate=$(DOCDATE) -d book -o index.html master.adoc
install: index.html
install -Dpm 0644 index.html $(DESTDIR)$(DOCDIR)/manual/index.html
Then it uses actual TuneD version for the revnumber and build date as the revdate which IMHO is OK for builded docs.
Read the docstrings using ASTs instead of importing the modules; this prevents the need to install TuneD dependencies when just building the docs (e.g., in Github Pages).
The docs are now asciidoc with examples, ready to be included into the manual.
This is the standard in Python and it prevents the issue of using reserved/existing names, e.g., in the case of the `exec` or `log` function.
Prevents redundancy. The same thing is already done for plugins.
The manual is now built automatically with each push to the master branch.
- remove duplicate sections - move profile syntax description to the second module - move mention of profile merging after list of profiles
|
Thanks for the review. Rebased and updated the revnumber/revdate. |
In the past the RHEL docs were generated from the TuneD upstream, but currently it probably isn't the case. Also the content for RHEL seems a bit outdated and it would require some work on the doc team side, so I am OK with the current PR. In the future, if there is no more collaboration with the doc team, we could clean it up and move to the generated content. |
yarda
left a comment
There was a problem hiding this comment.
Thanks, LGTM.
Maybe we could use generated revnumber and revdate, but this can be changed later.
Related: redhat-performance#764 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
In this PR, I propose to move the webpage files from the
gh-pagesto the master branch. The webpage (preview at https://zacikpa.github.io/tuned/) now contains a link to the documentation (preview at https://zacikpa.github.io/tuned/docs/manual.html), which would be automatically deployed with each push to master.The documentation of plug-ins and built-in functions is built from code docstrings.
The PR contains some additional refactoring of TuneD built-in functions, see the individual commits.