Skip to content

Docs and Web: Add to the master branch and build with each push#764

Merged
yarda merged 13 commits intoredhat-performance:masterfrom
zacikpa:doc-build
Mar 16, 2026
Merged

Docs and Web: Add to the master branch and build with each push#764
yarda merged 13 commits intoredhat-performance:masterfrom
zacikpa:doc-build

Conversation

@zacikpa
Copy link
Contributor

@zacikpa zacikpa commented Apr 7, 2025

In this PR, I propose to move the webpage files from the gh-pages to 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.

@zacikpa zacikpa requested a review from yarda April 7, 2025 18:16
@zacikpa
Copy link
Contributor Author

zacikpa commented Apr 7, 2025

@yarda, technically, the static webpage files could be kept in the gh-pages branch, but the workflow itself should be in master. Let me know what you think is appropriate. Personally, I would prefer to have everything in master and get rid of the large files (i.e., fonts).

@zacikpa zacikpa force-pushed the doc-build branch 5 times, most recently from 85e4c16 to 65c5e73 Compare April 8, 2025 08:59
@zacikpa
Copy link
Contributor Author

zacikpa commented Apr 8, 2025

I changed my opinion: it is probably neater to keep the static files in gh-pages. I updated this PR to pull the files from there when building the website.

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.

@zacikpa
Copy link
Contributor Author

zacikpa commented May 30, 2025

I did some minor changes to the docs themselves, e.g., updates from yum to dnf. I also noticed that downstream RHEL docs diverged considerably from these - I don't think it's a blocker for merging this, but we should likely discuss the future of these upstream docs. I'd be personally inclined towards making them distinct from the RHEL docs and generating as much doc content as possible from the source code.

@zacikpa zacikpa force-pushed the doc-build branch 2 times, most recently from 6187cca to 499611c Compare May 30, 2025 12:39
@zacikpa zacikpa force-pushed the doc-build branch 3 times, most recently from 71986e7 to c705a09 Compare July 31, 2025 09:46
@yarda
Copy link
Contributor

yarda commented Feb 24, 2026

CentOS 7 CI failure is unrelated and was already fixed.

Copy link
Contributor

@Fothsid Fothsid left a comment

Choose a reason for hiding this comment

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

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.

@@ -1,5 +1,5 @@
:revnumber: 2.24.1
:revdate: 2024-10-09
:revnumber: 2.25.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any nice way to sync actual tuned version and the version here in the doc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not that I'm aware of.

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

I opened #835.

zacikpa added 8 commits March 3, 2026 16:28
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.
zacikpa added 5 commits March 3, 2026 16:28
- remove duplicate sections
- move profile syntax description to the second module
- move mention of profile merging after list of profiles
@zacikpa
Copy link
Contributor Author

zacikpa commented Mar 3, 2026

Thanks for the review. Rebased and updated the revnumber/revdate.

Copy link
Contributor

@Fothsid Fothsid left a comment

Choose a reason for hiding this comment

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

LGTM

@yarda
Copy link
Contributor

yarda commented Mar 16, 2026

I did some minor changes to the docs themselves, e.g., updates from yum to dnf. I also noticed that downstream RHEL docs diverged considerably from these - I don't think it's a blocker for merging this, but we should likely discuss the future of these upstream docs. I'd be personally inclined towards making them distinct from the RHEL docs and generating as much doc content as possible from the source code.

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.

Copy link
Contributor

@yarda yarda left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM.

Maybe we could use generated revnumber and revdate, but this can be changed later.

@yarda yarda merged commit 71854de into redhat-performance:master Mar 16, 2026
18 checks passed
yarda added a commit to yarda/tuned that referenced this pull request Mar 16, 2026
Related: redhat-performance#764

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
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.

3 participants