Skip to content

Conversation

@mvidner
Copy link
Contributor

@mvidner mvidner commented Apr 14, 2025

Problem

  • Trello: no, unplanned, it was a yak that I met this weekend 🤦‍♂️

On https://agama-project.github.io/ we have a hidden(!) /agama section with generated API docs. I don't know about the web UI part but the D-Bus part at /agama/dbus is outdated.

This is because updating it is a manual process that is easy to forget and easy to get wrong.

Also: s390...

Solution

  • Added a hack for s390...
  • Manually update the docs: bring the documented API in sync with actual API
  • Manually update the docs: fix the "markup" so that existing docs you people have already written is actually rendered and visible
  • Automate more so that it stays up to date

Testing

Testing this is done by rendering the docs over and over (by make ...TODO) and looking at the generated HTML to see if the texts is there at all and looks half decent.

Oh I did add a trivial style sheet because the default one is too ugly even for me.

There is make check run by CI but it only triggers once you start updating the docs by running seed.sh manually.

Screenshots

  • I should push the docs from this branch to some temporary place
> diff -urN doc/dist-master doc/dist | diffstat 
 index.html                                               |    9 
 ref-org.opensuse.Agama.Manager1.html                     |  107 ++++++++++
 ref-org.opensuse.Agama.Software1.Product.html            |   24 +-
 ref-org.opensuse.Agama.Software1.html                    |   90 ++++++---
 ref-org.opensuse.Agama.Storage1.DASD.Device.html         |    2 
 ref-org.opensuse.Agama.Storage1.DASD.Manager.html        |    2 
 ref-org.opensuse.Agama.Storage1.ISCSI.Initiator.html     |    2 
 ref-org.opensuse.Agama.Storage1.ISCSI.Node.html          |    2 
 ref-org.opensuse.Agama.Storage1.ISCSI.html               |    2 
 ref-org.opensuse.Agama.Storage1.Proposal.Calculator.html |   70 ++++++-
 ref-org.opensuse.Agama.Storage1.Proposal.html            |   55 +++++
 ref-org.opensuse.Agama.Storage1.ZFCP.Controller.html     |   52 +++--
 ref-org.opensuse.Agama.Storage1.ZFCP.Disk.html           |    6 
 ref-org.opensuse.Agama.Storage1.ZFCP.Manager.html        |    4 
 ref-org.opensuse.Agama.Storage1.html                     |  149 +++++++++++++--
 ref-org.opensuse.Agama.Users1.html                       |    2 
 ref-org.opensuse.Agama1.Locale.html                      |   37 ---
 ref-org.opensuse.Agama1.LocaleMixin.html                 |   12 +
 ref-org.opensuse.Agama1.Manager.html                     |   65 ------
 ref-org.opensuse.Agama1.Progress.html                    |   14 +
 ref-org.opensuse.Agama1.Questions.Generic.html           |    2 
 ref-org.opensuse.Agama1.Questions.WithPassword.html      |    2 
 ref-org.opensuse.Agama1.Questions.html                   |   75 +++----
 ref-org.opensuse.Agama1.Registration.html                |   60 +++++-
 refentry-agama.css                                       |   19 +
 25 files changed, 627 insertions(+), 237 deletions(-)

Documentation

Yes, how to make this easy for you people?

Remember to look at it from the user's perspective. Yes you have made the compiler happy.
But will the humans even know about your contribution? Sometimes they cannot miss it,
other times they need advertisement and explanation.

Look for relevant sections and adjust:

mvidner added 7 commits April 12, 2025 13:20
Calling them would crash but we only want them seen and documented.

Usage, within a ./testing_using_container.sh shell:

```sh
AGAMA_MAINFRAME_COSPLAY=1 ./setup-services.sh
(cd doc/dbus/bus; ./seed.sh)
```
These are the ones that do not change semantics:

- *.bus.xml now comes out with interfaces sorted by name
- zbus now adds comments for standard interfaces
…t.dtd

I was trying to be pedantic and only filter out known xmlstarlet errors
But if it errors out the check will fail anyway, so be --quiet.

Only woud do it with newer libxml/libxslt, oh joy
added a `make clean` target

refentry-agama.css is my stupid attempt to do minimal styling

Makefile has a quirky syntax that is a barrier to maintenance;
separate shell scripts are an easy target for shellcheck too.
by running seed.sh in a testing_using_container.sh container

Really should do it more often (automatically) as it nicely detects
these API changes (commits found manually by me)

69ef2a0 Manager.CollectLogs
c1f640e LocaleMixin
1860819 Progress.Steps
6901956 Software1.ListRepositories
c37c01a Software1.SetUserPatterns
75f70d8 Software1.ProbeFinished
f29f4ab Issues.All
f29f4ab Locale.ListTimezones
gdbus-codegen is picky about what it lets through.
You have to check that what you write actually gets rendered
in the resulting HTML

BTW there are remnants documenting an abandoned Agama.Network design:
TODO: remove it
https://github.com/search?q=repo%3Aagama-project%2Fagama+%2Forg.*Agama.*Network%2F&type=code
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.

2 participants